Commit e9c9dddf by Sxy

fix: 代码规范

parent 4de7ea92
...@@ -12,17 +12,17 @@ class CachSearchesCtl extends CtlBase { ...@@ -12,17 +12,17 @@ class CachSearchesCtl extends CtlBase {
async findAndCountAll(pobj, gobj, req) { async findAndCountAll(pobj, gobj, req) {
pobj.opCacheUrl = req.session.app.opCacheUrl; pobj.opCacheUrl = req.session.app.opCacheUrl;
pobj.appid = req.appid; pobj.appid = req.appid;
let result = await this.service.findAndCountAllCache(pobj); const result = await this.service.findAndCountAllCache(pobj);
return result; return result;
} }
async delCache(queryobj, qobj, req) { async delCache(queryobj, qobj, req) {
const param = { key: queryobj.key, appid: req.appid, opCacheUrl: req.session.app.opCacheUrl }; const param = { key: queryobj.key, appid: req.appid, opCacheUrl: req.session.app.opCacheUrl };
let result = await this.service.delCache(param); const result = await this.service.delCache(param);
return result; return result;
} }
async clearAllCache(queryobj, qobj, req) { async clearAllCache(queryobj, qobj, req) {
const param = { appid: req.appid, opCacheUrl: req.session.app.opCacheUrl }; const param = { appid: req.appid, opCacheUrl: req.session.app.opCacheUrl };
let result = await this.service.clearAllCache(param); const result = await this.service.clearAllCache(param);
return result; return result;
} }
} }
......
...@@ -6,12 +6,6 @@ class CacheLocker extends CacheBase { ...@@ -6,12 +6,6 @@ class CacheLocker extends CacheBase {
super(); super();
this.prefix = 'locker_'; this.prefix = 'locker_';
} }
desc() {
}
prefix() {
}
async init(tradekey) { async init(tradekey) {
const key = this.prefix + tradekey; const key = this.prefix + tradekey;
return this.redisClient.rpushWithEx(key, '1', 1800); return this.redisClient.rpushWithEx(key, '1', 1800);
......
...@@ -68,42 +68,6 @@ class DbFactory { ...@@ -68,42 +68,6 @@ class DbFactory {
console.log('init models....'); console.log('init models....');
} }
async initRelations() { async initRelations() {
// this.db.models.dataauth.belongsTo(this.db.models.user, { constraints: false, });
// /*建立用户和角色之间的关系*/
// this.db.models.user.belongsToMany(this.db.models.role, { as: "Roles", through: 'p_userrole', constraints: false, });
// this.db.models.role.belongsToMany(this.db.models.user, { as: "Users", through: 'p_userrole', constraints: false, });
/* 组织机构自引用*/
// this.db.models.org.belongsTo(this.db.models.org,{constraints: false,});
// this.db.models.org.hasMany(this.db.models.org,{constraints: false,});
// 组织机构和角色是多对多关系,建立兼职岗位,给岗位赋予多个角色,从而同步修改用户的角色
// 通过岗位接口去修改用户的角色
// this.db.models.role.belongsToMany(this.db.models.org,{through: this.db.models.orgrole,constraints: false,});
// this.db.models.org.belongsToMany(this.db.models.role,{through: this.db.models.orgrole,constraints: false,});
// 组织机构和用户是1对多,
// this.db.models.user.belongsTo(this.db.models.org,{constraints: false,});
// this.db.models.org.hasMany(this.db.models.user,{constraints: false,});
// this.db.models.user.belongsTo(this.db.models.app, { constraints: false, });
// this.db.models.role.belongsTo(this.db.models.app, { constraints: false, });
// this.db.models.auth.belongsTo(this.db.models.app, { constraints: false, });
// this.db.models.auth.belongsTo(this.db.models.company, { constraints: false, });
// this.db.models.auth.belongsTo(this.db.models.role, { constraints: false, });
// this.db.models.app.belongsTo(this.db.models.user, { as: "creator", constraints: false, });
// this.db.models.user.belongsTo(this.db.models.company, { constraints: false, });
// this.db.models.role.belongsTo(this.db.models.company, { constraints: false, });
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
// this.db.models.route.belongsTo(this.db.models.app, { constraints: false, });
// this.db.models.plugin.belongsTo(this.db.models.app, { constraints: false, });
// 商机表 1:1 方案表 // 商机表 1:1 方案表
this.db.models.scheme.belongsTo(this.db.models.bizopt, { constraints: false }); this.db.models.scheme.belongsTo(this.db.models.bizopt, { constraints: false });
this.db.models.bizopt.hasOne(this.db.models.scheme, { constraints: false }); this.db.models.bizopt.hasOne(this.db.models.scheme, { constraints: false });
...@@ -138,18 +102,6 @@ class DbFactory { ...@@ -138,18 +102,6 @@ class DbFactory {
// }); // });
// 同步模型 // 同步模型
if (settings.env == 'dev') { if (settings.env == 'dev') {
// console.log(pa);
// pconfigObjs.forEach(p=>{
// console.log(p.get({plain:true}));
// });
// await this.db.models.user.create({nickName:"dev","description":"test user",openId:"testopenid",unionId:"testunionid"})
// .then(function(user){
// var acc=that.db.models.account.build({unionId:"testunionid",nickName:"dev"});
// acc.save().then(a=>{
// user.setAccount(a);
// });
// });
} }
return this.db; return this.db;
} }
......
...@@ -84,7 +84,8 @@ function buildValue(value, cryptStr) { ...@@ -84,7 +84,8 @@ function buildValue(value, cryptStr) {
})); }));
} }
if (newValue.proposerInfo.businessInformation) { if (newValue.proposerInfo.businessInformation) {
newValue.proposerInfo.businessInformation.fixedTelephone = cryptStr(newValue.proposerInfo.businessInformation.fixedTelephone); newValue.proposerInfo.businessInformation.fixedTelephone =
cryptStr(newValue.proposerInfo.businessInformation.fixedTelephone);
} }
} }
if (newValue.shareholderData) { if (newValue.shareholderData) {
......
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