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
64cbb3da
Commit
64cbb3da
authored
Jan 13, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
offlinePaymentOrder
parent
e766d94c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
3 deletions
+104
-3
igirl-channel/app/base/api/impl/action/tmOrder.js
+4
-1
igirl-channel/app/base/service/impl/dborder/orderSve.js
+65
-2
igirl-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
+35
-0
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
64cbb3da
...
...
@@ -54,7 +54,7 @@ class TmOrderAPI extends APIBase {
// action_body.app = { id:2,uappKey:"201911131657",uAppId:9,appSecret:"eeb18393aade40149287b024d8ba0850"};
// action_body.user = { id: 6, app_id: 2, nickname: "测试用户",channelUserId:"testUserId01" };
var
opResult
=
null
;
if
([
"subTmOrder"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
if
([
"
offlinePaymentOrder"
,
"
subTmOrder"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
"tmConfirm"
,
"updateTmInfo"
,
"updateNclInfo"
,
"updateContacts"
,
"updateCustomerInfo"
,
"addOrderAndDelivery"
,
"updateOrderPayStatus"
].
indexOf
(
action_type
)
>=
0
)
{
if
(
!
action_body
.
channelUserId
)
{
...
...
@@ -257,6 +257,9 @@ class TmOrderAPI extends APIBase {
// case "receiveTlCallBackNotify"://接收通联支付回调通知(未测试)
// opResult = await this.orderSve.receiveTlCallBackNotify(action_body);
// break;
case
"offlinePaymentOrder"
:
//订单线下支付(上传支付凭证)
opResult
=
await
this
.
orderSve
.
offlinePaymentOrder
(
action_body
);
break
;
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
...
...
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
64cbb3da
...
...
@@ -17,7 +17,68 @@ class OrderService extends ServiceBase {
this
.
appDao
=
system
.
getObject
(
"db.dbapp.appDao"
);
this
.
orderReceiptVoucherDao
=
system
.
getObject
(
"db.dbcpay.orderreceiptvoucherDao"
);
}
//订单线下支付(上传支付凭证)
async
offlinePaymentOrder
(
obj
){
var
app
=
obj
.
app
;
var
user
=
obj
.
user
;
if
(
!
user
||
!
user
.
id
)
{
return
system
.
getResultFail
(
-
100
,
"未知用户"
);
}
if
(
!
app
||
!
app
.
id
)
{
return
system
.
getResultFail
(
-
101
,
"未知渠道"
);
}
var
orderNo
=
obj
.
orderNo
;
var
paymentVoucher
=
obj
.
paymentVoucher
;
if
(
!
orderNo
){
return
system
.
getResultFail
(
-
102
,
"orderNo参数错误"
);
}
if
(
!
paymentVoucher
){
return
system
.
getResultFail
(
-
103
,
"paymentVoucher参数错误"
);
}
var
order
=
await
this
.
dao
.
model
.
findOne
({
where
:{
orderNo
:
orderNo
,
app_id
:
app
.
id
},
raw
:
true
});
if
(
!
order
){
return
system
.
getResultFail
(
-
104
,
"订单不存在"
);
}
if
(
!
order
.
orderPayStatus
||
(
order
.
orderPayStatus
!=
"dfk"
&&
order
.
orderPayStatus
!=
"zfpz"
&&
order
.
orderPayStatus
!=
"zfshbtg"
)){
return
system
.
getResultFail
(
-
105
,
"订单状态错误,订单当前状态为"
+
order
.
orderPayStatusName
);
}
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
var
orderObj
=
{
id
:
order
.
id
,
orderPayStatus
:
"zfpz"
,
payTime
:
new
Date
()};
await
self
.
dao
.
update
(
orderObj
,
t
);
var
logMsg
=
{
sourceOrderNo
:
order
.
orderNo
,
opContent
:
"订单提交支付凭证"
,
app_id
:
app
.
id
,
isShow
:
1
};
await
self
.
orderflowDao
.
create
(
logMsg
,
t
);
var
orderReceiptVoucher
=
await
self
.
receiptvoucherDao
.
model
.
findOne
({
where
:{
busPayOrderCode
:
order
.
orderNo
,
createapp_id
:
app
.
id
},
raw
:
true
});
var
orderReceiptVoucherObj
=
{
receiptType
:
"sk"
,
auditStatus
:
"dsh"
,
certifyFileUrl
:
paymentVoucher
,
itemCode
:
order
.
itemCode
,
itemName
:
order
.
itemName
,
payuser_id
:
user
.
id
,
accountType
:
"bank"
,
sourceType
:
"order"
,
payDate
:
new
Date
(),
//支付时间
totalSum
:
order
.
totalSum
,
//订单总额
sourceOrderNo
:
order
.
orderNo
};
if
(
orderReceiptVoucher
){
orderReceiptVoucherObj
[
"id"
]
=
orderReceiptVoucher
.
id
;
orderReceiptVoucherObj
[
"updateuser_id"
]
=
user
.
id
;
await
self
.
receiptvoucherDao
.
update
(
orderReceiptVoucherObj
,
t
);
}
else
{
orderReceiptVoucherObj
[
"createuser_id"
]
=
user
.
id
;
orderReceiptVoucherObj
[
"createapp_id"
]
=
app
.
id
;
await
self
.
receiptvoucherDao
.
create
(
orderReceiptVoucherObj
,
t
);
}
return
system
.
getResultSuccess
();
})
}
async
addOrderAndDelivery
(
action_body
,
pobj
,
req
)
{
if
(
!
action_body
.
needNo
)
{
return
system
.
getResult
(
null
,
"needNo is empty"
);
...
...
@@ -1032,6 +1093,7 @@ class OrderService extends ServiceBase {
},
t
);
//帐户类型( 支付类型):cash: 现金, bank: 银行 ,wx:微信,alipay:支付宝,other:其它
var
orderReceiptVoucherObj
=
{
sourceType
:
"order"
,
receiptType
:
"sk"
,
itemCode
:
orderItem
.
itemCode
,
itemName
:
orderItem
.
itemName
,
createapp_id
:
app
.
id
,
...
...
@@ -1039,7 +1101,8 @@ class OrderService extends ServiceBase {
accountType
:
accountType
,
payDate
:
new
Date
(),
//支付时间
totalSum
:
orderItem
.
totalSum
,
//订单总额
busPayOrderCode
:
orderItem
.
orderNo
//业务支付订单号
sourceOrderNo
:
orderItem
.
orderNo
,
busPayOrderCode
:
obj
.
trxid
//业务支付订单号
};
var
receiptVoucher
=
await
self
.
receiptvoucherDao
.
create
(
orderReceiptVoucherObj
,
t
);
// var orderReceiptVoucher = await self.orderReceiptVoucherDao.create(orderReceiptVoucherObj,t);
...
...
igirl-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
View file @
64cbb3da
...
...
@@ -4,6 +4,7 @@
1.
[
检查通联支付状态
](
#checkPayStatusTl
)
1.
[
获取通联支付二维码
](
#getTlPayQrCode
)
1.
[
通联支付状态通知
](
#notify
)
1.
[
订单线下支付(上传支付凭证)
](
#offlinePaymentOrder
)
## **<a name="paypc"> 订单支付</a>**
[
返回到目录
](
#menu
)
...
...
@@ -194,3 +195,37 @@
}
}
```
## **<a name="offlinePaymentOrder"> 订单线下支付(上传支付凭证)</a>**
[
返回到目录
](
#menu
)
##### URL
[
/action/tmOrder/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:offlinePaymentOrder
```
javascript
{
"actionType"
:
"offlinePaymentOrder"
,
"actionProcess"
:
"1688"
,
"actionBody"
:
{
"paymentVoucher"
:
"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_yxq277220191151575539914017.jpg"
,
"channelUserId"
:
"testUserId01"
,
"orderNo"
:
"TM202001101929B0ghUQ"
}
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
null
,
"requestId"
:
"afda73d44d524c8fbb6dd66dab9e1aef"
}
```
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