Commit 830166e3 by 任晓松

update

parent 094f5222
......@@ -157,7 +157,7 @@ class NeedinfoService extends ServiceBase {
whereParam.end = ac.end;
}
if(ac.type_name){
sql += ` AND typeCode = :type_name`;
sql += ` AND typeName = :type_name`;
whereParam.type_name = ac.type_name;
}
if(ac.status){
......@@ -250,7 +250,7 @@ class NeedinfoService extends ServiceBase {
*/
async getStatisticsByCity(pobj){
let ac = pobj.actionBody;
let sql = `select typeCode,province,count(*) count from n_need_info where province is not null and typeCode is not null AND (channelTypeName <> "商标交易" or channelTypeName is null) `;
let sql = `select typeName,province,count(*) count from n_need_info where province is not null and typeCode is not null AND (channelTypeName <> "商标交易" or channelTypeName is null) `;
let whereParams = {};
if(ac.start&&ac.end){
sql += ` and created_at >= :start and created_at <= :end `;
......@@ -258,14 +258,14 @@ class NeedinfoService extends ServiceBase {
whereParams.end = ac.end;
}
if(ac.type_name){
sql += ` and typeCode = :typeCode`;
whereParams.typeCode = ac.type_name;
sql += ` and typeName = :typeName`;
whereParams.typeName = ac.type_name;
}
if(ac.uapp_id){
sql += ` and uapp_id = :uapp_id`;
whereParams.uapp_id = ac.uapp_id;
}
sql += ` GROUP BY province,typeCode`;
sql += ` GROUP BY province,typeName`;
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