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
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
243 additions
and
53 deletions
+243
-53
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
+204
-52
No files found.
center-manage/app/base/api/impl/auth/accessAuth.js
View file @
18595489
...
@@ -25,6 +25,14 @@ class AccessAuthAPI extends APIBase {
...
@@ -25,6 +25,14 @@ class AccessAuthAPI extends APIBase {
let
appkey
=
req
.
xctx
.
appkey
;
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
()
{
classDesc
()
{
return
{
return
{
groupName
:
"auth"
,
groupName
:
"auth"
,
...
...
center-manage/app/base/controller/impl/auth/userCtl.js
View file @
18595489
...
@@ -123,5 +123,6 @@ class UserCtl extends CtlBase {
...
@@ -123,5 +123,6 @@ class UserCtl extends CtlBase {
let
rtn
=
await
this
.
service
.
sendVCode
(
pobj
,
qobj
);
let
rtn
=
await
this
.
service
.
sendVCode
(
pobj
,
qobj
);
return
system
.
getResult
(
rtn
);
return
system
.
getResult
(
rtn
);
}
}
}
}
module
.
exports
=
UserCtl
;
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{
...
@@ -56,6 +56,9 @@ class DbFactory{
this
.
db
.
models
.
user
.
belongsTo
(
this
.
db
.
models
.
company
,{
constraints
:
false
,});
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
.
role
.
belongsTo
(
this
.
db
.
models
.
company
,
{
constraints
:
false
,});
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
...
@@ -77,7 +80,7 @@ class DbFactory{
...
@@ -77,7 +80,7 @@ class DbFactory{
this
.
db
.
models
.
productprice
.
belongsTo
(
this
.
db
.
models
.
company
,{
constraints
:
false
,});
this
.
db
.
models
.
productprice
.
belongsTo
(
this
.
db
.
models
.
company
,{
constraints
:
false
,});
//成本项目属于productprice
//成本项目属于productprice
this
.
db
.
models
.
productcost
.
belongsTo
(
this
.
db
.
models
.
productprice
,{
constraints
:
false
,});
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模型内字段数据使用
//async getCon(){,用于使用替换table模型内字段数据使用
getCon
(){
getCon
(){
...
...
center-manage/app/base/db/models/common/company.js
View file @
18595489
...
@@ -3,6 +3,10 @@ const settings = require("../../../../config/settings");
...
@@ -3,6 +3,10 @@ const settings = require("../../../../config/settings");
const
appconfig
=
system
.
getSysConfig
();
const
appconfig
=
system
.
getSysConfig
();
module
.
exports
=
(
db
,
DataTypes
)
=>
{
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"company"
,
{
return
db
.
define
(
"company"
,
{
code
:{
//存放简码
type
:
DataTypes
.
STRING
,
allowNull
:
true
,
},
name
:
{
name
:
{
type
:
DataTypes
.
STRING
,
type
:
DataTypes
.
STRING
,
allowNull
:
false
,
allowNull
:
false
,
...
...
center-manage/app/base/service/impl/auth/userSve.js
View file @
18595489
...
@@ -7,31 +7,31 @@ class UserService extends ServiceBase {
...
@@ -7,31 +7,31 @@ class UserService extends ServiceBase {
super
(
"auth"
,
ServiceBase
.
getDaoName
(
UserService
));
super
(
"auth"
,
ServiceBase
.
getDaoName
(
UserService
));
this
.
companyDao
=
system
.
getObject
(
"db.common.companyDao"
);
this
.
companyDao
=
system
.
getObject
(
"db.common.companyDao"
);
this
.
roleDao
=
system
.
getObject
(
"db.auth.roleDao"
);
this
.
roleDao
=
system
.
getObject
(
"db.auth.roleDao"
);
this
.
authS
=
system
.
getObject
(
"service.auth.authSve"
);
this
.
authS
=
system
.
getObject
(
"service.auth.authSve"
);
}
}
async
pmgetUserByCode
(
code
){
async
pmgetUserByCode
(
code
)
{
let
ux
=
await
this
.
cacheManager
[
"CodeCache"
].
getCache
(
code
);
let
ux
=
await
this
.
cacheManager
[
"CodeCache"
].
getCache
(
code
);
return
ux
;
return
ux
;
}
}
async
loginApp
(
appkey
,
uname
)
{
async
loginApp
(
appkey
,
uname
)
{
let
rtn
=
{}
let
rtn
=
{}
let
app
=
await
this
.
cacheManager
[
"AppCache"
].
cache
(
appkey
);
let
app
=
await
this
.
cacheManager
[
"AppCache"
].
cache
(
appkey
);
let
userLogined
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
uname
);
let
userLogined
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
uname
);
rtn
.
user
=
userLogined
rtn
.
user
=
userLogined
if
(
userLogined
)
{
if
(
userLogined
)
{
let
token
=
await
this
.
cmakejwt
(
userLogined
.
jwtkey
,
userLogined
.
jwtsecret
,
null
);
let
token
=
await
this
.
cmakejwt
(
userLogined
.
jwtkey
,
userLogined
.
jwtsecret
,
null
);
rtn
.
token
=
token
;
rtn
.
token
=
token
;
}
}
let
roleids
=
userLogined
.
Roles
.
map
(
item
=>
{
let
roleids
=
userLogined
.
Roles
.
map
(
item
=>
{
return
item
.
id
return
item
.
id
})
})
let
auths
=
await
this
.
authS
.
findAuthsByRole
(
roleids
)
let
auths
=
await
this
.
authS
.
findAuthsByRole
(
roleids
)
rtn
.
user
.
access
=
auths
rtn
.
user
.
access
=
auths
let
code
=
this
.
getUUID
()
let
code
=
this
.
getUUID
()
this
.
cacheManager
[
"CodeCache"
].
cache
(
code
,
rtn
,
60000
);
this
.
cacheManager
[
"CodeCache"
].
cache
(
code
,
rtn
,
60000
);
// let url=app.homePage+"?code="+code
// let url=app.homePage+"?code="+code
return
{
code
,
homePage
:
app
.
homePage
};
return
{
code
,
homePage
:
app
.
homePage
};
}
}
//登录后的租户创建属于租户的用户
//登录后的租户创建属于租户的用户
//需要在控制器里取出公司ID
//需要在控制器里取出公司ID
...
@@ -40,8 +40,8 @@ class UserService extends ServiceBase {
...
@@ -40,8 +40,8 @@ class UserService extends ServiceBase {
//控制器端检查用户名和密码非空
//控制器端检查用户名和密码非空
async
registerByTantent
(
p
,
q
)
{
async
registerByTantent
(
p
,
q
)
{
// 需要默认添加访客角色,为了控制单点从平台登录时看到的菜单和功能
// 需要默认添加访客角色,为了控制单点从平台登录时看到的菜单和功能
if
(
p
.
roles
&&
p
.
roles
.
length
>
0
)
{
if
(
p
.
roles
&&
p
.
roles
.
length
>
0
)
{
if
(
p
.
roles
.
indexOf
(
settings
.
pmroleid
[
"pr"
])
<
0
)
{
if
(
p
.
roles
.
indexOf
(
settings
.
pmroleid
[
"pr"
])
<
0
)
{
p
.
roles
.
push
(
settings
.
pmroleid
[
"pr"
])
p
.
roles
.
push
(
settings
.
pmroleid
[
"pr"
])
}
}
}
}
...
@@ -88,18 +88,18 @@ class UserService extends ServiceBase {
...
@@ -88,18 +88,18 @@ class UserService extends ServiceBase {
//设置默认角色,租户
//设置默认角色,租户
//设置默认普通角色,由于有了租户概念,所以注册时,需要知道当前租户和应用的id 才可以设置默认角色 todo
//设置默认普通角色,由于有了租户概念,所以注册时,需要知道当前租户和应用的id 才可以设置默认角色 todo
//如果是非租户,那么按照当前应用ID是找不到指定的角色,所以是空的
//如果是非租户,那么按照当前应用ID是找不到指定的角色,所以是空的
if
(
p
.
isAdmin
)
{
if
(
p
.
isAdmin
)
{
var
roles
=
await
self
.
roleDao
.
model
.
findAll
({
where
:
{
id
:
{
[
self
.
db
.
Op
.
in
]:
rolecodes
},
app_id
:
roleappid
,
company_id
:
settings
.
pmcompanyid
},
transaction
:
t
});
var
roles
=
await
self
.
roleDao
.
model
.
findAll
({
where
:
{
id
:
{
[
self
.
db
.
Op
.
in
]:
rolecodes
},
app_id
:
roleappid
,
company_id
:
settings
.
pmcompanyid
},
transaction
:
t
});
if
(
roles
&&
roles
.
length
>
0
)
{
if
(
roles
&&
roles
.
length
>
0
)
{
await
u
.
setRoles
(
roles
,
{
transaction
:
t
});
await
u
.
setRoles
(
roles
,
{
transaction
:
t
});
}
}
}
else
{
}
else
{
var
roles
=
await
self
.
roleDao
.
model
.
findAll
({
where
:
{
id
:
{
[
self
.
db
.
Op
.
in
]:
rolecodes
},
app_id
:
roleappid
,
company_id
:
p
.
company_id
},
transaction
:
t
});
var
roles
=
await
self
.
roleDao
.
model
.
findAll
({
where
:
{
id
:
{
[
self
.
db
.
Op
.
in
]:
rolecodes
},
app_id
:
roleappid
,
company_id
:
p
.
company_id
},
transaction
:
t
});
if
(
roles
&&
roles
.
length
>
0
)
{
if
(
roles
&&
roles
.
length
>
0
)
{
await
u
.
setRoles
(
roles
,
{
transaction
:
t
});
await
u
.
setRoles
(
roles
,
{
transaction
:
t
});
}
}
}
}
//创建统一账号 to add extra fields
//创建统一账号 to add extra fields
let
cred
=
await
self
.
cregister
(
u
.
userName
,
p
.
company_id
,
p
.
password
,
u
.
id
+
""
)
let
cred
=
await
self
.
cregister
(
u
.
userName
,
p
.
company_id
,
p
.
password
,
u
.
id
+
""
)
console
.
log
(
"......................................"
);
console
.
log
(
"......................................"
);
...
@@ -153,11 +153,11 @@ class UserService extends ServiceBase {
...
@@ -153,11 +153,11 @@ class UserService extends ServiceBase {
let
token
=
await
self
.
cmakejwt
(
userfind
.
jwtkey
,
userfind
.
jwtsecret
,
null
);
let
token
=
await
self
.
cmakejwt
(
userfind
.
jwtkey
,
userfind
.
jwtsecret
,
null
);
rtn
.
token
=
token
;
rtn
.
token
=
token
;
let
roleids
=
userfind
.
Roles
.
map
(
item
=>
{
let
roleids
=
userfind
.
Roles
.
map
(
item
=>
{
return
item
.
id
return
item
.
id
})
})
let
auths
=
await
self
.
authS
.
findAuthsByRole
(
roleids
)
let
auths
=
await
self
.
authS
.
findAuthsByRole
(
roleids
)
userfind
[
"access"
]
=
auths
userfind
[
"access"
]
=
auths
delete
userfind
[
"jwtkey"
]
delete
userfind
[
"jwtkey"
]
delete
userfind
[
"jwtsecret"
]
delete
userfind
[
"jwtsecret"
]
...
@@ -176,11 +176,11 @@ class UserService extends ServiceBase {
...
@@ -176,11 +176,11 @@ class UserService extends ServiceBase {
// });
// });
let
userfind
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
uname
)
let
userfind
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
uname
)
//添加当前用户的权限信息
//添加当前用户的权限信息
let
roleids
=
userfind
.
Roles
.
map
(
item
=>
{
let
roleids
=
userfind
.
Roles
.
map
(
item
=>
{
return
item
.
id
return
item
.
id
})
})
let
auths
=
await
this
.
authS
.
findAuthsByRole
(
roleids
)
let
auths
=
await
this
.
authS
.
findAuthsByRole
(
roleids
)
userfind
[
"access"
]
=
auths
userfind
[
"access"
]
=
auths
delete
userfind
[
"jwtkey"
]
delete
userfind
[
"jwtkey"
]
delete
userfind
[
"jwtsecret"
]
delete
userfind
[
"jwtsecret"
]
...
@@ -211,11 +211,11 @@ class UserService extends ServiceBase {
...
@@ -211,11 +211,11 @@ class UserService extends ServiceBase {
//appkey--company_id---需要控制器基类里设置到p对象里
//appkey--company_id---需要控制器基类里设置到p对象里
let
user
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
mobile
)
let
user
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
mobile
)
if
(
user
)
{
if
(
user
)
{
let
roleids
=
user
.
Roles
.
map
(
item
=>
{
let
roleids
=
user
.
Roles
.
map
(
item
=>
{
return
item
.
id
return
item
.
id
})
})
let
auths
=
await
this
.
authS
.
findAuthsByRole
(
roleids
)
let
auths
=
await
this
.
authS
.
findAuthsByRole
(
roleids
)
user
[
"access"
]
=
auths
user
[
"access"
]
=
auths
//生成token
//生成token
let
token
=
await
this
.
cmakejwt
(
user
.
jwtkey
,
user
.
jwtsecret
,
null
);
let
token
=
await
this
.
cmakejwt
(
user
.
jwtkey
,
user
.
jwtsecret
,
null
);
...
@@ -229,13 +229,13 @@ class UserService extends ServiceBase {
...
@@ -229,13 +229,13 @@ class UserService extends ServiceBase {
// rtn.token = token;
// rtn.token = token;
// rtn.user = u;
// rtn.user = u;
let
userfind
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
mobile
)
let
userfind
=
await
this
.
cacheManager
[
"UserCache"
].
cache
(
mobile
)
let
roleids
=
userfind
.
Roles
.
map
(
item
=>
{
let
roleids
=
userfind
.
Roles
.
map
(
item
=>
{
return
item
.
id
return
item
.
id
})
})
let
auths
=
await
this
.
authS
.
findAuthsByRole
(
roleids
)
let
auths
=
await
this
.
authS
.
findAuthsByRole
(
roleids
)
userfind
[
"access"
]
=
auths
userfind
[
"access"
]
=
auths
regrtn
.
user
=
userfind
regrtn
.
user
=
userfind
regrtn
.
token
=
token
regrtn
.
token
=
token
return
regrtn
;
return
regrtn
;
}
}
...
@@ -361,17 +361,169 @@ class UserService extends ServiceBase {
...
@@ -361,17 +361,169 @@ class UserService extends ServiceBase {
});
});
}
}
}
//选择业务员为商机
//按照客户电话,建立和业务员的映射关系
//如果已经分配过,那么优先分配
/**
*
* @param {*} clientMobile 客户电话
* @param {*} spName 服务商名称
* @param {*} productCatName 产品类型名称
*/
async
getBizUserForBizChance
(
clientMobile
,
spName
,
productCatName
)
{
var
self
=
this
//按照服务商名字查询到公司,按照公司查询出users,条件是可以接受派单任务,并且技能标签含有,产品类别名称
return
this
.
db
.
transaction
(
async
function
(
t
)
{
//先检查缓存是否存在bizuser
var
resultcache
=
await
self
.
cacheManager
[
"ClientBindBizUserCache"
].
getCache
(
clientMobile
)
let
isGoExec
=
false
if
(
!
resultcache
)
{
isGoExec
=
true
}
else
{
let
uname
=
resultcache
.
userName
let
ucache
=
await
self
.
cacheManager
[
"UserCache"
].
cache
(
uname
)
if
(
!
ucache
.
isAllocated
)
{
//解决修改为不接单
isGoExec
=
true
await
self
.
cacheManager
[
"ClientBindBizUserCache"
].
invalidate
(
clientMobile
)
}
}
if
(
isGoExec
)
{
let
companyFind
=
await
self
.
companyDao
.
model
.
findOne
({
where
:
{
name
:
spName
},
include
:
[
{
model
:
self
.
db
.
models
.
user
,
as
:
"us"
,
attributes
:
[
'id'
,
'userName'
,
'mobile'
,
'isAllocated'
,
'opath'
,
'skilltags'
],
raw
:
true
}
],
excludes
:
[
'orgJson'
],
transaction
:
t
});
console
.
log
(
companyFind
)
let
users
=
companyFind
.
us
let
cansels
=
users
.
filter
(
u
=>
{
if
(
u
.
isAllocated
&&
u
.
skilltags
.
indexOf
(
productCatName
)
>=
0
)
{
return
true
}
else
{
return
false
}
})
let
lngth
=
cansels
.
length
if
(
lngth
>
0
)
{
let
randindex
=
Math
.
floor
(
Math
.
random
()
*
lngth
)
let
selresult
=
cansels
[
randindex
]
//添加到缓存,按照客户电话key--缓存到业务员的对象
let
tmp
=
{
userId
:
selresult
.
id
,
userName
:
selresult
.
userName
,
mobile
:
selresult
.
mobile
,
opath
:
selresult
.
opath
}
await
self
.
cacheManager
[
"ClientBindBizUserCache"
].
cache
(
clientMobile
,
tmp
)
return
tmp
}
else
{
return
null
}
}
else
{
if
(
resultcache
)
{
//不继续,直接返回缓存
return
resultcache
}
else
{
return
null
}
}
})
}
/**
*
* @param {*} clientMobile 客户电话
* @param {*} spName 服务商名称
* @param {*} productCatName 产品类型名称
* @param {*} skucode 最小销售货品编码,来自渠道上架的码
*/
async
getBizUserForDelivery
(
xclientMobile
,
spName
,
productCatName
,
skucode
)
{
let
clientMobile
=
'fordeliver'
+
xclientMobile
var
self
=
this
//按照服务商名字查询到公司,按照公司查询出users,条件是可以接受派单任务,并且技能标签含有,产品类别名称
return
this
.
db
.
transaction
(
async
function
(
t
)
{
//按照产品简码,查询服务成本
let
productpricetmp
=
await
self
.
db
.
models
.
productprice
.
findOne
({
where
:
{
skucode
:
skucode
},
include
:[
{
model
:
self
.
db
.
models
.
productcost
,
as
:
"costs"
,
attributes
:[
'id'
,
'expensetype'
,
'costamount'
]}
],
transaction
:
t
}
)
let
serviceCost
=
productpricetmp
.
costs
.
filter
(
c
=>
{
if
(
c
.
expensetype
==
"service"
)
{
return
true
}
})
let
costAmount
=
0
//获取服务费成本
if
(
serviceCost
.
length
>
0
)
{
costAmount
=
serviceCost
[
0
].
costamount
}
//先检查缓存是否存在bizuser todo key再加个字母d
var
resultcache
=
await
self
.
cacheManager
[
"ClientBindBizUserCache"
].
getCache
(
clientMobile
)
let
isGoExec
=
false
if
(
!
resultcache
)
{
isGoExec
=
true
}
else
{
let
uname
=
resultcache
.
userName
let
ucache
=
await
self
.
cacheManager
[
"UserCache"
].
cache
(
uname
)
if
(
!
ucache
.
isAllocated
)
{
//解决修改为不接单
isGoExec
=
true
await
self
.
cacheManager
[
"ClientBindBizUserCache"
].
invalidate
(
clientMobile
)
}
}
if
(
isGoExec
)
{
let
companyFind
=
await
self
.
companyDao
.
model
.
findOne
({
where
:
{
name
:
spName
},
include
:
[
{
model
:
self
.
db
.
models
.
user
,
as
:
"us"
,
attributes
:
[
'id'
,
'userName'
,
'mobile'
,
'isAllocated'
,
'opath'
,
'skilltags'
],
raw
:
true
}
],
excludes
:
[
'orgJson'
],
transaction
:
t
});
let
users
=
companyFind
.
us
let
cansels
=
users
.
filter
(
u
=>
{
if
(
u
.
isAllocated
&&
u
.
skilltags
.
indexOf
(
productCatName
)
>=
0
)
{
return
true
}
else
{
return
false
}
})
let
lngth
=
cansels
.
length
if
(
lngth
>
0
)
{
let
randindex
=
Math
.
floor
(
Math
.
random
()
*
lngth
)
let
selresult
=
cansels
[
randindex
]
//添加到缓存,按照客户电话key--缓存到业务员的对象
let
tmp
=
{
userId
:
selresult
.
id
,
userName
:
selresult
.
userName
,
mobile
:
selresult
.
mobile
,
opath
:
selresult
.
opath
,
cost
:
costAmount
}
await
self
.
cacheManager
[
"ClientBindBizUserCache"
].
cache
(
clientMobile
,
tmp
)
return
tmp
}
else
{
return
null
}
}
else
{
if
(
resultcache
)
{
//不继续,直接返回缓存
resultcache
[
"cost"
]
=
costAmount
return
resultcache
}
else
{
return
null
}
}
})
}
}
module
.
exports
=
UserService
;
module
.
exports
=
UserService
;
// // (async ()=>{
// let u=new UserService();
// let userS=new UserService()
// // // let x=await u.cregister("jiangong")
// userS.getBizUserForBizChance("13381139519",'好生日','工商注册').then(rtn=>{
// // // console.log(x)
// console.log(rtn)
// // // let x=await u.cunregister("jiangong")
// })
// // // console.log(x)
\ No newline at end of file
// // // let t=await u.cmakejwt()
// // // console.log(t)
// let ux=u.register({userName:"jiangyong3",password:"123"})
// console.log(ux);
// // })()
\ No newline at end of file
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