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
2d7ef743
Commit
2d7ef743
authored
Mar 11, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
da32b3ab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
82 additions
and
9 deletions
+82
-9
bpo-admin/app/base/api/impl/channelApi.js
+44
-0
bpo-admin/app/base/service/impl/channelSve.js
+9
-2
bpo-admin/app/base/system.js
+2
-2
bpo-admin/chanle-service.txt
+27
-5
No files found.
bpo-admin/app/base/api/impl/channelApi.js
0 → 100644
View file @
2d7ef743
var
system
=
require
(
"../../system"
)
const
md5
=
require
(
"MD5"
);
const
logCtl
=
system
.
getObject
(
"web.oplogCtl"
);
const
moment
=
require
(
"moment"
);
class
ChannelApi
{
constructor
()
{
this
.
channelSve
=
system
.
getObject
(
"service.channelSve"
);
}
//渠道绑定
async
bindPlatform
(
queryobj
,
qobj
,
req
)
{
if
(
!
this
.
trim
(
queryobj
.
platform_id
)){
return
system
.
getErrResult2
(
"platform_id不能为空"
)
}
if
(
!
this
.
trim
(
queryobj
.
channel_id
)){
return
system
.
getErrResult2
(
"channel_id不能为空"
)
}
if
(
!
this
.
trim
(
queryobj
.
platform_channel_id
)){
return
system
.
getErrResult2
(
"platform_channel_id不能为空"
)
}
var
result
=
await
this
.
channelSve
.
bindPlatform
(
queryobj
);
return
result
;
}
//绑定渠道推送
async
pushbindingchannel
(
queryobj
,
qobj
,
req
){
queryobj
.
begin
=
moment
().
subtract
(
1
,
'days'
).
format
(
'YYYY-MM-DD 00:00:00'
);
/*前一天的时间*/
queryobj
.
end
=
moment
().
subtract
(
1
,
'days'
).
format
(
'YYYY-MM-DD 23:59:59'
);
/*前一天的时间*/
console
.
log
(
queryobj
);
var
result
=
await
this
.
channelSve
.
pushbindingchannel
(
queryobj
);
return
result
;
}
trim
(
o
)
{
if
(
!
o
)
{
return
""
;
}
return
o
.
toString
().
trim
();
}
}
module
.
exports
=
ChannelApi
;
bpo-admin/app/base/service/impl/channelSve.js
View file @
2d7ef743
...
@@ -38,6 +38,14 @@ class ChannelService extends microService {
...
@@ -38,6 +38,14 @@ class ChannelService extends microService {
return
await
this
.
callms
(
"channel"
,
"channelPage"
,
params
);
return
await
this
.
callms
(
"channel"
,
"channelPage"
,
params
);
}
}
async
bindPlatform
(
params
){
return
await
this
.
callms
(
"channel"
,
"bindPlatform"
,
params
);
}
async
pushbindingchannel
(
params
){
return
await
this
.
callms
(
"channel"
,
"pushbindingchannel"
,
params
);
}
// 商户api
// 商户api
async
merchantInfo
(
params
)
{
async
merchantInfo
(
params
)
{
return
await
this
.
callms
(
"channel"
,
"merchantInfo"
,
params
);
return
await
this
.
callms
(
"channel"
,
"merchantInfo"
,
params
);
...
@@ -49,4 +57,4 @@ class ChannelService extends microService {
...
@@ -49,4 +57,4 @@ class ChannelService extends microService {
return
await
this
.
callms
(
"channel"
,
"merchantPage"
,
params
);
return
await
this
.
callms
(
"channel"
,
"merchantPage"
,
params
);
}
}
}
}
module
.
exports
=
ChannelService
;
module
.
exports
=
ChannelService
;
\ No newline at end of file
bpo-admin/app/base/system.js
View file @
2d7ef743
...
@@ -225,7 +225,7 @@ class System {
...
@@ -225,7 +225,7 @@ class System {
var
v
=
item
[
f
];
var
v
=
item
[
f
];
if
(
v
)
{
if
(
v
)
{
try
{
try
{
item
[
f
+
"_y"
]
=
prev
+
parseFloat
((
Number
(
v
)
/
100
).
toFixed
(
2
));
item
[
f
+
"_y"
]
=
prev
+
parseFloat
((
Number
(
v
)
/
100
).
toFixed
(
2
));
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
}
}
...
@@ -262,7 +262,7 @@ class System {
...
@@ -262,7 +262,7 @@ class System {
var
domain
=
"http://39.107.234.14"
;
var
domain
=
"http://39.107.234.14"
;
return
{
return
{
// 渠道服务
// 渠道服务
channel
:
domain
+
":3003"
+
path
,
channel
:
domain
2
+
":3003"
+
path
,
}
}
}
else
{
}
else
{
// var odomain = "http://123.57.217.203"
// var odomain = "http://123.57.217.203"
...
...
bpo-admin/chanle-service.txt
View file @
2d7ef743
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
},
},
"requestid": "d3fde2b829244c20966031d8e7f93e2a"
"requestid": "d3fde2b829244c20966031d8e7f93e2a"
}
}
2.4 渠道信息
2.4 渠道信息
url: /web/channelCtl/channelInfo
url: /web/channelCtl/channelInfo
请求参数:
请求参数:
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
"channel_idcode": "xxxxx", // 渠道统一社会信用代码或者身份证
"channel_idcode": "xxxxx", // 渠道统一社会信用代码或者身份证
"origin_id": 10001, // 来源id
"origin_id": 10001, // 来源id
"merchant_name": "测试商户7", // 商户名称
"merchant_name": "测试商户7", // 商户名称
"contact_man": "联系人7",
"contact_man": "联系人7",
"contact_mobile": "联系电话7",
"contact_mobile": "联系电话7",
"contact_email": "联系偶像7",
"contact_email": "联系偶像7",
"contact_addr": "联系地址7",
"contact_addr": "联系地址7",
...
@@ -203,7 +203,7 @@
...
@@ -203,7 +203,7 @@
"channel_idcode": "xxxxx", // 渠道统一社会信用代码或者身份证
"channel_idcode": "xxxxx", // 渠道统一社会信用代码或者身份证
"origin_id": 10001, // 来源id
"origin_id": 10001, // 来源id
"merchant_name": "测试商户7", // 商户名称
"merchant_name": "测试商户7", // 商户名称
"contact_man": "联系人7",
"contact_man": "联系人7",
"contact_mobile": "联系电话7",
"contact_mobile": "联系电话7",
"contact_email": "联系偶像7",
"contact_email": "联系偶像7",
"contact_addr": "联系地址7",
"contact_addr": "联系地址7",
...
@@ -232,4 +232,27 @@
...
@@ -232,4 +232,27 @@
"status": 0, // 状态码 0成功 其他失败
"status": 0, // 状态码 0成功 其他失败
"msg": "success",
"msg": "success",
"requestid": "8b5299922e314dd7a9c2711a312f1952"
"requestid": "8b5299922e314dd7a9c2711a312f1952"
}
}
\ No newline at end of file
3.4 渠道绑定
url: /api/channelApi/bindPlatform
请求参数:
{
"platform_id":"10000", //平台渠道ID
"channel_id":10000, //渠道id
"platform_channel_id":10000 //默认写死 10000
}
返回结果:
{
"status": 0, // 状态码 0成功 其他失败
"msg": "success",
"data": 10002,
"requestid": "26d5cee56dd54d938b46c759a6885a0f"
}
{
"status": -1,
"msg": "platform_id不能为空",
"data": null,
"bizmsg": "empty"
}
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