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
a6fe728f
Commit
a6fe728f
authored
Jul 14, 2020
by
DESKTOP-7Q3CA17\86137
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
6e93d134
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
5 deletions
+33
-5
bpo-admin/app/base/api/impl/channelApi.js
+10
-3
bpo-admin/app/base/service/impl/esettleSve.js
+22
-1
bpo-admin/app/base/service/impl/esettleofflineSve.js
+1
-1
No files found.
bpo-admin/app/base/api/impl/channelApi.js
View file @
a6fe728f
...
...
@@ -323,6 +323,11 @@ class ChannelApi {
return
;
}
for
(
let
order
of
orders
)
{
//查询打款时间
let
paytime
=
await
this
.
esettleSve
.
paytime
(
order
.
id
)
||
[];
if
(
paytime
){
order
.
pay_complete_time
=
paytime
[
0
].
create_time
;
}
// 获取推送数据
let
pushData
=
this
.
getPushData
(
merchant
,
order
);
...
...
@@ -370,12 +375,13 @@ class ChannelApi {
"thirdPartyCustomerId"
:
this
.
trim
(
merchant
.
id
).
toString
(),
// 第三方客户id
// "productId": "5e6b02cc3290c3000a3a63dc",// 云服产品id (测试环境)
"productId"
:
settings
.
FQYF
().
productId
,
// 云服产品id (生产环境)
// "allotRatio":"50",// 分润比例(百分比的数字部分(如:50代表50%))
"orderPrice"
:
system
.
f2y
(
order
.
deduct_amt
),
// 订单金额
"productQuantity"
:
"1"
,
// 产品数量
"companyName"
:
merchant
.
merchant_name
,
// 公司名称
"phone"
:
merchant
.
contact_mobile
"phone"
:
merchant
.
contact_mobile
,
"pay_time"
:
moment
(
order
.
pay_complete_time
).
add
(
-
8
,
"hours"
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
"createdat"
:
moment
(
order
.
created_at
).
add
(
-
8
,
"hours"
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
};
var
log
=
{
"data_id"
:
this
.
trim
(
order
.
id
),
// 发薪批次id tbl_order.id 或者 c_esettle_offline.id
...
...
@@ -531,7 +537,8 @@ class ChannelApi {
rtn
=
await
rc
.
post
(
this
.
FQURL
.
pushOrderSum
,
pushData
);
// console.log(pushData);
console
.
log
(
rtn
);
}
catch
(
e
)
{
return
rtn
}
catch
(
e
)
{
console
.
log
(
e
)
}
...
...
bpo-admin/app/base/service/impl/esettleSve.js
View file @
a6fe728f
...
...
@@ -927,7 +927,7 @@ class EsettleService extends ServiceBase {
}
let
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"id, deduct_amt "
);
sql
.
push
(
"id, deduct_amt
,create_time as created_at
"
);
sql
.
push
(
"FROM `tbl_order` "
);
sql
.
push
(
"WHERE busi_id = :busiId"
);
sql
.
push
(
"AND create_time >= :begin"
);
...
...
@@ -940,6 +940,27 @@ class EsettleService extends ServiceBase {
return
list
;
}
async
paytime
(
orderid
){
if
(
!
orderid
)
{
return
[];
}
let
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"t2.create_time"
);
sql
.
push
(
"FROM `tbl_order_item` t1 "
);
sql
.
push
(
"INNER JOIN `tbl_order_item_info` t2 ON t1.`id` = t2.`order_item_id`"
)
sql
.
push
(
"WHERE t2.trade_status = '00'"
)
sql
.
push
(
"AND t1.`order_id` = :orderid"
);
sql
.
push
(
"ORDER BY t2.create_time ASC LIMIT 1"
);
var
list
=
await
this
.
settledb
.
query
(
sql
.
join
(
" "
),
{
replacements
:
{
orderid
:
orderid
}
});
if
(
list
&&
list
.
length
>
0
)
{
list
=
list
[
0
,
0
]
||
[];
}
return
list
;
}
async
busiStatByDay
(
day
)
{
if
(
!
day
)
{
return
[];
...
...
bpo-admin/app/base/service/impl/esettleofflineSve.js
View file @
a6fe728f
...
...
@@ -354,7 +354,7 @@ class EsettleofflineService extends ServiceBase {
}
let
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"id, amt as deduct_amt"
);
sql
.
push
(
"id, amt as deduct_amt
, created_at, pay_complete_time
"
);
sql
.
push
(
"FROM `c_esettle_offline` "
);
sql
.
push
(
"WHERE ecompany_id = :companyId"
);
sql
.
push
(
"AND created_at >= :begin"
);
...
...
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