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
b72946f4
Commit
b72946f4
authored
Mar 11, 2021
by
chongfu.liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品券多次添加fix
parent
a9acc7c4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
4 deletions
+23
-4
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/CheckSpqInfoResponseDto.java
+3
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/ShoppingCartNewService.java
+8
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
+10
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+2
-2
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/CheckSpqInfoResponseDto.java
View file @
b72946f4
...
@@ -37,4 +37,7 @@ public class CheckSpqInfoResponseDto {
...
@@ -37,4 +37,7 @@ public class CheckSpqInfoResponseDto {
*/
*/
private
Integer
couponType
;
private
Integer
couponType
;
private
List
<
CartGoods
.
CartGoodsExtra
>
extras
;
private
List
<
CartGoods
.
CartGoodsExtra
>
extras
;
private
Boolean
isMultiCoupon
;
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/ShoppingCartNewService.java
View file @
b72946f4
...
@@ -119,7 +119,7 @@ public interface ShoppingCartNewService {
...
@@ -119,7 +119,7 @@ public interface ShoppingCartNewService {
,
String
couponCode
,
String
couponCode
,
List
<
Long
>
productIds
,
List
<
Long
>
productIds
,
String
menuType
,
String
menuType
,
CouponProductDto
couponProductDto
)
{
,
CouponProductDto
couponProductDto
,
Integer
couponQty
)
{
String
spuId2
;
String
spuId2
;
CheckSpqInfoRequestDto
checkSpqInfoRequestDto
=
new
CheckSpqInfoRequestDto
(
partnerId
,
storeId
,
couponCode
,
menuType
);
CheckSpqInfoRequestDto
checkSpqInfoRequestDto
=
new
CheckSpqInfoRequestDto
(
partnerId
,
storeId
,
couponCode
,
menuType
);
CouponService
couponService
=
SDKCommonBaseContextWare
.
getBean
(
CouponService
.
class
);
CouponService
couponService
=
SDKCommonBaseContextWare
.
getBean
(
CouponService
.
class
);
...
@@ -127,6 +127,9 @@ public interface ShoppingCartNewService {
...
@@ -127,6 +127,9 @@ public interface ShoppingCartNewService {
if
(
checkSpqInfoResponseDto
==
null
)
{
if
(
checkSpqInfoResponseDto
==
null
)
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_COUPON_NOT_EXIST
);
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_COUPON_NOT_EXIST
);
}
}
if
(!
checkSpqInfoResponseDto
.
getIsMultiCoupon
()
&&
couponQty
>
1
)
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GOODS_COUPON_CAN_NOT_USE
);
}
if
(
couponProductDto
!=
null
)
{
if
(
couponProductDto
!=
null
)
{
couponProductDto
.
setType
(
checkSpqInfoResponseDto
.
getCouponType
());
couponProductDto
.
setType
(
checkSpqInfoResponseDto
.
getCouponType
());
}
}
...
@@ -152,7 +155,7 @@ public interface ShoppingCartNewService {
...
@@ -152,7 +155,7 @@ public interface ShoppingCartNewService {
,
List
<
Long
>
productIds
,
List
<
Long
>
productIds
,
String
menuType
,
String
menuType
,
String
goodsId
,
String
goodsId
,
CouponProductDto
couponProductDto
)
{
,
CouponProductDto
couponProductDto
,
Integer
couponQty
)
{
String
spuId2
;
String
spuId2
;
CheckSpqInfoRequestDto
checkSpqInfoRequestDto
=
new
CheckSpqInfoRequestDto
(
partnerId
,
storeId
,
couponCode
,
menuType
);
CheckSpqInfoRequestDto
checkSpqInfoRequestDto
=
new
CheckSpqInfoRequestDto
(
partnerId
,
storeId
,
couponCode
,
menuType
);
CouponService
couponService
=
SDKCommonBaseContextWare
.
getBean
(
CouponService
.
class
);
CouponService
couponService
=
SDKCommonBaseContextWare
.
getBean
(
CouponService
.
class
);
...
@@ -161,6 +164,9 @@ public interface ShoppingCartNewService {
...
@@ -161,6 +164,9 @@ public interface ShoppingCartNewService {
if
(
checkSpqInfoResponseDto
==
null
)
{
if
(
checkSpqInfoResponseDto
==
null
)
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_COUPON_MIX_NOT_EXIST
);
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_COUPON_MIX_NOT_EXIST
);
}
}
if
(!
checkSpqInfoResponseDto
.
getIsMultiCoupon
()
&&
couponQty
>
1
)
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GOODS_COUPON_CAN_NOT_USE
);
}
productIds
.
add
(
Long
.
parseLong
(
checkSpqInfoResponseDto
.
getSkuId
()));
productIds
.
add
(
Long
.
parseLong
(
checkSpqInfoResponseDto
.
getSkuId
()));
couponProductDto
.
setType
(
checkSpqInfoResponseDto
.
getCouponType
());
couponProductDto
.
setType
(
checkSpqInfoResponseDto
.
getCouponType
());
spuId2
=
checkSpqInfoResponseDto
.
getSkuId
();
spuId2
=
checkSpqInfoResponseDto
.
getSkuId
();
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
View file @
b72946f4
...
@@ -750,6 +750,11 @@ public class CouponServiceImpl implements CouponService {
...
@@ -750,6 +750,11 @@ public class CouponServiceImpl implements CouponService {
dto
.
setActiveCode
(
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getActiveCode
());
dto
.
setActiveCode
(
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getActiveCode
());
dto
.
setCouponName
(
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getTitle
());
dto
.
setCouponName
(
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getTitle
());
dto
.
setActivityName
(
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getActiveName
());
dto
.
setActivityName
(
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getActiveName
());
if
(
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getMaxRedeemTimes
()
!=
null
&&
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getMaxRedeemTimes
()
>
1
){
dto
.
setIsMultiCoupon
(
true
);
}
else
{
dto
.
setIsMultiCoupon
(
false
);
}
dto
.
setPrice
(
productsVo
.
getFinalPrice
());
dto
.
setPrice
(
productsVo
.
getFinalPrice
());
dto
.
setSpuId
(
productsVo
.
getSpuId
());
dto
.
setSpuId
(
productsVo
.
getSpuId
());
dto
.
setSpuName
(
productsVo
.
getSkuName
());
dto
.
setSpuName
(
productsVo
.
getSkuName
());
...
@@ -912,6 +917,11 @@ public class CouponServiceImpl implements CouponService {
...
@@ -912,6 +917,11 @@ public class CouponServiceImpl implements CouponService {
return
null
;
return
null
;
}
}
CheckSpqInfoResponseDto
dto
=
new
CheckSpqInfoResponseDto
();
CheckSpqInfoResponseDto
dto
=
new
CheckSpqInfoResponseDto
();
if
(
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getMaxRedeemTimes
()
!=
null
&&
couponDetailResponseDto
.
getDetails
().
get
(
0
).
getActive
().
getMaxRedeemTimes
()
>
1
){
dto
.
setIsMultiCoupon
(
true
);
}
else
{
dto
.
setIsMultiCoupon
(
false
);
}
dto
.
setCouponCode
(
couponCode
);
dto
.
setCouponCode
(
couponCode
);
dto
.
setActiveCode
(
couponActivityDetail
.
getActive
().
getActiveCode
());
dto
.
setActiveCode
(
couponActivityDetail
.
getActive
().
getActiveCode
());
dto
.
setCouponName
(
couponActivityDetail
.
getTitle
());
dto
.
setCouponName
(
couponActivityDetail
.
getTitle
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
b72946f4
...
@@ -296,11 +296,11 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
...
@@ -296,11 +296,11 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
else
{
}
else
{
//校验券是否有效 这里是新的商品券支持多商品及换购券
//校验券是否有效 这里是新的商品券支持多商品及换购券
if
(
StringUtils
.
isNotBlank
(
skuId
))
{
if
(
StringUtils
.
isNotBlank
(
skuId
))
{
spuId2
=
validCoupon
(
partnerId
,
storeId
,
couponCode
,
productIds
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
(),
skuId
,
couponProductDto
);
spuId2
=
validCoupon
(
partnerId
,
storeId
,
couponCode
,
productIds
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
(),
skuId
,
couponProductDto
,
addShoppingCartGoodsRequestVo
.
getQty
()
);
cartGoods
.
setGoodsId
(
spuId
);
cartGoods
.
setGoodsId
(
spuId
);
}
else
{
}
else
{
// 老版本商品券
// 老版本商品券
spuId2
=
validCoupon
(
partnerId
,
storeId
,
couponCode
,
productIds
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
(),
couponProductDto
);
spuId2
=
validCoupon
(
partnerId
,
storeId
,
couponCode
,
productIds
,
BusinessTypeEnum
.
getByType
(
addShoppingCartGoodsRequestVo
.
getMenuType
()).
getCode
(),
couponProductDto
,
addShoppingCartGoodsRequestVo
.
getQty
()
);
}
}
}
}
// 获取商品详细信息
// 获取商品详细信息
...
...
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