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
e702cf52
Commit
e702cf52
authored
Jun 02, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
418fc42f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
0 deletions
+43
-0
xggsve-merchant/app/base/api/impl/op/action.js
+7
-0
xggsve-merchant/app/base/db/impl/merchant/saasmerchantDao.js
+17
-0
xggsve-merchant/app/base/service/impl/merchant/saasmerchantSve.js
+19
-0
No files found.
xggsve-merchant/app/base/api/impl/op/action.js
View file @
e702cf52
...
...
@@ -80,7 +80,11 @@ class ActionAPI extends APIBase {
case
"channelMapByIds"
:
opResult
=
await
this
.
saaschannelSve
.
mapByIds
(
action_body
);
break
;
// 商户
case
"queryMerchantByChannelId"
:
opResult
=
await
this
.
saasmerchantSve
.
queryMerchantByChannelId
(
action_body
);
break
;
case
"mchtIdsLikeName"
:
opResult
=
await
this
.
saasmerchantSve
.
idsLikeName
(
action_body
);
break
;
...
...
@@ -130,6 +134,9 @@ class ActionAPI extends APIBase {
case
"addConsumeLog"
:
opResult
=
await
this
.
saasmerchantconsumeSve
.
addLog
(
action_body
);
break
;
// ------------------------------以下api为历史将要弃用的---------------------------------------
// 商户api
// case "infoList":
...
...
xggsve-merchant/app/base/db/impl/merchant/saasmerchantDao.js
View file @
e702cf52
...
...
@@ -141,5 +141,22 @@ class SaasMerchantDao extends Dao {
sql
.
push
(
"AND t1.created_at <= :createEnd"
);
}
}
/**
* fn:根据渠道ID查询商户ID
* @param params
* @returns {Promise<*>}
*/
async
queryMerchantByChannelId
(
params
){
var
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"t1.*"
);
sql
.
push
(
"FROM saas_merchant t1"
);
sql
.
push
(
"WHERE 1 = 1 "
);
this
.
setCondition
(
sql
,
params
);
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
params
);
}
}
module
.
exports
=
SaasMerchantDao
;
xggsve-merchant/app/base/service/impl/merchant/saasmerchantSve.js
View file @
e702cf52
...
...
@@ -405,5 +405,23 @@ class SaasMerchantService extends ServiceBase {
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
/**
* fn:根据渠道ID查询所有的商户Id
* @param params
* @returns {Promise<void>}
*/
async
queryMerchantByChannelId
(
params
)
{
if
(
!
params
.
channel_id
)
{
return
system
.
getResult
(
null
,
`参数错误 渠道ID 不能为空`
);
}
try
{
let
ids
=
await
this
.
dao
.
queryMerchantByChannelId
(
params
);
return
system
.
getResult
(
ids
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
module
.
exports
=
SaasMerchantService
;
\ 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