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
cd731130
Commit
cd731130
authored
May 08, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
224d99df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletions
+40
-1
bpo-channel/app/base/api/impl/op/action.js
+4
-1
bpo-channel/app/base/service/impl/channel/channelmerchantSve.js
+36
-0
No files found.
bpo-channel/app/base/api/impl/op/action.js
View file @
cd731130
...
...
@@ -71,13 +71,16 @@ class ActionAPI extends APIBase {
case
"merchantSave"
:
opResult
=
await
this
.
channelmerchantSve
.
save
(
action_body
);
break
;
case
"merchantSaves"
:
opResult
=
await
this
.
channelmerchantSve
.
merchantSaves
(
action_body
);
break
;
case
"merchantPage"
:
opResult
=
await
this
.
channelmerchantSve
.
page
(
action_body
);
break
;
case
"getPushMerchantIds"
:
opResult
=
await
this
.
channelmerchantSve
.
getPushMerchantIds
(
action_body
);
break
;
//渠道绑定
case
"bindPlatform"
:
opResult
=
await
this
.
platformchannelService
.
bindPlatform
(
action_body
);
...
...
bpo-channel/app/base/service/impl/channel/channelmerchantSve.js
View file @
cd731130
...
...
@@ -53,6 +53,37 @@ class ChannelmerchantService extends ServiceBase {
}
async
merchantSaves
(
params
)
{
let
mcht
;
if
(
params
.
id
)
{
mcht
=
await
this
.
dao
.
findById
(
params
.
id
);
}
else
{
mcht
=
{};
}
let
origin
=
await
this
.
originDao
.
findById
(
params
.
origin_id
);
if
(
!
origin
)
{
return
system
.
getResult
(
null
,
"商户来源不存在"
);
}
mcht
.
origin_merchant_name
=
this
.
trim
(
params
.
origin_merchant_name
);
mcht
.
merchant_name
=
this
.
trim
(
params
.
merchant_name
);
mcht
.
contact_man
=
this
.
trim
(
params
.
contact_man
);
mcht
.
contact_mobile
=
this
.
trim
(
params
.
contact_mobile
);
mcht
.
contact_email
=
this
.
trim
(
params
.
contact_email
);
mcht
.
contact_addr
=
this
.
trim
(
params
.
contact_addr
);
if
(
mcht
.
id
)
{
await
mcht
.
save
();
}
else
{
mcht
.
channel_id
=
Number
(
params
.
channel_id
);
mcht
.
origin_id
=
10000
;
mcht
.
origin_merchant_id
=
params
.
origin_merchant_id
;
mcht
=
await
this
.
dao
.
create
(
mcht
);
}
return
system
.
getResultSuccess
(
mcht
);
}
async
page
(
params
)
{
let
currentPage
=
Number
(
params
.
currentPage
||
1
);
let
pageSize
=
Number
(
params
.
pageSize
||
10
);
...
...
@@ -71,6 +102,11 @@ class ChannelmerchantService extends ServiceBase {
[
this
.
db
.
Op
.
like
]:
"%"
+
params
.
merchant_name
+
"%"
};
}
if
(
params
.
types
==
1
){
where
.
origin_merchant_id
=
""
;
where
.
origin_merchant_name
=
""
;
}
let
orderby
=
[
[
"id"
,
'desc'
]
];
...
...
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