vardataCount="select count(1) as dataCount from mc_product left join mc_product_type on mc_product.product_type_id = mc_product_type.id where mc_product.deleted_at is null and mc_product_type.deleted_at is null and mc_product.is_enabled = 1 and p_product_type_code = :p_product_type_code ";
varsql="select * from mc_product left join mc_product_type on mc_product.product_type_id = mc_product_type.id where mc_product.deleted_at is null and mc_product_type.deleted_at is null and mc_product.is_enabled = 1 and mc_product.p_product_type_code = :p_product_type_code ";
vardataCount="select count(1) as dataCount from mc_product_type where deleted_at is null and p_code = :p_code ";
varsql="select * from mc_product_type where deleted_at is null and p_code = :p_code ";
varlist=awaitthis.customQuery(sql,params);
returnRes.rows=list;
...
...
@@ -142,7 +142,6 @@ class MediaaggregationDao extends Dao {
asyncproductDetail(req){
varparams={
code:req.actionBody.code
};
varsql="select * from mc_product where deleted_at is null and is_enabled = 1 and code = :code ";
varlist=awaitthis.customQuery(sql,params);
...
...
@@ -185,13 +184,13 @@ class MediaaggregationDao extends Dao {
returnreturnRes;
}
/**
* 二级留资页热门推荐
*/
asyncsecondLevelNeedConfig(req){
varparams={
code:req.actionBody.code
};
varreturnRes={
total:0,//总记录条数
...
...
@@ -209,19 +208,52 @@ class MediaaggregationDao extends Dao {
/**
* 二级产品资质选项
* 二类产品资质选项(选取数据线索的数据)、留资表单产品列表(我需要)
*/
asyncclueMaintenance(req){
varparams={
code:req.actionBody.code,
};
varapiType=req.actionBody.apiType;
varreturnRes={
total:0,//总记录条数
rows:[]
};
vardataCount="select count(1) as dataCount from mc_clue_maintenance where deleted_at is null ";
varsql="select * from mc_clue_maintenance where deleted_at is null ";
if(apiType&&apiType=='1'){//二类产品资质选项(选取数据线索的数据)
vardataCount="select count(1) as dataCount from mc_clue_maintenance where deleted_at is null";
varsql="select * from mc_clue_maintenance where deleted_at is null";
}
if(apiType&&apiType=='2'){//留资表单产品列表(我需要)
vardataCount="select count(1) as dataCount from mc_clue_maintenance where deleted_at is null and code = :code ";
varsql="select * from mc_clue_maintenance where deleted_at is null and code = :code ";