Commit 6620efd5 by xsren@gongsibao.com

update

parent b97a208b
......@@ -33,7 +33,7 @@ class NameAPI extends WEBBase{
case "createName"://起名
opResult =await this.addOrderDelivery(pobj,pobj.actionBody);
break;
case "getNameDetail":
case "getNameDetail"://详情
opResult = await this.getNameDetail(pobj);
break;
default:
......@@ -50,7 +50,7 @@ class NameAPI extends WEBBase{
async getCache(){
let cacheResult = {};
cacheResult.cache = cacheJson
return cacheResult;
return system.getResult(cacheResult);
}
/**
......@@ -63,13 +63,13 @@ class NameAPI extends WEBBase{
let result = await this.redisClient.get(key)
if(result){
preResult.preference = JSON.parse(result);
return preResult;
return system.getResult(preResult);
}else{
const data = await this.restPostUrl({},this.centerCacheUrl+"preference_select");
if(data.code == 200){
await this.redisClient.set(key,JSON.stringify(data.data),2*3600)
preResult.preference = data.data
return preResult;
return system.getResult(preResult);
}
}
}
......
......@@ -47,7 +47,7 @@ class UtilsProductService extends AppServiceBase {
product_id:item.product_id
}
let re = await this.restPostUrl(pobj,url);
item.price = re.data.price;
item.price = re.data ? re.data.price : 0;
}
return list;
}
......
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