@@ -1338,6 +1338,25 @@ class OrderInfoService extends ServiceBase {
...
@@ -1338,6 +1338,25 @@ class OrderInfoService extends ServiceBase {
}
}
/**
/**
* 订单统计(产品维度)
* @param pobj
* @returns {Promise<void>}
*/
asyncgetOrdersStatisticsByChannel(pobj){
letac=pobj.actionBody;
letsql=`SELECT b.pathName,a.uapp_id,count( DISTINCT(a.orderNo)) count FROM c_order_info a left join c_order_product b on a.orderNo = b.sourceOrderNo WHERE a.deleted_at is null and b.pathName is not null `;
letwhereParams={};
if(ac.start&&ac.end){
sql+=` and a.created_at >= :start and a.created_at <= :end `;
@@ -232,6 +232,25 @@ class NeedinfoService extends ServiceBase {
...
@@ -232,6 +232,25 @@ class NeedinfoService extends ServiceBase {
}
}
/**
/**
* 需求统计(产品类型) 总数
* @param pobj
* @returns {Promise<void>}
*/
asyncgetStatisticsByChannel(pobj){
letac=pobj.actionBody;
letsql=`select typeName typeCode,uapp_id,count(*) count from n_need_info where typeName is not null AND (channelTypeName <> "商标交易" or channelTypeName is not null) `;
letwhereParams={};
if(ac.start&&ac.end){
sql+=` and created_at >= :start and created_at <= :end `;