作者 唐旭辉

修复:bug-15 ,bug-20

@@ -84,7 +84,7 @@ func (dao OrderBaseDao) OrderBonusListByCondition(companyId int64, orderType int @@ -84,7 +84,7 @@ func (dao OrderBaseDao) OrderBonusListByCondition(companyId int64, orderType int
84 return q, nil 84 return q, nil
85 }) 85 })
86 } 86 }
87 - query = query.Order("order_base.update_time DESC"). 87 + query = query.Order("order_base.create_time DESC").
88 Offset(offset). 88 Offset(offset).
89 Limit(limit) 89 Limit(limit)
90 90
@@ -167,7 +167,7 @@ func (dao OrderBaseDao) OrderBonusListForExcel(companyId int64, orderType int, p @@ -167,7 +167,7 @@ func (dao OrderBaseDao) OrderBonusListForExcel(companyId int64, orderType int, p
167 sqlStr += ` AND t1.partner_category @>'{"id":?}'` 167 sqlStr += ` AND t1.partner_category @>'{"id":?}'`
168 param = append(param, partnerCategory) 168 param = append(param, partnerCategory)
169 } 169 }
170 - sqlStr += ` ORDER BY t1.update_time DESC limit 10000 ` 170 + sqlStr += ` ORDER BY t1.create_time DESC limit 10000 `
171 tx := dao.transactionContext.GetDB() 171 tx := dao.transactionContext.GetDB()
172 _, err = tx.Query(&result, sqlStr, param...) 172 _, err = tx.Query(&result, sqlStr, param...)
173 173
@@ -264,7 +264,7 @@ func (dao OrderBaseDao) OrderListForExcel(companyId int64, partnerOrCode string, @@ -264,7 +264,7 @@ func (dao OrderBaseDao) OrderListForExcel(companyId int64, partnerOrCode string,
264 ,t2.partner_name 264 ,t2.partner_name
265 FROM "order_base" AS t1 265 FROM "order_base" AS t1
266 LEFT JOIN partner_info as t2 ON t1.partner_id=t2.id 266 LEFT JOIN partner_info as t2 ON t1.partner_id=t2.id
267 - WHERE 1=1 AND t1.order_type = 1 267 + WHERE 1=1 AND t1.order_type = 1 AND t1.company_id=?
268 ` 268 `
269 params := []interface{}{companyId} 269 params := []interface{}{companyId}
270 if len(partnerOrCode) > 0 { 270 if len(partnerOrCode) > 0 {