Commit 3167856f by 任晓松

update

parent 82afa6cf
......@@ -1239,14 +1239,14 @@ class OrderInfoService extends ServiceBase {
*/
async getOrdersStatisticsByProduct(pobj){
let ac = pobj.actionBody;
let sql = `SELECT b.itemName typeCode,a.uapp_id,count( * ) count FROM c_order_info a left join c_order_product b on a.orderNo = b.sourceOrderNo WHERE b.itemCode is not null `;
let sql = `SELECT b.channelItemName typeCode,a.uapp_id,count( * ) count FROM c_order_info a left join c_order_product b on a.orderNo = b.sourceOrderNo WHERE b.itemCode is not null `;
let whereParams = {};
if(ac.start&&ac.end){
sql += ` and a.created_at >= :start and a.created_at <= :end `;
whereParams.start = ac.start;
whereParams.end = ac.end;
}
sql += ` GROUP BY b.itemName,a.uapp_id`;
sql += ` GROUP BY b.channelItemName,a.uapp_id`;
let result = await this.customQuery(sql,whereParams);
return system.getResultSuccess(result);
}
......
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