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
d553db73
Commit
d553db73
authored
Jul 06, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'esign-sve-merchant' of gitlab.gongsibao.com:jiangyong/zhichan into esign-sve-merchant
parents
33053d1a
797adeef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
3 deletions
+20
-3
esign-sve-merchant/app/base/db/impl/merchant/merchantapiDao.js
+17
-0
esign-sve-merchant/app/base/service/impl/merchant/merchantSve.js
+2
-2
esign-sve-merchant/app/base/service/impl/merchant/merchantapiSve.js
+1
-1
No files found.
esign-sve-merchant/app/base/db/impl/merchant/merchantapiDao.js
View file @
d553db73
...
@@ -6,6 +6,23 @@ class MerchantapiDao extends Dao {
...
@@ -6,6 +6,23 @@ class MerchantapiDao extends Dao {
super
(
Dao
.
getModelName
(
MerchantapiDao
));
super
(
Dao
.
getModelName
(
MerchantapiDao
));
}
}
async
infoById
(
id
)
{
let
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"t1.*,"
);
sql
.
push
(
"t2.`name` AS merchant_name"
);
sql
.
push
(
"FROM `e_merchant_api` t1"
);
sql
.
push
(
"INNER JOIN `e_merchant` t2 ON t1.`merchant_id` = t2.`id`"
);
sql
.
push
(
"WHERE t1.id = :id"
);
sql
.
push
(
"LIMIT 1"
);
let
list
=
await
this
.
customQuery
(
sql
.
join
(
" "
),
{
id
:
id
});
if
(
!
list
||
list
.
length
==
0
)
{
return
null
;
}
return
list
[
0
];
}
}
}
module
.
exports
=
MerchantapiDao
;
module
.
exports
=
MerchantapiDao
;
...
...
esign-sve-merchant/app/base/service/impl/merchant/merchantSve.js
View file @
d553db73
...
@@ -98,7 +98,7 @@ class MerchantService extends ServiceBase {
...
@@ -98,7 +98,7 @@ class MerchantService extends ServiceBase {
}
}
this
.
addWhereTime
(
where
,
'created_at'
,
params
.
beginTime
,
params
.
entTime
,
true
);
this
.
addWhereTime
(
where
,
'created_at'
,
params
.
beginTime
,
params
.
entTime
,
true
);
var
orderby
=
[[
"id"
,
'desc'
]];
var
orderby
=
[[
"id"
,
'desc'
]];
var
attributes
=
[
`id`
,
`name`
,
`credit_code`
,
`contact_man`
,
`contact_mobile`
,
`contact_email`
,
`account_name`
,
`audit_status`
];
var
attributes
=
[
`id`
,
`name`
,
`credit_code`
,
`contact_man`
,
`contact_mobile`
,
`contact_email`
,
`account_name`
,
`audit_status`
,
`bd_id`
];
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
,
attributes
);
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
,
attributes
);
return
system
.
getResultSuccess
(
page
);
return
system
.
getResultSuccess
(
page
);
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -112,7 +112,7 @@ class MerchantService extends ServiceBase {
...
@@ -112,7 +112,7 @@ class MerchantService extends ServiceBase {
if
(
!
params
.
id
)
{
if
(
!
params
.
id
)
{
return
system
.
getResultFail
(
-
1
,
"商户ID为空"
);
return
system
.
getResultFail
(
-
1
,
"商户ID为空"
);
}
}
var
merchant
=
await
this
.
dao
.
find
ById
(
params
.
id
)
||
{};
var
merchant
=
await
this
.
dao
.
get
ById
(
params
.
id
)
||
{};
return
system
.
getResultSuccess
(
merchant
);
return
system
.
getResultSuccess
(
merchant
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
...
...
esign-sve-merchant/app/base/service/impl/merchant/merchantapiSve.js
View file @
d553db73
...
@@ -7,7 +7,7 @@ class merchantapiService extends ServiceBase {
...
@@ -7,7 +7,7 @@ class merchantapiService extends ServiceBase {
}
}
async
infoById
(
params
)
{
async
infoById
(
params
)
{
let
info
=
await
this
.
dao
.
get
ById
(
params
.
id
);
let
info
=
await
this
.
dao
.
info
ById
(
params
.
id
);
return
system
.
getResultSuccess
(
info
);
return
system
.
getResultSuccess
(
info
);
}
}
}
}
...
...
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