正在显示
1 个修改的文件
包含
16 行增加
和
10 行删除
| @@ -437,20 +437,26 @@ func (c *OrderInfoController) PageListOrderReal() { | @@ -437,20 +437,26 @@ func (c *OrderInfoController) PageListOrderReal() { | ||
| 437 | updateTimeEnd string | 437 | updateTimeEnd string |
| 438 | ) | 438 | ) |
| 439 | if len(param.UpdateTime) > 0 { | 439 | if len(param.UpdateTime) > 0 { |
| 440 | - t, err := time.Parse("2016-01-02 15:04:05+07", param.UpdateTime[0]) | ||
| 441 | - if err != nil { | ||
| 442 | - c.ResponseError(errors.New("UpdateTimeBegin 时间格式错误")) | ||
| 443 | - return | 440 | + if len(param.UpdateTime[0]) > 0 { |
| 441 | + t, err := time.ParseInLocation("2016-01-02", param.UpdateTime[0], time.Local) | ||
| 442 | + if err != nil { | ||
| 443 | + c.ResponseError(errors.New("UpdateTimeBegin 时间格式错误")) | ||
| 444 | + return | ||
| 445 | + } | ||
| 446 | + updateTimeBegin = t.Format("2016-01-02 15:04:05+07") | ||
| 444 | } | 447 | } |
| 445 | - updateTimeBegin = t.Format("2016-01-02 15:04:05+07") | ||
| 446 | } | 448 | } |
| 447 | if len(param.UpdateTime) > 1 { | 449 | if len(param.UpdateTime) > 1 { |
| 448 | - t, err := time.Parse("2016-01-02 15:04:05+07", param.UpdateTime[1]) | ||
| 449 | - if err != nil { | ||
| 450 | - c.ResponseError(errors.New("UpdateTimeEnd 时间格式错误")) | ||
| 451 | - return | 450 | + if len(param.UpdateTime[1]) > 0 { |
| 451 | + t, err := time.ParseInLocation("2016-01-02", param.UpdateTime[1], time.Local) | ||
| 452 | + if err != nil { | ||
| 453 | + c.ResponseError(errors.New("UpdateTimeEnd 时间格式错误")) | ||
| 454 | + return | ||
| 455 | + } | ||
| 456 | + //设定时间边界 | ||
| 457 | + t.Add(86399 * time.Second) | ||
| 458 | + updateTimeEnd = t.Format("2016-01-02 15:04:05+07") | ||
| 452 | } | 459 | } |
| 453 | - updateTimeEnd = t.Format("2016-01-02 15:04:05+07") | ||
| 454 | } | 460 | } |
| 455 | companyId := c.GetUserCompany() | 461 | companyId := c.GetUserCompany() |
| 456 | orderSrv := orderService.NewOrderInfoService(nil) | 462 | orderSrv := orderService.NewOrderInfoService(nil) |
-
请 注册 或 登录 后发表评论