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
1cb502c3
Commit
1cb502c3
authored
Jul 03, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
82001e25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
esign-merchant/app/base/controller/impl/merchant/merchantCtl.js
+7
-2
esign-merchant/app/base/service/impl/uc/userSve.js
+24
-3
No files found.
esign-merchant/app/base/controller/impl/merchant/merchantCtl.js
View file @
1cb502c3
...
...
@@ -9,13 +9,18 @@ class merchantCtl extends CtlBase {
constructor
()
{
super
();
this
.
merchantSve
=
system
.
getObject
(
"service.merchant.merchantSve"
);
this
.
userSve
=
system
.
getObject
(
"service.uc.userSve"
);
}
async
merchantOfInfo
(
params
,
pobj2
,
req
)
{
try
{
params
.
merchant_id
=
req
.
body
.
merchant_id
;
return
await
this
.
merchantSve
.
merchantOfInfo
(
params
);
params
.
id
=
req
.
body
.
merchant_id
;
let
res
=
await
this
.
merchantSve
.
merchantOfInfo
(
params
);
if
(
res
.
data
)
{
await
this
.
userSve
.
setRowsUser
([
res
.
data
],
"bd_id"
,
"bd"
);
}
return
res
;
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
...
...
esign-merchant/app/base/service/impl/uc/userSve.js
View file @
1cb502c3
...
...
@@ -21,7 +21,7 @@ class UserService extends ServiceBase {
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
page
(
params
)
{
try
{
return
await
this
.
callms
(
"sve_uc"
,
"userPage"
,
params
);
...
...
@@ -53,6 +53,28 @@ class UserService extends ServiceBase {
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
setRowsUser
(
rows
,
field
,
objectField
)
{
objectField
=
objectField
||
"user"
;
if
(
!
rows
||
rows
.
length
==
0
||
!
field
)
{
return
;
}
let
ids
=
[];
for
(
let
item
of
rows
)
{
let
id
=
Number
(
item
[
field
]
||
0
);
if
(
!
id
)
{
continue
;
}
ids
.
push
(
id
);
}
let
map
=
await
this
.
mapByIds
({
ids
:
ids
});
for
(
let
item
of
rows
)
{
item
[
objectField
]
=
map
[
item
[
field
]]
||
{};
}
}
}
module
.
exports
=
UserService
;
\ No newline at end of file
module
.
exports
=
UserService
;
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