作者 唐旭辉

更新

... ... @@ -1056,7 +1056,7 @@ func (service OrderInfoService) buildOrderBestshopInfoData(orderBase *domain.Ord
order := map[string]interface{}{
"orderId": orderBase.Id,
"orderState": orderBestshop.OrderState,
"customers": orderBestshop.BuyerName,
"customers": orderBase.Buyer.BuyerName,
"address": orderBestshop.BuyerAddress,
"remarks": orderBestshop.BuyerRemark,
"partner": orderBase.PartnerInfo.PartnerName,
... ...
... ... @@ -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 {
... ...