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
d8dbfdf0
Commit
d8dbfdf0
authored
Aug 13, 2020
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付成功解锁/核销券
parent
55d46322
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
order-application-service/src/main/java/cn/freemud/adapter/CouponAdapter.java
+1
-1
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
+1
-1
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
+1
-1
order-application-service/src/main/java/cn/freemud/service/mccafe/impl/CouponClientServiceImpl.java
+5
-5
order-application-service/src/test/java/cn.freemud/service/CouponActivityServiceTest.java
+6
-6
No files found.
order-application-service/src/main/java/cn/freemud/adapter/CouponAdapter.java
View file @
d8dbfdf0
...
@@ -694,7 +694,7 @@ public class CouponAdapter {
...
@@ -694,7 +694,7 @@ public class CouponAdapter {
public
MCCafeCouponLockRequest
convert2MCCafeCouponLockRequest
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
orderBean
,
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
AccountBean
accountBean
)
{
public
MCCafeCouponLockRequest
convert2MCCafeCouponLockRequest
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
orderBean
,
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
AccountBean
accountBean
)
{
MCCafeCouponLockRequest
mcCafeCouponLockRequest
=
new
MCCafeCouponLockRequest
();
MCCafeCouponLockRequest
mcCafeCouponLockRequest
=
new
MCCafeCouponLockRequest
();
mcCafeCouponLockRequest
.
setVer
(
Integer
.
valueOf
(
Version
.
VERSION_1
));
mcCafeCouponLockRequest
.
setVer
(
Integer
.
valueOf
(
Version
.
VERSION_1
));
mcCafeCouponLockRequest
.
setReqType
(
CouponReqTypeEnum
.
UN
LOCK
.
getCode
());
mcCafeCouponLockRequest
.
setReqType
(
CouponReqTypeEnum
.
LOCK
.
getCode
());
mcCafeCouponLockRequest
.
setPartnerId
(
orderBean
.
getCompanyId
());
mcCafeCouponLockRequest
.
setPartnerId
(
orderBean
.
getCompanyId
());
mcCafeCouponLockRequest
.
setStoreId
(
orderBean
.
getShopId
());
mcCafeCouponLockRequest
.
setStoreId
(
orderBean
.
getShopId
());
// 订单号
// 订单号
...
...
order-application-service/src/main/java/cn/freemud/service/impl/CheckMCCafeOrder.java
View file @
d8dbfdf0
...
@@ -480,7 +480,7 @@ public class CheckMCCafeOrder {
...
@@ -480,7 +480,7 @@ public class CheckMCCafeOrder {
.
coupon
(
createOrderVo
.
getCouponCode
())
.
coupon
(
createOrderVo
.
getCouponCode
())
.
sign
(
"skip"
)
.
sign
(
"skip"
)
.
build
());
.
build
());
if
(
couponQueryResponse
==
null
||
!
Response
Result
.
SUCCESS
.
getCode
()
.
equals
(
couponQueryResponse
.
getStatusCode
()))
{
if
(
couponQueryResponse
==
null
||
!
Response
CodeConstant
.
RESPONSE_SUCCESS
.
equals
(
couponQueryResponse
.
getStatusCode
()))
{
throw
new
ServiceException
(
ResponseResult
.
COUPON_SHOP_NOTSUPPORT
);
throw
new
ServiceException
(
ResponseResult
.
COUPON_SHOP_NOTSUPPORT
);
}
}
String
activeCode
=
couponQueryResponse
.
getCodeInfo
().
getAct_id
();
String
activeCode
=
couponQueryResponse
.
getCodeInfo
().
getAct_id
();
...
...
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
View file @
d8dbfdf0
...
@@ -986,7 +986,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
...
@@ -986,7 +986,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
requestDto
.
setOpenId
(
orderExtInfoDto
!=
null
?
orderExtInfoDto
.
getOpenid
()
:
""
);
requestDto
.
setOpenId
(
orderExtInfoDto
!=
null
?
orderExtInfoDto
.
getOpenid
()
:
""
);
buriedPointService
.
BuriedPointPayment
(
requestDto
,
orderBean
);
buriedPointService
.
BuriedPointPayment
(
requestDto
,
orderBean
);
if
(
OldOrderType
.
TAKE_OUT
.
equals
(
orderBean
.
getType
()))
{
if
(
OldOrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getType
()))
{
//调用基础订单接口更新信息
//调用基础订单接口更新信息
UpdateDownstreamOrderCodeReq
updateDownstreamOrderCodeReq
=
new
UpdateDownstreamOrderCodeReq
();
UpdateDownstreamOrderCodeReq
updateDownstreamOrderCodeReq
=
new
UpdateDownstreamOrderCodeReq
();
updateDownstreamOrderCodeReq
.
setOrderCode
(
orderBean
.
getOid
());
updateDownstreamOrderCodeReq
.
setOrderCode
(
orderBean
.
getOid
());
...
...
order-application-service/src/main/java/cn/freemud/service/mccafe/impl/CouponClientServiceImpl.java
View file @
d8dbfdf0
...
@@ -134,7 +134,7 @@ public class CouponClientServiceImpl implements CouponClientService {
...
@@ -134,7 +134,7 @@ public class CouponClientServiceImpl implements CouponClientService {
retry:
retry:
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
couponRedeemResponse
=
redeem
(
request
);
couponRedeemResponse
=
redeem
(
request
);
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS
_STR
.
equals
(
couponRedeemResponse
.
getStatusCode
()))
{
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS
.
equals
(
couponRedeemResponse
.
getStatusCode
()))
{
continue
redeem
;
continue
redeem
;
}
}
}
}
...
@@ -168,7 +168,7 @@ public class CouponClientServiceImpl implements CouponClientService {
...
@@ -168,7 +168,7 @@ public class CouponClientServiceImpl implements CouponClientService {
retry:
retry:
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
couponRedeemResponse
=
redeem
(
request
);
couponRedeemResponse
=
redeem
(
request
);
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS
_STR
.
equals
(
couponRedeemResponse
.
getStatusCode
()))
{
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS
.
equals
(
couponRedeemResponse
.
getStatusCode
()))
{
couponRedeemResponseListAll
.
add
(
couponRedeemResponse
);
couponRedeemResponseListAll
.
add
(
couponRedeemResponse
);
continue
redeem
;
continue
redeem
;
}
}
...
@@ -229,7 +229,7 @@ public class CouponClientServiceImpl implements CouponClientService {
...
@@ -229,7 +229,7 @@ public class CouponClientServiceImpl implements CouponClientService {
@Override
@Override
public
CouponBaseResponse
lock
(
MCCafeCouponLockRequest
mcCafeCouponLockRequest
)
{
public
CouponBaseResponse
lock
(
MCCafeCouponLockRequest
mcCafeCouponLockRequest
)
{
return
null
;
return
couponOfflineMCCafeClient
.
lock
(
mcCafeCouponLockRequest
)
;
}
}
@Override
@Override
...
@@ -254,7 +254,7 @@ public class CouponClientServiceImpl implements CouponClientService {
...
@@ -254,7 +254,7 @@ public class CouponClientServiceImpl implements CouponClientService {
retry:
retry:
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
baseResponse
=
lock
(
request
);
baseResponse
=
lock
(
request
);
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS
_STR
.
equals
(
baseResponse
.
getStatusCode
()))
{
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS
.
equals
(
baseResponse
.
getStatusCode
()))
{
continue
lock
;
continue
lock
;
}
}
}
}
...
@@ -287,7 +287,7 @@ public class CouponClientServiceImpl implements CouponClientService {
...
@@ -287,7 +287,7 @@ public class CouponClientServiceImpl implements CouponClientService {
retry:
retry:
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
baseResponse
=
lock
(
request
);
baseResponse
=
lock
(
request
);
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS
_STR
.
equals
(
baseResponse
.
getStatusCode
()))
{
if
(
ResponseCodeConstant
.
RESPONSE_SUCCESS
.
equals
(
baseResponse
.
getStatusCode
()))
{
baseResponseListAll
.
add
(
baseResponse
);
baseResponseListAll
.
add
(
baseResponse
);
continue
lock
;
continue
lock
;
}
}
...
...
order-application-service/src/test/java/cn.freemud/service/CouponActivityServiceTest.java
View file @
d8dbfdf0
...
@@ -51,11 +51,11 @@ public class CouponActivityServiceTest {
...
@@ -51,11 +51,11 @@ public class CouponActivityServiceTest {
couponCodeVerificationDto
.
setStation_id
(
"1"
);
couponCodeVerificationDto
.
setStation_id
(
"1"
);
couponCodeVerificationDto
.
setOperator_id
(
"1"
);
couponCodeVerificationDto
.
setOperator_id
(
"1"
);
// 订单号
// 订单号
couponCodeVerificationDto
.
setTrans_id
(
"testRedeem07290
09
"
);
couponCodeVerificationDto
.
setTrans_id
(
"testRedeem07290
11
"
);
couponCodeVerificationDto
.
setChannel
(
"mocoffee_wx"
);
couponCodeVerificationDto
.
setChannel
(
"mocoffee_wx"
);
List
<
MCCafeTransactionVo
>
transactions
=
new
ArrayList
<>();
List
<
MCCafeTransactionVo
>
transactions
=
new
ArrayList
<>();
MCCafeTransactionVo
mcCafeTransactionVo
=
new
MCCafeTransactionVo
();
MCCafeTransactionVo
mcCafeTransactionVo
=
new
MCCafeTransactionVo
();
mcCafeTransactionVo
.
setCode
(
"2
8116865668318
8"
);
mcCafeTransactionVo
.
setCode
(
"2
2708646137284
8"
);
List
<
MCCafeProductRedeemVo
>
products
=
new
ArrayList
<>();
List
<
MCCafeProductRedeemVo
>
products
=
new
ArrayList
<>();
MCCafeProductRedeemVo
mcCafeProductRedeemVo
=
new
MCCafeProductRedeemVo
();
MCCafeProductRedeemVo
mcCafeProductRedeemVo
=
new
MCCafeProductRedeemVo
();
mcCafeProductRedeemVo
.
setConsume_num
(
1
);
mcCafeProductRedeemVo
.
setConsume_num
(
1
);
...
@@ -117,7 +117,7 @@ public class CouponActivityServiceTest {
...
@@ -117,7 +117,7 @@ public class CouponActivityServiceTest {
couponCodeVerificationDto
.
setStation_id
(
"1"
);
couponCodeVerificationDto
.
setStation_id
(
"1"
);
couponCodeVerificationDto
.
setOperator_id
(
"1"
);
couponCodeVerificationDto
.
setOperator_id
(
"1"
);
couponCodeVerificationDto
.
setChannel
(
"mocoffee_wx"
);
couponCodeVerificationDto
.
setChannel
(
"mocoffee_wx"
);
couponCodeVerificationDto
.
setCoupon
(
"2
811686566831
88"
);
couponCodeVerificationDto
.
setCoupon
(
"2
979330233712
88"
);
couponCodeVerificationDto
.
setSign
(
"skip"
);
couponCodeVerificationDto
.
setSign
(
"skip"
);
System
.
out
.
println
(
JSON
.
toJSONString
(
couponCodeVerificationDto
));
System
.
out
.
println
(
JSON
.
toJSONString
(
couponCodeVerificationDto
));
...
@@ -133,9 +133,9 @@ public class CouponActivityServiceTest {
...
@@ -133,9 +133,9 @@ public class CouponActivityServiceTest {
couponCodeVerificationDto
.
setPartnerId
(
"1206"
);
couponCodeVerificationDto
.
setPartnerId
(
"1206"
);
couponCodeVerificationDto
.
setStoreId
(
"99992"
);
couponCodeVerificationDto
.
setStoreId
(
"99992"
);
// 订单号
// 订单号
couponCodeVerificationDto
.
setTransId
(
"
00000002
"
);
couponCodeVerificationDto
.
setTransId
(
"
18579931215294931300003
"
);
couponCodeVerificationDto
.
setOfferId
(
"2
811686566831
88"
);
couponCodeVerificationDto
.
setOfferId
(
"2
979330233712
88"
);
couponCodeVerificationDto
.
setCoupon
(
"2
811686566831
88"
);
couponCodeVerificationDto
.
setCoupon
(
"2
979330233712
88"
);
couponCodeVerificationDto
.
setNumber
(
"1"
);
couponCodeVerificationDto
.
setNumber
(
"1"
);
couponCodeVerificationDto
.
setChannel
(
"mocoffee_wx"
);
couponCodeVerificationDto
.
setChannel
(
"mocoffee_wx"
);
couponCodeVerificationDto
.
setOperatorId
(
"1"
);
couponCodeVerificationDto
.
setOperatorId
(
"1"
);
...
...
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