...
|
...
|
@@ -270,33 +270,33 @@ func (dao OrderBaseDao) OrderListForExcel(companyId int64, partnerOrCode string, |
|
|
if len(partnerOrCode) > 0 {
|
|
|
like := "%" + partnerOrCode + "%"
|
|
|
params = append(params, like, like, like)
|
|
|
sqlstr += " AND (t1.order_code like ? OR t1.delivery_code like ? OR t2.partner_name like ? )"
|
|
|
sqlstr += " AND (t1.order_code like ? OR t1.delivery_code like ? OR t2.partner_name like ? ) "
|
|
|
}
|
|
|
|
|
|
if partnerCategory > 0 {
|
|
|
params = append(params, partnerCategory)
|
|
|
sqlstr += ` AND t1.partner_category@>'{"id":?}'`
|
|
|
sqlstr += ` AND t1.partner_category@>'{"id":?}' `
|
|
|
}
|
|
|
|
|
|
if len(updateTime[0]) > 0 {
|
|
|
params = append(params, updateTime[0])
|
|
|
sqlstr += ` AND t1.update_time>=?`
|
|
|
sqlstr += ` AND t1.update_time>=? `
|
|
|
}
|
|
|
|
|
|
if len(updateTime[1]) > 0 {
|
|
|
params = append(params, updateTime[1])
|
|
|
sqlstr += ` AND t1.update_time<=?`
|
|
|
sqlstr += ` AND t1.update_time<=? `
|
|
|
}
|
|
|
|
|
|
if len(createTime[0]) > 0 {
|
|
|
params = append(params, createTime[0])
|
|
|
sqlstr += `AND t1.create_time>=?`
|
|
|
sqlstr += ` AND t1.create_time>=? `
|
|
|
}
|
|
|
if len(createTime[1]) > 0 {
|
|
|
params = append(params, createTime[1])
|
|
|
sqlstr += ` AND t1.create_time<=?`
|
|
|
sqlstr += ` AND t1.create_time<=? `
|
|
|
}
|
|
|
sqlstr += ` t1.create_time DESC limit 10000`
|
|
|
sqlstr += ` ORDER BY t1.create_time DESC limit 10000 `
|
|
|
tx := dao.transactionContext.GetDB()
|
|
|
_, err = tx.Query(&result, sqlstr, params...)
|
|
|
if err != nil {
|
...
|
...
|
|