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