Commit b146a541 by xiaoer.li@freemud.com

Merge remote-tracking branch 'remotes/origin/fix_集点不参与积分同享' into qa

# Conflicts:
#	assortment-ordercenter-sdk/pom.xml
#	assortment-ordercenter-sdk/readme.md
#	order-application-service/pom.xml
#	ordercenter-sdk/pom.xml
#	ordercenter-sdk/readme.md
parents 94bcfca1 411d23af
...@@ -101,11 +101,6 @@ ...@@ -101,11 +101,6 @@
<version>1.2-SNAPSHOT</version> <version>1.2-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
<artifactId>takeawaycenter-sdk</artifactId>
<version>1.2.3-SNAPSHOT</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
| 版本号 | 版本说明 | 更新人 | 更新时间 | | 版本号 | 版本说明 | 更新人 | 更新时间 |
| --------------| ------------ | ------------- | ---------- | | --------------| ------------ | ------------- | ---------- |
| 1.0.0-SNAPSHOT | 迁移后包明改为cn.freemud开头第一版 | wuping | 2019-12-16 | | 1.0.0-SNAPSHOT | 迁移后包明改为cn.freemud开头第一版 | wuping | 2019-12-16 |
1.1.6.SNAPSHOT| 1.9.11商品组 | 胡超 | 2020-02-05 | 1.1.6.SNAPSHOT| 1.9.11商品组 | 胡超 | 2020-02-05 |
| 1.1.7.SNAPSHOT| 核销流程更改 | 侯书虎 | 2020-02-10 | | 1.1.7.SNAPSHOT| 核销流程更改 | 侯书虎 | 2020-02-10 |
| 1.5.5-SNAPSHOT | 返回售后单创建时间 | wuping | 2020-04-27 | | 1.5.5-SNAPSHOT | 返回售后单创建时间 | wuping | 2020-04-27 |
| 1.5.6-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 | | 1.5.6-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
<artifactId>assortment-ordercenter-sdk</artifactId> <artifactId>assortment-ordercenter-sdk</artifactId>
<version>1.9.5-SNAPSHOT</version> <version>1.5.12-RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<artifactId>storecenter-sdk</artifactId> <artifactId>storecenter-sdk</artifactId>
<version>2.10.3-SNAPSHOT</version> <version>2.6.4-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<dependency> <dependency>
<artifactId>assortment-data-manager</artifactId> <artifactId>assortment-data-manager</artifactId>
<groupId>com.freemud.sdk.api.assortment</groupId> <groupId>com.freemud.sdk.api.assortment</groupId>
<version>4.7.6-SNAPSHOT</version> <version>4.6.8.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
...@@ -346,6 +346,7 @@ ...@@ -346,6 +346,7 @@
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-logback-1.x</artifactId> <artifactId>apm-toolkit-logback-1.x</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -76,6 +76,7 @@ public class CustomerScoreService implements IPromotionService { ...@@ -76,6 +76,7 @@ public class CustomerScoreService implements IPromotionService {
} else { } else {
if (StringUtils.isNotBlank(shoppingCartInfoRequestVo.getCouponCode()) || (calculationDiscountResult != null && calculationDiscountResult.getTotalDiscountAmount().intValue() > 0) if (StringUtils.isNotBlank(shoppingCartInfoRequestVo.getCouponCode()) || (calculationDiscountResult != null && calculationDiscountResult.getTotalDiscountAmount().intValue() > 0)
|| (calculationDiscountResult != null && !CollectionUtils.isEmpty(calculationDiscountResult.getDiscounts()))) { || (calculationDiscountResult != null && !CollectionUtils.isEmpty(calculationDiscountResult.getDiscounts()))) {
//是否有换购
int type81 = 0; int type81 = 0;
for (ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discount : calculationDiscountResult.getDiscounts()) { for (ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discount : calculationDiscountResult.getDiscounts()) {
if (ActivityTypeEnum.TYPE_81.getCode().equals(discount.getType())) { if (ActivityTypeEnum.TYPE_81.getCode().equals(discount.getType())) {
...@@ -83,9 +84,22 @@ public class CustomerScoreService implements IPromotionService { ...@@ -83,9 +84,22 @@ public class CustomerScoreService implements IPromotionService {
break; break;
} }
} }
//积分抵扣开关禁用 过滤换购 //集点
if (type81 == 0 || (type81 == 1 && !CollectionUtils.isEmpty(shoppingCartInfoRequestVo.getSendGoods())) int discountCount = calculationDiscountResult.getDiscounts().size();
|| (type81 == 1 && calculationDiscountResult.getDiscounts().size() > 1)) { int type211 = 0;
for (ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discount : calculationDiscountResult.getDiscounts()) {
if (discount.getType().equals(221)) {
type211 += 1;
break;
}
}
discountCount = discountCount - type211;
//积分抵扣开关禁用 有换购活动 且选中了换购商品
// - 有换购且选中了换购商品
// - 有换购且没有选中换购商品 且除集点以外还有其他促销
if (type81 == 0
|| (type81 == 1 && !CollectionUtils.isEmpty(shoppingCartInfoRequestVo.getSendGoods()))
|| (type81 == 1 && discountCount > 1)) {
customerScoreVo.setScoreReduceState(5); customerScoreVo.setScoreReduceState(5);
userScoreUseDetail.getResult().setScoreState(5); userScoreUseDetail.getResult().setScoreState(5);
discountAmount = 0; discountAmount = 0;
......
...@@ -416,7 +416,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -416,7 +416,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if ((availableStocks != null) && (ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(availableStocks.getCode()))) { if ((availableStocks != null) && (ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(availableStocks.getCode()))) {
if ((CollectionUtils.isEmpty(availableStocks.getResult())) || (qty > availableStocks.getResult().get(0).getQty())) { if ((CollectionUtils.isEmpty(availableStocks.getResult())) || (qty > availableStocks.getResult().get(0).getQty())) {
Integer stock = 0; Integer stock = 0;
if ((stock = availableStocks.getResult().get(0).getQty()) > 0) { if (!CollectionUtils.isEmpty(availableStocks.getResult()) && (stock = availableStocks.getResult().get(0).getQty()) > 0) {
throw new BizServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE, "仅剩" + stock + "件库存了"); throw new BizServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE, "仅剩" + stock + "件库存了");
} }
throw new ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE); throw new ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE);
...@@ -1219,7 +1219,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1219,7 +1219,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
(CollectionUtils.isEmpty(availableStocks.getResult()) || availableStocks.getResult().get(0).getQty() == null (CollectionUtils.isEmpty(availableStocks.getResult()) || availableStocks.getResult().get(0).getQty() == null
|| availableStocks.getResult().get(0).getQty() < qty)) { || availableStocks.getResult().get(0).getQty() < qty)) {
Integer stock = 0; Integer stock = 0;
if ((stock = availableStocks.getResult().get(0).getQty()) > 0) { if (!CollectionUtils.isEmpty(availableStocks.getResult()) && (stock = availableStocks.getResult().get(0).getQty()) > 0) {
throw new BizServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE, "仅剩" + stock + "件库存了"); throw new BizServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE, "仅剩" + stock + "件库存了");
} }
throw new ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE); throw new ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment