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
18595489
Commit
18595489
authored
Jun 17, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-manage' of gitlab.gongsibao.com:jiangyong/zhichan into center-manage
parents
2110e80e
825db4f9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
1 deletions
+39
-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/db/models/common/company.js
+4
-0
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 @
18595489
...
...
@@ -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 @
18595489
...
...
@@ -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 @
18595489
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 @
18595489
...
...
@@ -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/db/models/common/company.js
View file @
18595489
...
...
@@ -3,6 +3,10 @@ const settings = require("../../../../config/settings");
const
appconfig
=
system
.
getSysConfig
();
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"company"
,
{
code
:{
//存放简码
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
name
:
{
type
:
DataTypes
.
STRING
,
allowNull
:
false
,
...
...
center-manage/app/base/service/impl/auth/userSve.js
View file @
18595489
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