...
|
...
|
@@ -293,11 +293,12 @@ func (c *OrderDividendController) EditOrderRemarkBonus() { |
|
|
|
|
|
func (c *OrderDividendController) ListOrderBonusForExcel() {
|
|
|
type Parameter struct {
|
|
|
SearchWord string `json:"searchWord"`
|
|
|
OrderType int `json:"orderType"`
|
|
|
PageSize int `json:"pageSize"`
|
|
|
PageNumber int `json:"pageNumber"`
|
|
|
PartnerCategoryId int `json:"partnerCategoryId"`
|
|
|
SearchWord string `json:"searchWord"`
|
|
|
OrderType int `json:"orderType"`
|
|
|
PageSize int `json:"pageSize"`
|
|
|
PageNumber int `json:"pageNumber"`
|
|
|
PartnerCategoryId int `json:"partnerCategoryId"`
|
|
|
CreateTime []string `json:"createTime"`
|
|
|
}
|
|
|
var (
|
|
|
param Parameter
|
...
|
...
|
@@ -314,7 +315,32 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
|
c.ResponseError(errors.New("参数异常"))
|
|
|
return
|
|
|
}
|
|
|
|
|
|
var (
|
|
|
createTimeBegin string
|
|
|
createTimeEnd string
|
|
|
)
|
|
|
if len(param.CreateTime) > 0 {
|
|
|
if len(param.CreateTime[0]) > 0 {
|
|
|
t, err := time.ParseInLocation("2006-01-02", param.CreateTime[0], time.Local)
|
|
|
if err != nil {
|
|
|
c.ResponseError(errors.New("UpdateTimeBegin 时间格式错误"))
|
|
|
return
|
|
|
}
|
|
|
createTimeBegin = t.Format("2006-01-02 15:04:05-07")
|
|
|
}
|
|
|
}
|
|
|
if len(param.CreateTime) > 1 {
|
|
|
if len(param.CreateTime[1]) > 0 {
|
|
|
t, err := time.ParseInLocation("2006-01-02", param.CreateTime[1], time.Local)
|
|
|
if err != nil {
|
|
|
c.ResponseError(errors.New("UpdateTimeEnd 时间格式错误"))
|
|
|
return
|
|
|
}
|
|
|
//设定时间边界
|
|
|
t = t.Add(86399 * time.Second)
|
|
|
createTimeEnd = t.Format("2006-01-02 15:04:05-07")
|
|
|
}
|
|
|
}
|
|
|
companyId := c.GetUserCompany()
|
|
|
orderSrv := orderService.NewOrderInfoService(nil)
|
|
|
dataResult, column, err := orderSrv.ListOrderBonusForExcel(
|
...
|
...
|
@@ -323,6 +349,8 @@ func (c *OrderDividendController) ListOrderBonusForExcel() { |
|
|
PartnerOrCode: param.SearchWord,
|
|
|
CompanyId: companyId,
|
|
|
PartnerCategory: param.PartnerCategoryId,
|
|
|
CreateTimeBegin: createTimeBegin,
|
|
|
CreateTimeEnd: createTimeEnd,
|
|
|
})
|
|
|
if err != nil {
|
|
|
c.ResponseError(err)
|
...
|
...
|
|