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
def49998
Commit
def49998
authored
Jan 20, 2021
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复更新优惠问题
parent
f68b6578
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
+9
-4
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
View file @
def49998
...
@@ -1539,7 +1539,8 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
...
@@ -1539,7 +1539,8 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
* 随单购月卡调会员发券与更新订单使用的优惠券与买的优惠券
* 随单购月卡调会员发券与更新订单使用的优惠券与买的优惠券
* @param orderBean
* @param orderBean
*/
*/
private
boolean
withOrderBuyCoupon
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
orderBean
,
String
thirdPartyMemberId
){
private
boolean
withOrderBuyCoupon
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
orderBean
,
String
thirdPartyMemberId
){
LogUtil
.
info
(
"发券入参:"
,
thirdPartyMemberId
,
JSON
.
toJSONString
(
orderBean
));
try
{
try
{
List
<
String
>
cardIds
=
new
ArrayList
<>();
List
<
String
>
cardIds
=
new
ArrayList
<>();
List
<
String
>
defaultCardCodes
=
new
ArrayList
<>();
List
<
String
>
defaultCardCodes
=
new
ArrayList
<>();
...
@@ -1600,7 +1601,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
...
@@ -1600,7 +1601,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
req
.
setPartnerId
(
orderBean
.
getCompanyId
());
req
.
setPartnerId
(
orderBean
.
getCompanyId
());
req
.
setCouponReceiveInfoList
(
new
ArrayList
<>());
req
.
setCouponReceiveInfoList
(
new
ArrayList
<>());
req
.
setCouponUpdateInfoList
(
new
ArrayList
<>());
req
.
setCouponUpdateInfoList
(
new
ArrayList
<>());
log
.
info
(
"准备开始生成参数:"
,
orderBean
);
LogUtil
.
info
(
"准备开始生成参数:"
,
orderBean
,
null
);
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
productBean
:
orderBean
.
getProductList
())
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
productBean
:
orderBean
.
getProductList
())
{
if
(
ProductTypeEnum
.
getVirtualProductType
().
contains
(
productBean
.
getProductType
()))
{
if
(
ProductTypeEnum
.
getVirtualProductType
().
contains
(
productBean
.
getProductType
()))
{
UpdateCouponCodeReq
.
CouponReceiveInfo
couponReceiveInfo
=
new
UpdateCouponCodeReq
.
CouponReceiveInfo
();
UpdateCouponCodeReq
.
CouponReceiveInfo
couponReceiveInfo
=
new
UpdateCouponCodeReq
.
CouponReceiveInfo
();
...
@@ -1626,7 +1627,11 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
...
@@ -1626,7 +1627,11 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
}
}
couponReceiveInfo
.
setCouponCode
(
cardCodeStr
.
substring
(
0
,
cardCodeStr
.
length
()-
1
));
couponReceiveInfo
.
setCouponCode
(
cardCodeStr
.
substring
(
0
,
cardCodeStr
.
length
()-
1
));
req
.
getCouponReceiveInfoList
().
add
(
couponReceiveInfo
);
req
.
getCouponReceiveInfoList
().
add
(
couponReceiveInfo
);
}
else
if
(
CollectionUtils
.
isNotEmpty
(
productBean
.
getDiscountList
()))
{
}
}
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
productBean
:
orderBean
.
getProductList
())
{
if
(
CollectionUtils
.
isNotEmpty
(
productBean
.
getDiscountList
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
.
ProductDiscount
discount
:
productBean
.
getDiscountList
())
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
.
ProductDiscount
discount
:
productBean
.
getDiscountList
())
{
if
(
defaultCardCodes
.
contains
(
discount
.
getDiscountId
()))
{
if
(
defaultCardCodes
.
contains
(
discount
.
getDiscountId
()))
{
UpdateCouponCodeReq
.
CouponUpdateInfo
couponUpdateInfo
=
new
UpdateCouponCodeReq
.
CouponUpdateInfo
();
UpdateCouponCodeReq
.
CouponUpdateInfo
couponUpdateInfo
=
new
UpdateCouponCodeReq
.
CouponUpdateInfo
();
...
@@ -1653,7 +1658,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
...
@@ -1653,7 +1658,7 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
}
}
}
}
log
.
info
(
"生成参数完成:"
,
req
);
LogUtil
.
info
(
"生成参数完成:"
,
req
,
null
);
orderSdkService
.
updateCostCouponCode
(
req
,
LogTreadLocal
.
getTrackingNo
());
orderSdkService
.
updateCostCouponCode
(
req
,
LogTreadLocal
.
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