|
@@ -293,11 +293,12 @@ func (c *OrderDividendController) EditOrderRemarkBonus() { |
|
@@ -293,11 +293,12 @@ func (c *OrderDividendController) EditOrderRemarkBonus() { |
293
|
|
293
|
|
294
|
func (c *OrderDividendController) ListOrderBonusForExcel() {
|
294
|
func (c *OrderDividendController) ListOrderBonusForExcel() {
|
295
|
type Parameter struct {
|
295
|
type Parameter struct {
|
296
|
- SearchWord string `json:"searchWord"`
|
|
|
297
|
- OrderType int `json:"orderType"`
|
|
|
298
|
- PageSize int `json:"pageSize"`
|
|
|
299
|
- PageNumber int `json:"pageNumber"`
|
|
|
300
|
- PartnerCategoryId int `json:"partnerCategoryId"`
|
296
|
+ SearchWord string `json:"searchWord"`
|
|
|
297
|
+ OrderType int `json:"orderType"`
|
|
|
298
|
+ PageSize int `json:"pageSize"`
|
|
|
299
|
+ PageNumber int `json:"pageNumber"`
|
|
|
300
|
+ PartnerCategoryId int `json:"partnerCategoryId"`
|
|
|
301
|
+ CreateTime []string `json:"createTime"`
|
301
|
}
|
302
|
}
|
302
|
var (
|
303
|
var (
|
303
|
param Parameter
|
304
|
param Parameter
|
|
@@ -314,7 +315,32 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
@@ -314,7 +315,32 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
314
|
c.ResponseError(errors.New("参数异常"))
|
315
|
c.ResponseError(errors.New("参数异常"))
|
315
|
return
|
316
|
return
|
316
|
}
|
317
|
}
|
317
|
-
|
318
|
+ var (
|
|
|
319
|
+ createTimeBegin string
|
|
|
320
|
+ createTimeEnd string
|
|
|
321
|
+ )
|
|
|
322
|
+ if len(param.CreateTime) > 0 {
|
|
|
323
|
+ if len(param.CreateTime[0]) > 0 {
|
|
|
324
|
+ t, err := time.ParseInLocation("2006-01-02", param.CreateTime[0], time.Local)
|
|
|
325
|
+ if err != nil {
|
|
|
326
|
+ c.ResponseError(errors.New("UpdateTimeBegin 时间格式错误"))
|
|
|
327
|
+ return
|
|
|
328
|
+ }
|
|
|
329
|
+ createTimeBegin = t.Format("2006-01-02 15:04:05-07")
|
|
|
330
|
+ }
|
|
|
331
|
+ }
|
|
|
332
|
+ if len(param.CreateTime) > 1 {
|
|
|
333
|
+ if len(param.CreateTime[1]) > 0 {
|
|
|
334
|
+ t, err := time.ParseInLocation("2006-01-02", param.CreateTime[1], time.Local)
|
|
|
335
|
+ if err != nil {
|
|
|
336
|
+ c.ResponseError(errors.New("UpdateTimeEnd 时间格式错误"))
|
|
|
337
|
+ return
|
|
|
338
|
+ }
|
|
|
339
|
+ //设定时间边界
|
|
|
340
|
+ t = t.Add(86399 * time.Second)
|
|
|
341
|
+ createTimeEnd = t.Format("2006-01-02 15:04:05-07")
|
|
|
342
|
+ }
|
|
|
343
|
+ }
|
318
|
companyId := c.GetUserCompany()
|
344
|
companyId := c.GetUserCompany()
|
319
|
orderSrv := orderService.NewOrderInfoService(nil)
|
345
|
orderSrv := orderService.NewOrderInfoService(nil)
|
320
|
dataResult, column, err := orderSrv.ListOrderBonusForExcel(
|
346
|
dataResult, column, err := orderSrv.ListOrderBonusForExcel(
|
|
@@ -323,6 +349,8 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
@@ -323,6 +349,8 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
323
|
PartnerOrCode: param.SearchWord,
|
349
|
PartnerOrCode: param.SearchWord,
|
324
|
CompanyId: companyId,
|
350
|
CompanyId: companyId,
|
325
|
PartnerCategory: param.PartnerCategoryId,
|
351
|
PartnerCategory: param.PartnerCategoryId,
|
|
|
352
|
+ CreateTimeBegin: createTimeBegin,
|
|
|
353
|
+ CreateTimeEnd: createTimeEnd,
|
326
|
})
|
354
|
})
|
327
|
if err != nil {
|
355
|
if err != nil {
|
328
|
c.ResponseError(err)
|
356
|
c.ResponseError(err)
|