Commit a6a9fd52 by xiaoer.li@freemud.com

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

# 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 23c158b9 411d23af
......@@ -265,7 +265,7 @@
<dependency>
<groupId>com.freemud.card.sdk</groupId>
<artifactId>freemud-card-sdk</artifactId>
<version>2.4.17-RELEASE</version>
<version>2.4.18-RELEASE</version>
</dependency>
<dependency>
......@@ -320,7 +320,7 @@
<dependency>
<groupId>com.freemud.sdk.api.assortment</groupId>
<artifactId>assortment-payment-sdk</artifactId>
<version>2.5.3-RELEASE</version>
<version>2.5.4-RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.rocketmq</groupId>
......@@ -346,6 +346,7 @@
<groupId>org.apache.skywalking</groupId>
<artifactId>apm-toolkit-logback-1.x</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
......
#### 老订单SDK说明
| 版本号 | 版本说明 | 更新人 | 更新时间 |
| ------------ | ---------------- | ------ | ---------- |
| 1.0.0-SNAPSHOT | 迁移后包明改为cn.freemud开头第一版 | wuping | 2019-12-16 |
| 1.1.4-SNAPSHOT | 优化活动订单 | 胡超 | 2020-02-10 |
| 1.1.6-SNAPSHOT | OrderExtInfo新增formId | wuping | 2020-02-27 |
| 1.1.7-SNAPSHOT | 预约单支付成功接口增加预约任务 | wuping | 2020-03-10 |
| 1.1.8-SNAPSHOT | 预约单接单接口增加预约任务 | wuping | 2020-03-17 |
| 1.1.9-SNAPSHOT | 新增manager基础类 | 侯书虎 | 2020-04-2 |
| 1.2.0-SNAPSHOT | 新增订单商品汇总下载接口 | 侯书虎 | 2020-04-07 |
| 1.3.0-SNAPSHOT | 代码缺,升一个版本 | 丁凯 | 2020-04-16 |
| 1.3.1-SNAPSHOT | 增加实际配送费字段 | 海波 | 2020-04-17 |
| 1.3.2-SNAPSHOT | 增加异常单状态字段 | 李小二 | 2020-04-17 |
| 1.3.3-SNAPSHOT | 创建售后单接口增加任务 | wuping | 2020-04-27 |
| 1.3.4-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
| 1.3.5-SNAPSHOT | 费用实体添加字段:实际费用 | 胡超 | 2020-04-29 |
| 1.3.6-SNAPSHOT | 增加售后阶段 | 海波 | 2020-05-07 |
| 1.4.0-SNAPSHOT | 增加售后阶段 | 海波 | 2020-05-07 |
| 1.4.1-SNAPSHOT | 发送pos消息中心新增字段 | 侯书虎 | 2020-05-07 |
| 1.4.2-SNAPSHOT | 创建订单增加appid字段 | wuping | 2020-05-08 |
| 1.4.3-SNAPSHOT | 全单退增加配送费字段 | 海波 | 2020-05-12 |
| 1.4.4-SNAPSHOT | 规范extInfo类 | 侯书虎 | 2020-05-14 |
| 1.4.5-SNAPSHOT | 客如云接口 | 海波 | 2020-05-14 |
| 1.4.7-SNAPSHOT | 增加订单支付方式类型 | 海波 | 2020-05-18 |
| 1.4.8-SNAPSHOT | 售后ES查询增加跟踪号 | 海波 | 2020-05-25 |
| 1.4.9-SNAPSHOT | 客如云接口 | 海波 | 2020-05-26 |
| 1.1.9-SNAPSHOT | 创建订单增加appid字段 | wuping | 2020-05-08 |
| 1.3.3-SNAPSHOT | 创建售后单接口增加任务 | wuping | 2020-04-27 |
| 1.3.4-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
| 1.2.10.RELEASE | 增加售后单任务 | wuping | 2020-05-21 |
| 1.2.11.RELEASE | 增加订单支付方式 | 海波 | 2020-05-25 |
| 1.3.1.RELEASE | 增加下游订单号 | 海波 | 2020-06-01 |
| 1.4.12-SNAPSHOT | 增加新接口:新增结算信息 | wuping | 2020-05-28 |
| 1.4.13-SNAPSHOT | 用户订单和es综合查询接口新增订单业务类型集合 | wuping | 2020-06-01 |
| 1.4.14-SNAPSHOT | 增加非码微店类型 | 梁崇福 | 2020-06-05 |
| 1.4.15-SNAPSHOT | 预约单任务删除 | wuping | 2020-06-05 |
| 1.4.16-SNAPSHOT | 围餐 | dingkai | 2020-06-08 |
| 1.4.17-SNAPSHOT | 农工商停车 | dingkai | 2020-06-12 |
| 1.4.18-SNAPSHOT | 添加小助手营业额查询 | 梁崇福 | 2020-06-12 |
| 版本号 | 版本说明 | 更新人 | 更新时间 |
| ------------ | ---------------- | ------ | ---------- |
| 1.0.0-SNAPSHOT | 迁移后包明改为cn.freemud开头第一版 | wuping | 2019-12-16 |
| 1.1.4-SNAPSHOT | 优化活动订单 | 胡超 | 2020-02-10 |
| 1.1.6-SNAPSHOT | OrderExtInfo新增formId | wuping | 2020-02-27 |
| 1.1.7-SNAPSHOT | 预约单支付成功接口增加预约任务 | wuping | 2020-03-10 |
| 1.1.8-SNAPSHOT | 预约单接单接口增加预约任务 | wuping | 2020-03-17 |
| 1.1.9-SNAPSHOT | 新增manager基础类 | 侯书虎 | 2020-04-2 |
| 1.2.0-SNAPSHOT | 新增订单商品汇总下载接口 | 侯书虎 | 2020-04-07 |
| 1.3.0-SNAPSHOT | 代码缺,升一个版本 | 丁凯 | 2020-04-16 |
| 1.3.1-SNAPSHOT | 增加实际配送费字段 | 海波 | 2020-04-17 |
| 1.3.2-SNAPSHOT | 增加异常单状态字段 | 李小二 | 2020-04-17 |
| 1.3.3-SNAPSHOT | 创建售后单接口增加任务 | wuping | 2020-04-27 |
| 1.3.4-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
| 1.3.5-SNAPSHOT | 费用实体添加字段:实际费用 | 胡超 | 2020-04-29 |
| 1.3.6-SNAPSHOT | 增加售后阶段 | 海波 | 2020-05-07 |
| 1.4.0-SNAPSHOT | 增加售后阶段 | 海波 | 2020-05-07 |
| 1.4.1-SNAPSHOT | 发送pos消息中心新增字段 | 侯书虎 | 2020-05-07 |
| 1.4.2-SNAPSHOT | 创建订单增加appid字段 | wuping | 2020-05-08 |
| 1.4.3-SNAPSHOT | 全单退增加配送费字段 | 海波 | 2020-05-12 |
| 1.4.4-SNAPSHOT | 规范extInfo类 | 侯书虎 | 2020-05-14 |
| 1.4.5-SNAPSHOT | 客如云接口 | 海波 | 2020-05-14 |
| 1.4.7-SNAPSHOT | 增加订单支付方式类型 | 海波 | 2020-05-18 |
| 1.4.8-SNAPSHOT | 售后ES查询增加跟踪号 | 海波 | 2020-05-25 |
| 1.4.9-SNAPSHOT | 客如云接口 | 海波 | 2020-05-26 |
| 1.1.9-SNAPSHOT | 创建订单增加appid字段 | wuping | 2020-05-08 |
| 1.3.3-SNAPSHOT | 创建售后单接口增加任务 | wuping | 2020-04-27 |
| 1.3.4-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
| 1.2.10.RELEASE | 增加售后单任务 | wuping | 2020-05-21 |
| 1.2.11.RELEASE | 增加订单支付方式 | 海波 | 2020-05-25 |
| 1.3.1.RELEASE | 增加下游订单号 | 海波 | 2020-06-01 |
| 1.4.12-SNAPSHOT | 增加新接口:新增结算信息 | wuping | 2020-05-28 |
| 1.4.13-SNAPSHOT | 用户订单和es综合查询接口新增订单业务类型集合 | wuping | 2020-06-01 |
| 1.4.14-SNAPSHOT | 增加非码微店类型 | 梁崇福 | 2020-06-05 |
| 1.4.15-SNAPSHOT | 预约单任务删除 | wuping | 2020-06-05 |
| 1.4.16-SNAPSHOT | 围餐 | dingkai | 2020-06-08 |
| 1.4.17-SNAPSHOT | 农工商停车 | dingkai | 2020-06-12 |
| 1.4.18-SNAPSHOT | 添加小助手营业额查询 | 梁崇福 | 2020-06-12 |
......@@ -76,6 +76,7 @@ public class CustomerScoreService implements IPromotionService {
} else {
if (StringUtils.isNotBlank(shoppingCartInfoRequestVo.getCouponCode()) || (calculationDiscountResult != null && calculationDiscountResult.getTotalDiscountAmount().intValue() > 0)
|| (calculationDiscountResult != null && !CollectionUtils.isEmpty(calculationDiscountResult.getDiscounts()))) {
//是否有换购
int type81 = 0;
for (ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discount : calculationDiscountResult.getDiscounts()) {
if (ActivityTypeEnum.TYPE_81.getCode().equals(discount.getType())) {
......@@ -83,9 +84,22 @@ public class CustomerScoreService implements IPromotionService {
break;
}
}
//积分抵扣开关禁用 过滤换购
if (type81 == 0 || (type81 == 1 && !CollectionUtils.isEmpty(shoppingCartInfoRequestVo.getSendGoods()))
|| (type81 == 1 && calculationDiscountResult.getDiscounts().size() > 1)) {
//集点
int discountCount = calculationDiscountResult.getDiscounts().size();
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);
userScoreUseDetail.getResult().setScoreState(5);
discountAmount = 0;
......
......@@ -417,7 +417,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if ((availableStocks != null) && (ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(availableStocks.getCode()))) {
if ((CollectionUtils.isEmpty(availableStocks.getResult())) || (qty > availableStocks.getResult().get(0).getQty())) {
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 ServiceException(ResponseResult.SHOPPING_CART_STOCK_NOT_HAVE);
......@@ -1249,7 +1249,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
(CollectionUtils.isEmpty(availableStocks.getResult()) || availableStocks.getResult().get(0).getQty() == null
|| availableStocks.getResult().get(0).getQty() < qty)) {
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 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