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
8925bec8
Commit
8925bec8
authored
Aug 06, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
d44a1f08
408d8fd0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
32 deletions
+66
-32
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+16
-18
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+11
-11
center-channel/app/config/environment.js
+1
-1
center-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
+36
-0
No files found.
center-channel/app/base/service/impl/common/qcCenterOrderSve.js
View file @
8925bec8
...
...
@@ -85,7 +85,7 @@ class QcCenterOrderService extends AppServiceBase {
appInfo
:
appInfo
,
actionBody
:
{
solutionNo
:
solutionNo
,
confirmUrl
:
confirmResData
.
c
onfirmUrl
confirmUrl
:
confirmResData
.
C
onfirmUrl
}
};
var
a
=
await
self
.
reqCenterOrderApi
(
reqObj3
);
//保存用户确认方案url
...
...
center-channel/app/base/service/impl/utilsSve/utilsFqAliyunSve.js
View file @
8925bec8
...
...
@@ -11,7 +11,7 @@ class UtilsFqAliyunService extends AppServiceBase {
async
pushOrderBusinessByProductCode2Fq
(
pobj
)
{
//推送自定义产品码的订单商机到峰擎(订单已经支付成功才推送)
var
verifyResult
=
await
this
.
verifyParam
(
pobj
);
var
orderInfo
=
pobj
.
actionBody
.
order_info
;
var
orderContact
=
pobj
.
actionBody
.
order_contact
;
var
orderContact
=
pobj
.
actionBody
.
order_contact
?
pobj
.
actionBody
.
order_contact
:
pobj
.
actionBody
.
delivery_content
.
orderContact
;
var
productInfo
=
pobj
.
actionBody
.
product_info
;
if
(
!
orderInfo
)
{
verifyResult
=
system
.
getResult
(
null
,
"orderInfo can not be empty,100420"
);
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
8925bec8
...
...
@@ -65,14 +65,14 @@ class UtilsNeedService extends AppServiceBase {
if
(
reqUrl
)
{
var
url
=
this
.
centerOrderUrl
+
reqUrl
;
}
var
self
=
this
;
var
self
=
this
;
pobj
.
actionType
=
"receiveIcpFeedback"
;
// 2020 0803 lin 修改;
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
if
(
pobj
.
intentionStatus
==
5
)
{
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
}
if
(
pobj
.
intentionStatus
)
{
// 如果需求当前字段为5(已关闭)则通知fq
if
(
pobj
.
intentionStatus
==
5
)
{
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
}
}
var
rtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
var
data
=
JSON
.
parse
(
rtn
.
stdout
);
...
...
@@ -215,7 +215,7 @@ class UtilsNeedService extends AppServiceBase {
}
}
// 推送ali
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntention"
,
reqbody
:
{
BizId
:
actionBody
.
channelNeedNo
,
Note
:
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
var
a
=
await
self
.
aliclient
.
reqbyget
({
action
:
"CloseIntention"
,
reqbody
:
{
BizId
:
actionBody
.
channelNeedNo
,
Note
:
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
a
);
self
.
utilsPushSve
.
aliBusiness2Fq
(
pobj
,
"pushCloseICPNeed"
);
return
system
.
getResultSuccess
();
...
...
@@ -314,10 +314,10 @@ class UtilsNeedService extends AppServiceBase {
var
fileName
=
tmpFileName
.
substr
(
tmpFileName
.
lastIndexOf
(
"/"
)
+
1
,
tmpFileName
.
lenght
);
// 2020 0803 lin 修改;
var
urlJson
=
this
.
urlSplit
(
docUrl
);
if
(
urlJson
[
"Expires"
])
{
if
(
urlJson
[
"Expires"
])
{
// url中过期时间与服务器时间对比结果为已过期
if
(
urlJson
[
"Expires"
]
<
new
Date
().
getTime
())
{
return
"http://gsb-zc.oss-cn-beijing.aliyuncs.com/"
+
fileName
;
if
(
urlJson
[
"Expires"
]
<
new
Date
().
getTime
())
{
return
"http://gsb-zc.oss-cn-beijing.aliyuncs.com/"
+
fileName
;
}
}
//解码后的文件全名:xxx.pdf
...
...
@@ -384,8 +384,7 @@ class UtilsNeedService extends AppServiceBase {
var
self
=
this
;
var
reqUrl
=
this
.
centerOrderUrl
+
"action/need/springBoard"
;
var
result
=
await
this
.
restPostUrl
(
pobj
,
reqUrl
);
let
res
=
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
res
);
await
self
.
aliclient
.
reqbyget
({
action
:
"WriteCommunicationLog"
,
reqbody
:
{
BizId
:
pobj
.
actionBody
.
intentionBizId
,
Note
:
pobj
.
actionBody
.
note
},
apiVersion
:
"2019-05-08"
});
return
system
.
getResultSuccess
();
}
...
...
@@ -406,17 +405,16 @@ class UtilsNeedService extends AppServiceBase {
PageSize
:
pobj
.
actionBody
.
pageSize
||
10
,
},
apiVersion
:
"2019-05-08"
});
console
.
log
(
res
);
return
system
.
getResultSuccess
(
res
);
}
urlSplit
(
url
)
{
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
var
arr2
=
arr
[
1
].
split
(
"&"
);
//根据&重新分割参数
var
jsonarr
=
{};
//定义一个json对象放置url 参数
for
(
var
i
=
0
;
i
<
arr2
.
length
;
i
++
)
{
//循环将参数放到json里面
jsonarr
[
arr2
[
i
].
substring
(
0
,
1
)]
=
arr2
[
i
].
substring
(
2
,
3
);
var
arr
=
url
.
split
(
"?"
)[
1
];
//根据?跟个url
var
arr2
=
arr
[
1
].
split
(
"&"
);
//根据&重新分割参数
var
jsonarr
=
{};
//定义一个json对象放置url 参数
for
(
var
i
=
0
;
i
<
arr2
.
length
;
i
++
)
{
//循环将参数放到json里面
jsonarr
[
arr2
[
i
].
substring
(
0
,
1
)]
=
arr2
[
i
].
substring
(
2
,
3
);
}
return
jsonarr
;
}
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
8925bec8
...
...
@@ -203,18 +203,18 @@ class UtilsOrderService extends AppServiceBase {
//查询支付流水号是否已经支付
var
receiptVoucher
=
orderResult
.
data
.
receiptVoucher
;
pobj
.
actionType
=
"queryOrderStatus"
;
var
url
=
this
.
centerAppUrl
+
"payment/paymentApi/
queryOrder
"
;
var
url
=
this
.
centerAppUrl
+
"payment/paymentApi/
springBoard
"
;
if
(
receiptVoucher
.
busPayOrderCode
!=
receiptVoucher
.
wxPayOrderCode
)
{
pobj
.
actionBody
.
trxid
=
wxPayOrderCode
;
pobj
.
actionBody
.
trxid
=
receiptVoucher
.
wxPayOrderCode
;
var
wxPayStatus
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
wxPayStatus
&&
wxPayStatus
.
code
==
1
&&
wxPayStatus
.
data
.
trxstatus
==
"0000"
)
{
if
(
wxPayStatus
&&
wxPayStatus
.
status
==
0
&&
wxPayStatus
.
data
.
trxstatus
==
"0000"
)
{
return
system
.
getResultFail
(
-
100130
,
"订单已支付,请勿重复付款,100130"
);
}
}
if
(
receiptVoucher
.
busPayOrderCode
!=
receiptVoucher
.
aliPayOrderCode
)
{
pobj
.
actionBody
.
trxid
=
aliPayOrderCode
;
pobj
.
actionBody
.
trxid
=
receiptVoucher
.
aliPayOrderCode
;
var
aliPayStatus
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
aliPayStatus
&&
aliPayStatus
.
code
==
1
&&
aliPayStatus
.
data
.
trxstatus
==
"0000"
)
{
if
(
aliPayStatus
&&
aliPayStatus
.
status
==
0
&&
aliPayStatus
.
data
.
trxstatus
==
"0000"
)
{
return
system
.
getResultFail
(
-
100140
,
"订单已支付,请勿重复付款,100140"
);
}
}
...
...
@@ -233,21 +233,21 @@ class UtilsOrderService extends AppServiceBase {
//更新DB付款信息
var
isPut
=
0
;
var
setField
=
{};
if
(
opType
==
"wx"
)
{
if
(
actionBody
.
opType
==
"wx"
)
{
if
(
actionBody
.
trxid
!=
receiptVoucher
.
wxPayOrderCode
)
{
setField
.
wxPayOrderCode
=
tR
esult
.
data
.
trxid
;
receiptVoucher
.
wxPayOrderCode
=
tR
esult
.
data
.
trxid
;
setField
.
wxPayOrderCode
=
r
esult
.
data
.
trxid
;
receiptVoucher
.
wxPayOrderCode
=
r
esult
.
data
.
trxid
;
isPut
=
1
;
}
}
else
{
//支付宝
if
(
actionBody
.
trxid
!=
receiptVoucher
.
aliPayOrderCode
)
{
setField
.
aliPayOrderCode
=
tR
esult
.
data
.
trxid
;
receiptVoucher
.
aliPayOrderCode
=
tR
esult
.
data
.
trxid
;
setField
.
aliPayOrderCode
=
r
esult
.
data
.
trxid
;
receiptVoucher
.
aliPayOrderCode
=
r
esult
.
data
.
trxid
;
isPut
=
1
;
}
}
pobj
.
actionBody
.
isPut
;
pobj
.
actionBody
.
isPut
=
isPut
;
pobj
.
actionBody
.
setField
=
setField
;
pobj
.
actionBody
.
receiptVoucherId
=
receiptVoucher
.
id
;
pobj
.
actionBody
.
trxid
=
result
.
data
.
trxid
;
...
...
center-channel/app/config/environment.js
View file @
8925bec8
...
...
@@ -27,7 +27,7 @@ module.exports = function (app) {
app
.
all
(
'*'
,
function
(
req
,
res
,
next
)
{
req
.
objs
=
system
;
res
.
header
(
'Access-Control-Allow-Origin'
,
'*'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild'
);
res
.
header
(
'Access-Control-Allow-Headers'
,
'Content-Type, Content-Length, Authorization, Accept, X-Requested-With , yourHeaderFeild
,Authorization,XAPPKEY,XFROMAPPKEY,XFROMCOMPANYKEY,XREGROLE,XBIZPATH,token
'
);
res
.
header
(
'Access-Control-Allow-Methods'
,
'PUT, POST, GET, DELETE, OPTIONS'
);
// res.header('Access-Control-Allow-Credentials', 'true');
res
.
header
(
'content-type'
,
'text/html;charset=UTF-8'
);
...
...
center-channel/app/front/entry/public/apidoc/paymentDesc/payment.md
View file @
8925bec8
<a
name=
"menu"
href=
"/doc"
>
返回主目录
</a>
1.
[
获取pc端支付二维码--不跟订单关联
](
#getQrCode
)
1.
[
pc端订单支付二维码生成
](
#getOrderQrCode
)
1.
[
获取H5支付链接
](
#getH5PayUrl
)
## **<a name="getQrCode"> 获取pc端支付二维码--不跟订单关联</a>**
...
...
@@ -36,6 +37,41 @@
}
```
## **<a name="getOrderQrCode"> pc端订单支付二维码生成</a>**
[
返回到目录
](
#menu
)
##### URL
[
/web/payment/paymentApi/springBoard
]
#### 参数格式 `JSON`
#### HTTP请求方式 `POST`
#### 渠道执行的类型 actionType:getOrderQrCode
```
javascript
{
"orderNo"
:
"TM22202008042050Pmex"
,
//订单号
"opType"
:
"wx"
// 支付方式 alipay阿里 wx微信
}
```
#### 返回结果
```
javascript
{
"status"
:
0
,
"msg"
:
"success"
,
"data"
:
{
"payinfo"
:
"https://syb.allinpay.com/apiweb/h5unionpay/native?key=BMFvrMDcrqzLnJ04YV%2B02uX0"
,
"reqsn"
:
"qftTM22202008042050Pmex_22"
,
"chnltrxid"
:
"122005790000133940"
,
"trxid"
:
"122005790000133940"
,
"trxstatus"
:
"0000"
,
"notify_url"
:
"https://igirl.gongsibao.com/api/tl/zxNotify"
},
"requestId"
:
"07dedd4ffd4441dcac54c6d8a0f91653"
,
"wxPayOrderCode"
:
"122005790000133596"
,
"aliPayOrderCode"
:
"TM22202008042050Pmex"
}
```
## **<a name="getH5PayUrl"> 获取H5支付链接</a>**
[
返回到目录
](
#menu
)
##### URL
...
...
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