Commit a7e95189 by 任晓松

update

parent a87f54d3
...@@ -1246,19 +1246,19 @@ class OrderInfoService extends ServiceBase { ...@@ -1246,19 +1246,19 @@ class OrderInfoService extends ServiceBase {
*/ */
async getOrdersComparison(pobj){ async getOrdersComparison(pobj){
let ab =pobj.actionBody; let ab =pobj.actionBody;
let sql1 = `select count(*) count from c_order_info where deleted_at is null `; let sql1 = `select count(*) count from c_order_info a left join c_order_product b on a.orderNo = b.sourceOrderNo where a.deleted_at is null `;
let whereParams = {}; let whereParams = {};
if(ab.startNow&&ab.endNow){ if(ab.startNow&&ab.endNow){
sql1 += ` and created_at >= :start and created_at <= :end`; sql1 += ` and a.created_at >= :start and a.created_at <= :end`;
whereParams.start = ab.startNow; whereParams.start = ab.startNow;
whereParams.end = ab.endNow; whereParams.end = ab.endNow;
} }
if(ab.uapp_id){ if(ab.uapp_id){
sql1 += ` and uapp_id = :uapp_id`; sql1 += ` and a.uapp_id = :uapp_id`;
whereParams.uapp_id = ab.uapp_id; whereParams.uapp_id = ab.uapp_id;
} }
if(ab.type_code){ if(ab.type_code){
sql1 += ` and typeCode = :type_code`; sql1 += ` and itemCode = :type_code`;
whereParams.type_code = ab.type_code; whereParams.type_code = ab.type_code;
} }
let totalRet1 = await this.customQuery(sql1,whereParams); let totalRet1 = await this.customQuery(sql1,whereParams);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment