|
@@ -292,16 +292,18 @@ func (c *OrderDividendController) EditOrderRemarkBonus() { |
|
@@ -292,16 +292,18 @@ func (c *OrderDividendController) EditOrderRemarkBonus() { |
292
|
}
|
292
|
}
|
293
|
|
293
|
|
294
|
func (c *OrderDividendController) ListOrderBonusForExcel() {
|
294
|
func (c *OrderDividendController) ListOrderBonusForExcel() {
|
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"`
|
|
|
301
|
- CreateTime []string `json:"createTime"`
|
|
|
302
|
- }
|
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"`
|
|
|
301
|
+ // CreateTime []string `json:"createTime"`
|
|
|
302
|
+ //}
|
|
|
303
|
+
|
303
|
var (
|
304
|
var (
|
304
|
- param Parameter
|
305
|
+ //param Parameter
|
|
|
306
|
+ param orderQuery.ListOrderBonusForExcelQuery
|
305
|
err error
|
307
|
err error
|
306
|
)
|
308
|
)
|
307
|
if err = c.BindJsonData(¶m); err != nil {
|
309
|
if err = c.BindJsonData(¶m); err != nil {
|
|
@@ -309,9 +311,14 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
@@ -309,9 +311,14 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
309
|
c.ResponseError(errors.New("json数据解析失败"))
|
311
|
c.ResponseError(errors.New("json数据解析失败"))
|
310
|
return
|
312
|
return
|
311
|
}
|
313
|
}
|
312
|
- if !(param.OrderType == 0 ||
|
|
|
313
|
- param.OrderType == domain.OrderReal ||
|
|
|
314
|
- param.OrderType == domain.OrderTypeBestShop) {
|
314
|
+ if param.Type != "ORDER_DIVIDEND" {
|
|
|
315
|
+ logs.Error(err)
|
|
|
316
|
+ c.ResponseError(errors.New("错误的操作类型"))
|
|
|
317
|
+ return
|
|
|
318
|
+ }
|
|
|
319
|
+ if !(param.Where.OrderType == 0 ||
|
|
|
320
|
+ param.Where.OrderType == domain.OrderReal ||
|
|
|
321
|
+ param.Where.OrderType == domain.OrderTypeBestShop) {
|
315
|
c.ResponseError(errors.New("参数异常"))
|
322
|
c.ResponseError(errors.New("参数异常"))
|
316
|
return
|
323
|
return
|
317
|
}
|
324
|
}
|
|
@@ -319,9 +326,9 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
@@ -319,9 +326,9 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
319
|
createTimeBegin string
|
326
|
createTimeBegin string
|
320
|
createTimeEnd string
|
327
|
createTimeEnd string
|
321
|
)
|
328
|
)
|
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)
|
329
|
+ if len(param.Where.CreateTime) > 0 {
|
|
|
330
|
+ if len(param.Where.CreateTime[0]) > 0 {
|
|
|
331
|
+ t, err := time.ParseInLocation("2006-01-02", param.Where.CreateTime[0], time.Local)
|
325
|
if err != nil {
|
332
|
if err != nil {
|
326
|
c.ResponseError(errors.New("UpdateTimeBegin 时间格式错误"))
|
333
|
c.ResponseError(errors.New("UpdateTimeBegin 时间格式错误"))
|
327
|
return
|
334
|
return
|
|
@@ -329,9 +336,9 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
@@ -329,9 +336,9 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
329
|
createTimeBegin = t.Format("2006-01-02 15:04:05-07")
|
336
|
createTimeBegin = t.Format("2006-01-02 15:04:05-07")
|
330
|
}
|
337
|
}
|
331
|
}
|
338
|
}
|
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)
|
339
|
+ if len(param.Where.CreateTime) > 1 {
|
|
|
340
|
+ if len(param.Where.CreateTime[1]) > 0 {
|
|
|
341
|
+ t, err := time.ParseInLocation("2006-01-02", param.Where.CreateTime[1], time.Local)
|
335
|
if err != nil {
|
342
|
if err != nil {
|
336
|
c.ResponseError(errors.New("UpdateTimeEnd 时间格式错误"))
|
343
|
c.ResponseError(errors.New("UpdateTimeEnd 时间格式错误"))
|
337
|
return
|
344
|
return
|
|
@@ -345,10 +352,10 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
@@ -345,10 +352,10 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
345
|
orderSrv := orderService.NewOrderInfoService(nil)
|
352
|
orderSrv := orderService.NewOrderInfoService(nil)
|
346
|
dataResult, column, err := orderSrv.ListOrderBonusForExcel(
|
353
|
dataResult, column, err := orderSrv.ListOrderBonusForExcel(
|
347
|
orderQuery.ListOrderBonusQuery{
|
354
|
orderQuery.ListOrderBonusQuery{
|
348
|
- OrderType: param.OrderType,
|
|
|
349
|
- PartnerOrCode: param.SearchWord,
|
355
|
+ OrderType: param.Where.OrderType,
|
|
|
356
|
+ PartnerOrCode: param.Where.SearchWord,
|
350
|
CompanyId: companyId,
|
357
|
CompanyId: companyId,
|
351
|
- PartnerCategory: param.PartnerCategoryId,
|
358
|
+ PartnerCategory: param.Where.PartnerCategoryId,
|
352
|
CreateTimeBegin: createTimeBegin,
|
359
|
CreateTimeBegin: createTimeBegin,
|
353
|
CreateTimeEnd: createTimeEnd,
|
360
|
CreateTimeEnd: createTimeEnd,
|
354
|
})
|
361
|
})
|