Commit 6620efd5 by xsren@gongsibao.com

update

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