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
cb4f7600
Commit
cb4f7600
authored
Jun 24, 2020
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ucommune order callbackNotify
parent
fe5e8019
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
0 deletions
+67
-0
center-order/app/base/api/impl/opaction/opPayOrder.js
+6
-0
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
+61
-0
No files found.
center-order/app/base/api/impl/opaction/opPayOrder.js
View file @
cb4f7600
...
...
@@ -15,5 +15,10 @@ class OpPayOrder extends APIBase {
var
result
=
await
this
.
orderinfoSve
.
opOrderPayCallBackAliDing
(
pobj
,
pobj
.
appInfo
);
return
result
;
}
async
receivePayCallBackNotifyByWX
(
pobj
,
qobj
,
req
)
{
var
result
=
await
this
.
orderinfoSve
.
opOrderPayCallBackWX
(
pobj
,
pobj
.
appInfo
);
return
result
;
}
}
module
.
exports
=
OpPayOrder
;
\ No newline at end of file
center-order/app/base/service/impl/dbcorder/orderinfoSve.js
View file @
cb4f7600
...
...
@@ -1497,6 +1497,67 @@ class OrderInfoService extends ServiceBase {
}
return
system
.
getResultSuccess
(
resultParams
);
}
async
opOrderPayCallBackWX
(
parmas
,
appInfo
)
{
//操作订单付款回调---微信
var
item
=
await
this
.
dao
.
getItemStatusByOrderNo
(
parmas
.
orderNo
)
if
(
!
item
)
{
return
system
.
getResult
(
null
,
"order data is empty!"
);
}
if
(
item
.
orderStatus
>
1
)
{
return
system
.
getResult
(
null
,
"order status is pay!"
);
}
var
self
=
this
;
await
self
.
db
.
transaction
(
async
function
(
t
)
{
await
self
.
dao
.
updateByWhere
({
orderStatus
:
2
,
payTime
:
parmas
.
time_end
},
{
where
:
{
orderNo
:
parmas
.
orderNo
}
},
t
);
var
putFields
=
{
auditStatus
:
"tg"
,
accountType
:
parmas
.
pay_type
,
passTradeNo
:
parmas
.
transaction_id
||
""
,
//通知校验ID
payOrderNo
:
parmas
.
transaction_id
||
""
,
//支付凭证流水单号,如:微信支付凭证单号--该交易在支付宝系统中的交易流水号。最短16位,最长64位。
busPayOrderCode
:
parmas
.
out_trade_no
||
""
,
//业务支付订单号
buyerOpenId
:
parmas
.
appid
||
""
,
//用户在支付商户appid下的唯一标识或买家在支付宝的用户id
buyerAliLogonId
:
parmas
.
mch_id
||
""
,
//买家支付宝账号
updated_at
:
parmas
.
time_end
,
//该笔交易的买家付款时间。格式为yyyy-MM-dd HH:mm:ss。
notes
:
parmas
.
gmt_create
||
""
//该笔交易创建的时间。格式为yyyy-MM-dd HH:mm:ss。
};
await
self
.
orderReceiptVoucherDao
.
updateByWhere
(
putFields
,
{
where
:
{
sourceOrderNo
:
parmas
.
orderNo
}
},
t
);
var
orderLog
=
{
uapp_id
:
appInfo
.
uapp_id
,
sourceOrderNo
:
parmas
.
orderNo
,
opContent
:
"您成功支付了订单,请等待服务商服务"
,
isShow
:
1
};
await
self
.
flowlogDao
.
create
(
orderLog
,
t
);
var
moneyObj
=
{
uapp_id
:
appInfo
.
uapp_id
,
sourceOrderNo
:
parmas
.
orderNo
,
// 来源单号
channelUserId
:
item
.
channelUserId
,
ownerUserId
:
item
.
ownerUserId
,
accountType
:
parmas
.
pay_type
,
//帐户类型( 支付类型):"cash": "现金", "bank": "银行" ,"wx":"微信","alipay":"支付宝","other":"其它"
directionType
:
"sr"
,
//凭单类型,"sr": "收","zc": "支"
voucherDate
:
parmas
.
time_end
,
//new Date(),//凭单时间
recvAmount
:
item
.
totalSum
,
//收总额
sourceType
:
"orderinfo"
,
//来源类型 "orderinfo": "订单","expensevoucher": "费用单"
auditStatus
:
"tg"
,
//审核状态"dsh": "待审核", "btg": "不通过", "tg": "通过"
};
await
self
.
moneyJourneyDao
.
create
(
moneyObj
,
t
);
});
item
.
orderStatus
=
2
;
//已付款
var
resultParams
=
{
order_info
:
item
,
delivery_content
:
null
,
//包含订单联系人orderContact
product_info
:
null
};
var
deliveryInfoResult
=
await
this
.
getOrderDeliveryInfo
(
null
,
parmas
);
if
(
deliveryInfoResult
&&
deliveryInfoResult
.
status
==
0
)
{
resultParams
.
delivery_content
=
deliveryInfoResult
.
data
;
}
var
orderProductItem
=
await
this
.
orderproductDao
.
getItemInfoByOrderNo
(
parmas
.
orderNo
);
if
(
orderProductItem
)
{
resultParams
.
product_info
=
JSON
.
parse
(
orderProductItem
.
serviceItemSnapshot
);
}
return
system
.
getResultSuccess
(
resultParams
);
}
//-------------------------------服务商通知订单流程-------------end----------------
//商标方案确认
async
tmConfirm
(
pobj
)
{
...
...
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