Commit b29eb1d9 by 庄冰

cancelredis

parent d597c89b
......@@ -49,11 +49,11 @@ class APIBase {
return system.getResultFail(...xarg);
}
if(pobj && pobj.actionType && this.queryAction.indexOf(pobj.actionType)>=0){
//查询缓存
var cacheRes = await this.redisClient.get(shaStr);
if (cacheRes) {
return JSON.parse(cacheRes);
}
// //查询缓存
// var cacheRes = await this.redisClient.get(shaStr);
// if (cacheRes) {
// return JSON.parse(cacheRes);
// }
}
var rtn = await this[methodname](pobj, query, req);
this.logClient.log(pobj, req, rtn);
......
......@@ -46,6 +46,10 @@ class NeedinfoService extends ServiceBase {
if(!ab.contact_mobile){
return system.getResultFail(-107,"联系电话不能为空!")
}
var reg =/^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(14[0-9]{1})|)+\d{8})$/;
if(ab.contact_mobile.length!=11 || !reg.test(ab.contact_mobile)){
return system.getResultFail(-108,"联系电话格式错误!")
}
var channel = await this.launchchannelDao.model.findOne({
attributes:["code","name","only_code"],
where:{code:ab.channel_code},raw:true
......
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