Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
order-group-application
order-group
Commits
646df96d
Commit
646df96d
authored
Sep 22, 2020
by
vega
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
电子风味卡对特殊返回进行展示
parent
8eef2357
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
order-application-service/src/main/java/cn/freemud/constant/ResponseCodeConstant.java
+4
-0
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+18
-2
No files found.
order-application-service/src/main/java/cn/freemud/constant/ResponseCodeConstant.java
View file @
646df96d
...
@@ -14,6 +14,10 @@ public class ResponseCodeConstant {
...
@@ -14,6 +14,10 @@ public class ResponseCodeConstant {
public
final
static
String
RESPONSE_SUCCESS_0_STR
=
"0"
;
public
final
static
String
RESPONSE_SUCCESS_0_STR
=
"0"
;
public
final
static
int
RESPONSE_SUCCESS_0
=
0
;
public
final
static
int
RESPONSE_SUCCESS_0
=
0
;
// 电子风味卡,密码错误或者余额不足,需要特殊处理
public
final
static
String
PASSWORD_WRONG
=
"8200407"
;
public
final
static
String
NOT_SUFFICIENT_FUND
=
"8200407"
;
private
final
static
Set
<
Object
>
successResponseCodeSet
=
new
HashSet
<>();
private
final
static
Set
<
Object
>
successResponseCodeSet
=
new
HashSet
<>();
static
{
static
{
...
...
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
646df96d
...
@@ -1819,8 +1819,14 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -1819,8 +1819,14 @@ public class OrderServiceImpl implements Orderservice {
orderPayResponse
=
getOrderPayResponse
(
paymentRequest
,
createPrepayRequestDto
.
getFatherOrderBean
());
orderPayResponse
=
getOrderPayResponse
(
paymentRequest
,
createPrepayRequestDto
.
getFatherOrderBean
());
}
}
if
(
orderPayResponse
==
null
||
Objects
.
isNull
(
orderPayResponse
.
getFmId
()))
{
if
(
orderPayResponse
==
null
||
Objects
.
isNull
(
orderPayResponse
.
getFmId
()))
{
return
failPreOrderPay
(
LogThreadLocal
.
getTrackingNo
(),
createPrepayRequestDto
.
getProductOrderBean
(),
cardCode
,
createPrepayRequestDto
.
getOrderClient
(),
BaseResponse
baseResponse
=
failPreOrderPay
(
LogThreadLocal
.
getTrackingNo
(),
createPrepayRequestDto
.
getProductOrderBean
(),
cardCode
,
createPrepayRequestDto
.
getOrderClient
(),
Objects
.
isNull
(
orderPayResponse
)
?
null
:
orderPayResponse
.
getMsg
());
Objects
.
isNull
(
orderPayResponse
)
?
null
:
orderPayResponse
.
getMsg
());
// 电子风味卡需要给用户特殊的返回
if
(
totalAmount
>
0
&&
Objects
.
nonNull
(
createPrepayRequestDto
.
getUnionPayCard
())
&&
Objects
.
nonNull
(
orderPayResponse
)
&&
(
ResponseCodeConstant
.
PASSWORD_WRONG
.
equals
(
orderPayResponse
.
getPayTransId
())
||
ResponseCodeConstant
.
NOT_SUFFICIENT_FUND
.
equals
(
orderPayResponse
.
getPayTransId
())))
{
baseResponse
.
setMessage
(
orderPayResponse
.
getMsg
());
}
return
baseResponse
;
}
}
createOrderResponse
=
orderAdapter
.
convent2CreateFatherSonOrderResponseVo
(
orderPayResponse
,
createPrepayRequestDto
.
getProductOrderBean
());
createOrderResponse
=
orderAdapter
.
convent2CreateFatherSonOrderResponseVo
(
orderPayResponse
,
createPrepayRequestDto
.
getProductOrderBean
());
BaseResponse
baseEditResponse
=
this
.
updateOrderInfo
(
orderPayResponse
,
createPrepayRequestDto
.
getOrderExtInfoDTO
(),
createPrepayRequestDto
.
getProductOrderBean
(),
LogThreadLocal
.
getTrackingNo
());
BaseResponse
baseEditResponse
=
this
.
updateOrderInfo
(
orderPayResponse
,
createPrepayRequestDto
.
getOrderExtInfoDTO
(),
createPrepayRequestDto
.
getProductOrderBean
(),
LogThreadLocal
.
getTrackingNo
());
...
@@ -1884,6 +1890,10 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -1884,6 +1890,10 @@ public class OrderServiceImpl implements Orderservice {
request
.
setVer
(
"2"
);
request
.
setVer
(
"2"
);
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
CodePayResponse
>
responseBase
=
paymentNewService
.
codePay
(
request
,
trackingNo
);
com
.
freemud
.
application
.
sdk
.
api
.
base
.
BaseResponse
<
CodePayResponse
>
responseBase
=
paymentNewService
.
codePay
(
request
,
trackingNo
);
if
(
responseBase
==
null
||
!
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
.
equals
(
responseBase
.
getCode
())
||
responseBase
.
getData
().
getData
()
==
null
)
{
if
(
responseBase
==
null
||
!
ResponseCodeConstant
.
RESPONSE_SUCCESS_STR
.
equals
(
responseBase
.
getCode
())
||
responseBase
.
getData
().
getData
()
==
null
)
{
// 需要把2种特殊情况抛给用户
if
(
Objects
.
nonNull
(
responseBase
)
&&
(
ResponseCodeConstant
.
PASSWORD_WRONG
.
equals
(
responseBase
.
getCode
())
||
ResponseCodeConstant
.
NOT_SUFFICIENT_FUND
.
equals
(
responseBase
.
getCode
())))
{
orderPayResponse
.
setPayTransId
(
responseBase
.
getCode
());
}
orderPayResponse
.
setMsg
(
Objects
.
isNull
(
responseBase
)
?
"电子风味卡支付异常"
:
responseBase
.
getMessage
());
orderPayResponse
.
setMsg
(
Objects
.
isNull
(
responseBase
)
?
"电子风味卡支付异常"
:
responseBase
.
getMessage
());
}
else
{
}
else
{
CodePayResponse
.
CodePayDate
codePayResponse
=
responseBase
.
getData
().
getData
();
CodePayResponse
.
CodePayDate
codePayResponse
=
responseBase
.
getData
().
getData
();
...
@@ -2289,8 +2299,14 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -2289,8 +2299,14 @@ public class OrderServiceImpl implements Orderservice {
if
(
createOrderVo
.
getFaceCode
()
!=
null
){
if
(
createOrderVo
.
getFaceCode
()
!=
null
){
createOrderVo
.
setCardCode
(
createOrderVo
.
getFaceCode
());
createOrderVo
.
setCardCode
(
createOrderVo
.
getFaceCode
());
}
}
return
failPreOrderPay
(
LogThreadLocal
.
getTrackingNo
(),
productOrderBean
,
createOrderVo
.
getCardCode
(),
null
,
BaseResponse
baseResponse
=
failPreOrderPay
(
LogThreadLocal
.
getTrackingNo
(),
productOrderBean
,
createOrderVo
.
getCardCode
(),
null
,
Objects
.
isNull
(
orderPayResponse
)
?
null
:
orderPayResponse
.
getMsg
());
Objects
.
isNull
(
orderPayResponse
)
?
null
:
orderPayResponse
.
getMsg
());
// 电子风味卡需要给用户特殊的返回
if
(
totalAmount
>
0
&&
Objects
.
nonNull
(
createOrderVo
.
getUnionPayCard
())
&&
Objects
.
nonNull
(
orderPayResponse
)
&&
(
ResponseCodeConstant
.
PASSWORD_WRONG
.
equals
(
orderPayResponse
.
getPayTransId
())
||
ResponseCodeConstant
.
NOT_SUFFICIENT_FUND
.
equals
(
orderPayResponse
.
getPayTransId
())))
{
baseResponse
.
setMessage
(
orderPayResponse
.
getMsg
());
}
return
baseResponse
;
}
}
//更新订单extinfo信息
//更新订单extinfo信息
BaseResponse
baseEditResponse
=
this
.
updateOrderInfo
(
orderPayResponse
,
orderExtInfoDTO
,
productOrderBean
,
LogThreadLocal
.
getTrackingNo
());
BaseResponse
baseEditResponse
=
this
.
updateOrderInfo
(
orderPayResponse
,
orderExtInfoDTO
,
productOrderBean
,
LogThreadLocal
.
getTrackingNo
());
...
...
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