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
7d588461
Commit
7d588461
authored
Jan 10, 2020
by
庄冰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qr
parent
f94a386a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
igirl-channel/app/base/api/impl/action/tmOrder.js
+5
-2
igirl-channel/app/base/service/impl/dborder/orderSve.js
+42
-2
No files found.
igirl-channel/app/base/api/impl/action/tmOrder.js
View file @
7d588461
...
@@ -51,7 +51,7 @@ class TmOrderAPI extends APIBase {
...
@@ -51,7 +51,7 @@ class TmOrderAPI extends APIBase {
async
opActionProcess
(
action_process
,
action_type
,
action_body
,
pobj
,
req
)
{
async
opActionProcess
(
action_process
,
action_type
,
action_body
,
pobj
,
req
)
{
action_body
.
app
=
req
.
app
;
action_body
.
app
=
req
.
app
;
action_body
.
user
=
req
.
user
;
action_body
.
user
=
req
.
user
;
// action_body.app = { id:
2,uAppId:18
};
// action_body.app = { id:
2,uappKey:"201911131657",uAppId:9,appSecret:"eeb18393aade40149287b024d8ba0850"
};
// action_body.user = { id: 6, app_id: 2, nickname: "测试用户",channelUserId:"testUserId01" };
// action_body.user = { id: 6, app_id: 2, nickname: "测试用户",channelUserId:"testUserId01" };
var
opResult
=
null
;
var
opResult
=
null
;
if
([
"subTmOrder"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
if
([
"subTmOrder"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
"getNeedInfo"
,
...
@@ -248,9 +248,12 @@ class TmOrderAPI extends APIBase {
...
@@ -248,9 +248,12 @@ class TmOrderAPI extends APIBase {
case
"subGsbOrderInfo"
:
//提交公司宝订单信息
case
"subGsbOrderInfo"
:
//提交公司宝订单信息
opResult
=
await
this
.
orderSve
.
gsbOrderInfo
(
pobj
,
req
);
opResult
=
await
this
.
orderSve
.
gsbOrderInfo
(
pobj
,
req
);
break
;
break
;
case
"checkPayStatusTl"
:
//检查通联支付状态
case
"checkPayStatusTl"
:
//检查通联支付状态
(未测试)
opResult
=
await
this
.
orderSve
.
checkPayStatusTl
(
action_body
);
opResult
=
await
this
.
orderSve
.
checkPayStatusTl
(
action_body
);
break
;
break
;
case
"getTlPayQrCode"
:
//获取通联支付二维码(未测试)
opResult
=
await
this
.
orderSve
.
getTlPayQrCode
(
action_body
);
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
break
;
break
;
...
...
igirl-channel/app/base/service/impl/dborder/orderSve.js
View file @
7d588461
...
@@ -771,8 +771,48 @@ class OrderService extends ServiceBase {
...
@@ -771,8 +771,48 @@ class OrderService extends ServiceBase {
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
return
result
;
}
}
async
getTlPayQrCode
(){
//获取通联支付二维码
async
getTlPayQrCode
(
obj
){
if
(
!
obj
.
app
||
!
obj
.
app
.
uAppId
||
!
obj
.
app
.
id
){
return
system
.
getResultFail
(
-
100
,
"渠道信息有误"
);
}
if
(
!
obj
.
orderNo
){
return
system
.
getResultFail
(
-
101
,
"orderNo参数有误"
);
}
var
order
=
await
this
.
dao
.
model
.
findOne
({
where
:{
orderNo
:
obj
.
orderNo
,
app_id
:
obj
.
app
.
id
},
raw
:
true
});
if
(
!
order
||
!
order
.
totalSum
){
return
system
.
getResultFail
(
-
102
,
"订单数据有误"
);
}
if
(
!
obj
.
opType
){
return
system
.
getResultFail
(
-
103
,
"opType参数有误"
);
}
var
token
=
""
;
var
tokenRes
=
await
this
.
getCenterChannelToken
(
obj
.
app
);
if
(
tokenRes
&&
tokenRes
.
status
==
0
&&
tokenRes
.
data
){
token
=
tokenRes
.
data
.
token
;
}
if
(
!
token
){
return
system
.
getResultFail
(
-
99
,
"获取token失败"
);
}
var
url
=
settings
.
centerChannelUrl
()
+
"web/payment/paymentApi/springBoard"
;
var
pobj
=
{
"actionType"
:
"getQrCode"
,
"actionBody"
:
{
"uapp_id"
:
obj
.
app
.
uAppId
,
"order_num"
:
order
.
orderNo
,
"total_fee"
:
Number
(
order
.
totalSum
)
*
100
,
"body_desc"
:
"1"
,
"opType"
:
obj
.
opType
}
};
var
rtn
=
await
this
.
execClient
.
execPushDataPost
(
pobj
,
url
,
token
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
system
.
getResult
(
null
,
"execPost is empty"
);
}
var
result
=
JSON
.
parse
(
rtn
.
stdout
);
return
result
;
}
}
async
checkPayStatusTl
(
obj
)
{
//通联支付状态验证
async
checkPayStatusTl
(
obj
)
{
//通联支付状态验证
var
wxPayOrderCode
=
obj
.
wxPayOrderCode
||
""
;
var
wxPayOrderCode
=
obj
.
wxPayOrderCode
||
""
;
...
...
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