sql+=` and json_extract(deliveryContent,'$.deliveryUpdated') between '${startTime}' and '${endTime}'`;
sqlCount+=` and json_extract(deliveryContent,'$.deliveryUpdated') between '${startTime}' and '${endTime}'`;
sql+=` and json_extract(deliveryContent,'$.deliveryUpdated') >= '${startTime}' and json_extract(deliveryContent,'$.deliveryUpdated') <= '${endTime}'`;
sqlCount+=` and json_extract(deliveryContent,'$.deliveryUpdated') between '${startTime}' and json_extract(deliveryContent,'$.deliveryUpdated') <= '${endTime}'`;
}
sql+=` order by i.id desc LIMIT ${pageSize} OFFSET ${from}`;
...
...
@@ -367,7 +340,7 @@ class OrderInfoService extends ServiceBase {
letsql=`select o.serviceNo,json_extract(officialInfo,'$.applyUser') applyUser,json_extract(officialInfo,'$.askforId') askforId,json_extract(officialInfo,'$.tmType') tmType,json_extract(officialInfo,'$.tmPicUrl') tmPicUrl,json_extract(officialInfo,'$.applicantName') applicantName,json_extract(officialInfo,'$.fileType') fileType from c_order_info i left join c_delivery_official o on i.orderNo = o.serviceNo where i.uapp_id = ${pobj.appInfo.uapp_id}`;
letsql=`select o.serviceNo,json_extract(officialInfo,'$.dir') dir,json_extract(officialInfo,'$.askforId') askforId,json_extract(officialInfo,'$.tradeType') tmType,json_extract(officialInfo,'$.tradeImg') tmPicUrl,json_extract(officialInfo,'$.applicantName') applicantName,json_extract(officialInfo,'$.fileType') fileType,json_extract(officialInfo,'$.received_at') received_at from c_order_info i left join c_delivery_official o on i.orderNo = o.serviceNo where i.uapp_id = ${pobj.appInfo.uapp_id}`;
letsqlCount=`select count(1) as dataCount from c_order_info i left join c_delivery_official o on i.orderNo = o.serviceNo where i.uapp_id = ${pobj.appInfo.uapp_id}`
if(pobj.userInfo.channel_userid){
...
...
@@ -375,8 +348,8 @@ class OrderInfoService extends ServiceBase {
sqlCount+=` and o.channelUserId='${pobj.userInfo.channel_userid}'`;
}
if(actionBody.orderNo){
sql+=` and serviceNo='${actionBody.orderNo}'`;
sqlCount+=` and serviceNo='${actionBody.orderNo}'`;
sql+=` and o.serviceNo='${actionBody.orderNo}'`;
sqlCount+=` and o.serviceNo='${actionBody.orderNo}'`;
}
if(actionBody.askforId){
sql+=` and json_extract(officialInfo,'$.askforId')='${actionBody.askforId}'`;
...
...
@@ -392,8 +365,8 @@ class OrderInfoService extends ServiceBase {