Commit 29d95b62 by 蒋勇

d

parent 33ec3ab4
......@@ -13,6 +13,7 @@ class ProductpriceService extends ServiceBase {
where: {
sptags: { [this.db.Op.like]: "%" + spname + "%" },
pname: { [this.db.Op.like]: "%" + productname + "%" },
isEnabled:true
}, attributes: ['pname','strategyitems'], raw: true
})
//查询出地区
......@@ -27,7 +28,7 @@ class ProductpriceService extends ServiceBase {
let regionName = rpatharray[lstindex]
let regioninfo = {}
regioninfo["label"] = regionName
regioninfo["exAttr"]=r.strategyitems
let exAttrTmp=r.strategyitems
//按照名字去取地区编码
let areainfos = rs.filter(f => {
if (f.name.indexOf(regionName)>=0) {
......@@ -43,7 +44,11 @@ class ProductpriceService extends ServiceBase {
if(!cacheregions[codeval]){
cacheregions[codeval]=regioninfo
regioninfo["code"] = codeval
regioninfo["exAttr"]=[exAttrTmp]
psrtn.push(regioninfo)
}else{
let cacheObj=cacheregions[codeval]
cacheObj["exAttr"].push(exAttrTmp)
}
})
return psrtn
......
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