作者 唐旭辉

修复:bug-15 ,bug-20

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