Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
e9c9dddf
Commit
e9c9dddf
authored
Oct 20, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 代码规范
parent
4de7ea92
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
58 deletions
+5
-58
icp-deliver/app/base/controller/impl/common/cachsearchesCtl.js
+3
-3
icp-deliver/app/base/db/cache/CacheLocker.js
+0
-6
icp-deliver/app/base/db/impl/common/connection.js
+0
-48
icp-deliver/app/base/db/models/delivery/cache_information.js
+2
-1
No files found.
icp-deliver/app/base/controller/impl/common/cachsearchesCtl.js
View file @
e9c9dddf
...
...
@@ -12,17 +12,17 @@ class CachSearchesCtl extends CtlBase {
async
findAndCountAll
(
pobj
,
gobj
,
req
)
{
pobj
.
opCacheUrl
=
req
.
session
.
app
.
opCacheUrl
;
pobj
.
appid
=
req
.
appid
;
le
t
result
=
await
this
.
service
.
findAndCountAllCache
(
pobj
);
cons
t
result
=
await
this
.
service
.
findAndCountAllCache
(
pobj
);
return
result
;
}
async
delCache
(
queryobj
,
qobj
,
req
)
{
const
param
=
{
key
:
queryobj
.
key
,
appid
:
req
.
appid
,
opCacheUrl
:
req
.
session
.
app
.
opCacheUrl
};
le
t
result
=
await
this
.
service
.
delCache
(
param
);
cons
t
result
=
await
this
.
service
.
delCache
(
param
);
return
result
;
}
async
clearAllCache
(
queryobj
,
qobj
,
req
)
{
const
param
=
{
appid
:
req
.
appid
,
opCacheUrl
:
req
.
session
.
app
.
opCacheUrl
};
le
t
result
=
await
this
.
service
.
clearAllCache
(
param
);
cons
t
result
=
await
this
.
service
.
clearAllCache
(
param
);
return
result
;
}
}
...
...
icp-deliver/app/base/db/cache/CacheLocker.js
View file @
e9c9dddf
...
...
@@ -6,12 +6,6 @@ class CacheLocker extends CacheBase {
super
();
this
.
prefix
=
'locker_'
;
}
desc
()
{
}
prefix
()
{
}
async
init
(
tradekey
)
{
const
key
=
this
.
prefix
+
tradekey
;
return
this
.
redisClient
.
rpushWithEx
(
key
,
'1'
,
1800
);
...
...
icp-deliver/app/base/db/impl/common/connection.js
View file @
e9c9dddf
...
...
@@ -68,42 +68,6 @@ class DbFactory {
console
.
log
(
'init models....'
);
}
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 方案表
this
.
db
.
models
.
scheme
.
belongsTo
(
this
.
db
.
models
.
bizopt
,
{
constraints
:
false
});
this
.
db
.
models
.
bizopt
.
hasOne
(
this
.
db
.
models
.
scheme
,
{
constraints
:
false
});
...
...
@@ -138,18 +102,6 @@ class DbFactory {
// });
// 同步模型
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
;
}
...
...
icp-deliver/app/base/db/models/delivery/cache_information.js
View file @
e9c9dddf
...
...
@@ -84,7 +84,8 @@ function buildValue(value, cryptStr) {
}));
}
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment