正在显示
1 个修改的文件
包含
14 行增加
和
2 行删除
| @@ -589,6 +589,11 @@ func (c *OrderInfoController) ListOrderForExcel() { | @@ -589,6 +589,11 @@ func (c *OrderInfoController) ListOrderForExcel() { | ||
| 589 | c.ResponseError(errors.New("json数据解析失败")) | 589 | c.ResponseError(errors.New("json数据解析失败")) |
| 590 | return | 590 | return |
| 591 | } | 591 | } |
| 592 | + if param.Type != "ORDER_BASE" { | ||
| 593 | + logs.Error(err) | ||
| 594 | + c.ResponseError(errors.New("错误的操作类型")) | ||
| 595 | + return | ||
| 596 | + } | ||
| 592 | // 订单更新时间 | 597 | // 订单更新时间 |
| 593 | var ( | 598 | var ( |
| 594 | updateTimeBegin string | 599 | updateTimeBegin string |
| @@ -1135,8 +1140,15 @@ func (c *OrderInfoController) ImportOrderFromExcel() { | @@ -1135,8 +1140,15 @@ func (c *OrderInfoController) ImportOrderFromExcel() { | ||
| 1135 | orderQueryData.PartnerCategory = 0 | 1140 | orderQueryData.PartnerCategory = 0 |
| 1136 | } | 1141 | } |
| 1137 | 1142 | ||
| 1138 | - //TODO 销售日期时间格式转换 | ||
| 1139 | - timeValue, _ := time.Parse(row[4], "2015/02/08") | 1143 | + // 销售日期时间格式转换 |
| 1144 | + timeValue, err := time.ParseInLocation("2006/01/02", row[4], time.Local) | ||
| 1145 | + if err != nil { | ||
| 1146 | + e := lib.ThrowError(lib.ARG_ERROR, err.Error()) | ||
| 1147 | + c.ResponseError(e) | ||
| 1148 | + return | ||
| 1149 | + } | ||
| 1150 | + | ||
| 1151 | + fmt.Print(timeValue, "\n") | ||
| 1140 | 1152 | ||
| 1141 | // 初始化建订单命令集 | 1153 | // 初始化建订单命令集 |
| 1142 | orderCommands[hashString] = &orderCmd.CreateOrderCommand{ | 1154 | orderCommands[hashString] = &orderCmd.CreateOrderCommand{ |
-
请 注册 或 登录 后发表评论