Commit f7f4509e by xiaoer.li

Merge remote-tracking branch 'remotes/origin/feature/1.9.26_加车库存校验' into qa

# Conflicts:
#	assortment-ordercenter-sdk/pom.xml
#	assortment-ordercenter-sdk/readme.md
#	order-application-service/pom.xml
#	order-management/pom.xml
#	ordercenter-sdk/pom.xml
#	ordercenter-sdk/readme.md
#	shopping-cart-application-service/pom.xml
parents 67851ba0 c209442f
......@@ -326,7 +326,9 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
if(activityTypes.contains(221)){
DiscountDTO discountDTO=baseResponse.getData().getDiscounts().stream().filter(d -> 221==d.getType()).findFirst().get();
SendPointRequest pointRequest=memberSdkAdapter.convert2SendPointRequest(confirmOrderRequest,orderByIdResponse.getData(),discountDTO);
memberPropertyService.sendMemberPoint(pointRequest,confirmOrderRequest.getTrackingNo());
if (pointRequest.getSendPoint() != 0) {
memberPropertyService.sendMemberPoint(pointRequest,confirmOrderRequest.getTrackingNo());
}
}
return orderSdkAdapter.convent2PayAccessResponse(response);
......
......@@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>assortment-shoppingcart-sdk</artifactId>
<version>1.1.1.RELEASE</version>
<version>1.1.2.RELEASE</version>
<dependencies>
<dependency>
......@@ -48,7 +48,7 @@
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
<artifactId>couponcenter-sdk</artifactId>
<version>1.8.15.RELEASE</version>
<version>1.9.2.RELEASE</version>
<scope>provided</scope>
</dependency>
<dependency>
......
......@@ -2,4 +2,5 @@
| 版本号 | 版本说明 | 更新人 | 更新时间 |
| --------------| ------------ | ------------- | ---------- |
| 1.1.0.RELEASE| 第一个release版本 | 丁凯 | 2020-03-04 |
| 1.1.1.RELEASE| 升级券码sdk | 胡超 | 2020-05-18 |
\ No newline at end of file
| 1.1.1.RELEASE| 升级券码sdk | 胡超 | 2020-05-18 |
| 1.1.2.RELEASE| 券码接口修改为channel_code | 胡超 | 2020-06-08 |
\ No newline at end of file
......@@ -45,7 +45,7 @@
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
<artifactId>productcenter-sdk</artifactId>
<version>2.8.4-SNAPSHOT</version>
<version>2.6.RELEASE</version>
</dependency>
<dependency>
<artifactId>membercenter-sdk</artifactId>
......@@ -124,7 +124,7 @@
<dependency>
<artifactId>assortment-data-manager</artifactId>
<groupId>com.freemud.sdk.api.assortment</groupId>
<version>4.7.2-SNAPSHOT</version>
<version>4.6.1-RELEASE</version>
</dependency>
<dependency>
<groupId>cn.freemud.commons</groupId>
......
......@@ -58,7 +58,7 @@
<dependency>
<groupId>com.freemud.sdk.api.assortment</groupId>
<artifactId>assortment-payment-sdk</artifactId>
<version>2.5.4-RELEASE</version>
<version>2.4.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
......
......@@ -3,20 +3,11 @@
| 版本号 | 版本说明 | 更新人 | 更新时间 |
| ------------ | ---------------- | ------ | ---------- |
| 1.0.0-SNAPSHOT | 迁移后包明改为cn.freemud开头第一版 | wuping | 2019-12-16 |
| 1.1.0.RELEASE| 1.9.8需求打包release版本 | 侯书虎 | 2019-12-26 |
| 1.1.1.RELEASE| 1.9.9需求打包release版本 | 丁凯 | 2020-01-08 |
| 1.1.2.RELEASE| 农工商订单submit | 侯书虎 | 2020-01-13 |
| 1.1.3.RELEASE| 开放平台创建订单 | 姜海波 | 2020-02-24 |
| 1.1.4-SNAPSHOT | 优化活动订单 | 胡超 | 2020-02-10 |
| 1.1.6-SNAPSHOT | OrderExtInfo新增formId | wuping | 2020-02-27 |
| 1.1.6.RELEASE | 升级RELEASE | wuping | 2020-03-04 |
| 1.1.7-SNAPSHOT | 预约单支付成功接口增加预约任务 | wuping | 2020-03-10 |
| 1.1.8-SNAPSHOT | 预约单接单接口增加预约任务 | wuping | 2020-03-17 |
| 1.1.8.RELEASE | 预约单升级RELEASE | wuping | 2020-03-18 |
| 1.1.9.RELEASE | 满额减配送费RELEASE | dingkai | 2020-03-26 |
| 1.2.0.RELEASE | 新增订单商品汇总下载接口 | 侯书虎 | 2020-04-07 |
| 1.2.1.RELEASE | oms接单 | 侯书虎 | 2020-04-13 |
| 1.2.2.RELEASE | 新增真实配送费 | 海波 | 2020-04-27 |
| 1.3.3-SNAPSHOT | 创建售后单接口增加任务 | wuping | 2020-04-27 |
| 1.3.4-SNAPSHOT | 取消订单增加任务 | wuping | 2020-04-28 |
| 1.2.2.RELEASE | ES查询增加异常单状态 | 李小二 | 2020-04-27 |
......@@ -26,14 +17,9 @@
| 1.2.6.RELEASE | 增加售后阶段 | 海波 | 2020-05-14 |
| 1.2.7.RELEASE | 全单退增加是否退配送费 | 海波 | 2020-05-14 |
| 1.1.9-SNAPSHOT | 创建订单增加appid字段 | wuping | 2020-05-08 |
| 1.2.8.RELEASE | 1.1.9-SNAPSHOT升RELEASE版本 | wuping | 2020-05-18 |
| 1.2.9.RELEASE | 规范orderExtInfoDto | 侯书虎 | 2020-05-19 |
| 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.4.12-SNAPSHOT | 增加新接口:新增结算信息 | wuping | 2020-05-28 |
| 1.4.13-SNAPSHOT | 用户订单和es综合查询接口新增订单业务类型集合 | wuping | 2020-06-01 |
| 1.2.11.RELEASE | 增加订单支付方式 | 海波 | 2020-05-25 |
| 1.3.1.RELEASE | 增加下游订单号 | 海波 | 2020-06-01 |
| 1.4.14-SNAPSHOT | 增加非码微店类型 | 梁崇福 | 2020-06-05 |
| 1.3.13-SNAPSHOT | 预约单任务删除 | wuping | 2020-06-05 |
\ No newline at end of file
......@@ -247,8 +247,11 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
if (CollectionUtils.isEmpty(allCartGoodsList)) {
allCartGoodsList = new ArrayList<>();
}
Integer checkQty = allCartGoodsList.indexOf(cartGoods) != -1 ?
allCartGoodsList.get(allCartGoodsList.indexOf(cartGoods)).getQty() + cartGoods.getQty() : cartGoods.getQty();
/**
Integer checkQty = allCartGoodsList.indexOf(cartGoods) != -1 ?
allCartGoodsList.get(allCartGoodsList.indexOf(cartGoods)).getQty() + cartGoods.getQty() : cartGoods.getQty();
*/
Integer checkQty = this.checkSkuQty(allCartGoodsList, cartGoods);
//查询多个商品库存信息
queryManyGoodsStocks(addShoppingCartGoodsRequestVo, productIds, productBeanListSpuClass, skuId, checkQty);
......@@ -258,7 +261,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
// 当添加的商品不是商品券时
if (!spuId.startsWith(CommonsConstant.COUPON_PREFIX)) {
//添加非商品券商品
addNotProductGoods(addShoppingCartGoodsRequestVo, cartGoods, goodsId, userId, shoppingCartGoodsResponseVo, allCartGoodsList);
addNotProductGoods(addShoppingCartGoodsRequestVo, cartGoods, goodsId, userId, shoppingCartGoodsResponseVo, allCartGoodsList);
} else {
// 当商品是商品券,里面会判断如果购物车中已有商品券,会将cartGoods的CartGoodsUid设为null
this.addProductGoods(addShoppingCartGoodsRequestVo, cartGoods, spuId2, userId, shoppingCartGoodsResponseVo,
......@@ -1513,4 +1516,24 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return sessionUserInfo.getResult();
}
/**
* 检查sku数量
*
* @param allCartGoodsList
* @param cartGoods
* @return
*/
private Integer checkSkuQty(List<CartGoods> allCartGoodsList, CartGoods cartGoods) {
Integer qty = 0;
if (allCartGoodsList == null) {
qty = cartGoods.getQty();
} else {
for (CartGoods goods : allCartGoodsList) {
if (goods.getSkuId().equals(cartGoods.getSkuId()) && goods.getSpuId().equals(cartGoods.getSpuId())) {
qty = qty + cartGoods.getQty();
}
}
}
return qty;
}
}
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