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
825db4f9
Commit
825db4f9
authored
Jun 16, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
0b795957
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
1 deletions
+35
-1
center-manage/app/base/api/impl/auth/accessAuth.js
+8
-0
center-manage/app/base/controller/impl/auth/userCtl.js
+1
-0
center-manage/app/base/db/cache/clientBindBizUserCache.js
+22
-0
center-manage/app/base/db/impl/common/connection.js
+4
-1
center-manage/app/base/service/impl/auth/userSve.js
+0
-0
No files found.
center-manage/app/base/api/impl/auth/accessAuth.js
View file @
825db4f9
...
...
@@ -25,6 +25,14 @@ class AccessAuthAPI extends APIBase {
let
appkey
=
req
.
xctx
.
appkey
;
}
async
getBizUserForBizChance
(
p
,
q
,
req
){
let
s
=
await
this
.
userSve
.
getBizUserForBizChance
(
p
.
clientMobile
,
p
.
spName
,
p
.
productCatName
)
return
system
.
getResult
(
s
)
}
async
getBizUserForDelivery
(
p
,
q
,
req
){
let
s
=
await
this
.
userSve
.
getBizUserForDelivery
(
p
.
clientMobile
,
p
.
spName
,
p
.
productCatName
,
p
.
skucode
)
return
system
.
getResult
(
s
)
}
classDesc
()
{
return
{
groupName
:
"auth"
,
...
...
center-manage/app/base/controller/impl/auth/userCtl.js
View file @
825db4f9
...
...
@@ -123,5 +123,6 @@ class UserCtl extends CtlBase {
let
rtn
=
await
this
.
service
.
sendVCode
(
pobj
,
qobj
);
return
system
.
getResult
(
rtn
);
}
}
module
.
exports
=
UserCtl
;
center-manage/app/base/db/cache/clientBindBizUserCache.js
0 → 100644
View file @
825db4f9
const
CacheBase
=
require
(
"../cache.base"
);
const
system
=
require
(
"../../system"
);
const
settings
=
require
(
"../../../config/settings"
);
class
ClientBindBizUserCache
extends
CacheBase
{
constructor
(){
super
();
}
isdebug
(){
return
settings
.
env
==
"dev"
;
}
desc
(){
return
"缓存本地应用对象"
;
}
prefix
(){
return
"g_client2bizuser_"
}
async
buildCacheVal
(
cachekey
,
inputkey
,
val
,
ex
,
...
items
)
{
return
JSON
.
stringify
(
val
);
}
}
module
.
exports
=
ClientBindBizUserCache
;
\ No newline at end of file
center-manage/app/base/db/impl/common/connection.js
View file @
825db4f9
...
...
@@ -56,6 +56,9 @@ class DbFactory{
this
.
db
.
models
.
user
.
belongsTo
(
this
.
db
.
models
.
company
,{
constraints
:
false
,});
this
.
db
.
models
.
company
.
hasMany
(
this
.
db
.
models
.
user
,{
as
:
'us'
,
constraints
:
false
,});
this
.
db
.
models
.
role
.
belongsTo
(
this
.
db
.
models
.
company
,
{
constraints
:
false
,});
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
...
...
@@ -77,7 +80,7 @@ class DbFactory{
this
.
db
.
models
.
productprice
.
belongsTo
(
this
.
db
.
models
.
company
,{
constraints
:
false
,});
//成本项目属于productprice
this
.
db
.
models
.
productcost
.
belongsTo
(
this
.
db
.
models
.
productprice
,{
constraints
:
false
,});
this
.
db
.
models
.
productprice
.
hasMany
(
this
.
db
.
models
.
productcost
,{
as
:
"costs"
,
constraints
:
false
,});
}
//async getCon(){,用于使用替换table模型内字段数据使用
getCon
(){
...
...
center-manage/app/base/service/impl/auth/userSve.js
View file @
825db4f9
This diff is collapsed.
Click to expand it.
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