Commit 6d423c9c by chongfu.liang

Merge branch 'feature/2.0.4-修改支持的订单类型' into qa

# Conflicts:
#	assortment-ordercenter-sdk/pom.xml
#	assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/service/order/OrderCenterSdkServiceImpl.java
#	order-application-service/pom.xml
#	order-management/pom.xml
#	ordercenter-sdk/pom.xml
#	shopping-cart-application-service/src/main/java/cn/freemud/entities/vo/ShoppingCartGoodsResponseVo.java
#	shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
#	shopping-cart-application-service/src/test/java/cn.freemud/service/CouponTest.java
parents 162fc985 c4c548c9
...@@ -77,3 +77,4 @@ ...@@ -77,3 +77,4 @@
| 2.0.11-RELEASE | 麦咖啡多规格 | 徐康 | 2020-10-09 | | 2.0.11-RELEASE | 麦咖啡多规格 | 徐康 | 2020-10-09 |
| 2.0.12-RELEASE | 停车场订单 | 张志恒 | 2020-10-14 | | 2.0.12-RELEASE | 停车场订单 | 张志恒 | 2020-10-14 |
| 2.0.13-RELEASE | 麦咖啡运费券 | 徐康 | 2020-10-20 | | 2.0.13-RELEASE | 麦咖啡运费券 | 徐康 | 2020-10-20 |
| 2.0.14-RELEASE | 集点推送改造 | 徐康 | 2020-10-28 |
...@@ -71,13 +71,6 @@ public class ConfirmOrderRequest extends BaseConfig { ...@@ -71,13 +71,6 @@ public class ConfirmOrderRequest extends BaseConfig {
*/ */
private String mealCodeRule; private String mealCodeRule;
private String sendPointActivityCode;
private Date sendPointEndTime;
private Integer sendPointSendPoint;
private Integer sendPointMaxNum;
private Integer sendPointValidityDateDays;
@Data @Data
public static class OrderSettlement{ public static class OrderSettlement{
/** /**
......
...@@ -54,6 +54,8 @@ public class DeliveryHandle { ...@@ -54,6 +54,8 @@ public class DeliveryHandle {
@Value("${saas.order.delivery.callBackUrl}") @Value("${saas.order.delivery.callBackUrl}")
private String deliveryCallBackUrl; private String deliveryCallBackUrl;
@Value("${delivery.support.ordersource}")
private String supportOrderSource;
@Autowired @Autowired
private DeliveryService deliveryService; private DeliveryService deliveryService;
...@@ -166,8 +168,11 @@ public class DeliveryHandle { ...@@ -166,8 +168,11 @@ public class DeliveryHandle {
return false; return false;
} }
//订单来源异常 //订单来源异常
if (!orderBean.getSource().equalsIgnoreCase(OrderSourceType.SAAS.getCode())) { String[] supportSource = supportOrderSource.split(","); // OrderSourceType.SAAS.getCode()
return false; for (String source : supportSource){
if (!orderBean.getSource().equalsIgnoreCase(source)) {
return false;
}
} }
//配送信息为空,则不创建配送单 //配送信息为空,则不创建配送单
if (orderBean.getAddInfo() == null || orderBean.getAddInfo().getDeliveryType() == null) { if (orderBean.getAddInfo() == null || orderBean.getAddInfo().getDeliveryType() == null) {
......
...@@ -50,3 +50,5 @@ ...@@ -50,3 +50,5 @@
| 1.3.14.RELEASE | 修复查询订单时transId为null的问题 | 肖家炜 | 2020-09-08 | | 1.3.14.RELEASE | 修复查询订单时transId为null的问题 | 肖家炜 | 2020-09-08 |
| 1.3.15.RELEASE | 停车场订单撤单 | 张志恒 | 2020-09-28 | | 1.3.15.RELEASE | 停车场订单撤单 | 张志恒 | 2020-09-28 |
| 1.3.16.RELEASE | 麦咖啡多规格 | 徐康 | 2020-10-09 | | 1.3.16.RELEASE | 麦咖啡多规格 | 徐康 | 2020-10-09 |
| 1.3.17.RELEASE | 集点推送改造 | 梁崇福 | 2020-10-28 |
package cn.freemud.entities.dto.calculate; package cn.freemud.entities.dto.calculate;
import cn.freemud.entities.dto.CheckSpqInfoResponseDto; import cn.freemud.entities.dto.CheckSpqInfoResponseDto;
import cn.freemud.entities.dto.shoppingCart.SendPoint;
import cn.freemud.entities.vo.SubtractStockVO; import cn.freemud.entities.vo.SubtractStockVO;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -100,6 +102,7 @@ public class CalculationSharingDiscountResponseDto { ...@@ -100,6 +102,7 @@ public class CalculationSharingDiscountResponseDto {
*/ */
private Long distributionFee; private Long distributionFee;
private SendPoint sendPointVo;
@Data @Data
public static class ActivityPrompt { public static class ActivityPrompt {
...@@ -154,6 +157,18 @@ public class CalculationSharingDiscountResponseDto { ...@@ -154,6 +157,18 @@ public class CalculationSharingDiscountResponseDto {
private Integer type; private Integer type;
private Long thresholdAmount; private Long thresholdAmount;
private SendPointDto sendPointVo;
private Date endTime;
}
@Data
public static class SendPointDto {
private String activityCode;
private Integer sendPoint;
private Integer maxNum;
private Integer exchangeNum;
private Integer validityDateDays;
private Date endTime;
} }
@Data @Data
......
...@@ -984,7 +984,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -984,7 +984,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
List<Integer> activityTypes = result.getDiscounts().stream().map(ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount::getType).collect(Collectors.toList()); List<Integer> activityTypes = result.getDiscounts().stream().map(ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount::getType).collect(Collectors.toList());
if (activityTypes.contains(221)) { if (activityTypes.contains(221)) {
ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discountDTO = result.getDiscounts().stream().filter(d -> 221 == d.getType()).findFirst().get(); ActivityCalculationDiscountResponseDto.CalculationDiscountResult.Discount discountDTO = result.getDiscounts().stream().filter(d -> 221 == d.getType()).findFirst().get();
log.error("/calculation/discount response :{}", JSONObject.toJSONString(discountDTO));
convert2SendPoint(result, discountDTO); convert2SendPoint(result, discountDTO);
} }
result.setValidCouponMap(validCouponMap); result.setValidCouponMap(validCouponMap);
......
package cn.freemud.service.impl.calculate; package cn.freemud.service.impl.calculate;
import cn.freemud.constant.ResponseCodeConstant; import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.entities.dto.ActivityCalculationDiscountResponseDto;
import cn.freemud.entities.dto.CheckSpqInfoRequestDto; import cn.freemud.entities.dto.CheckSpqInfoRequestDto;
import cn.freemud.entities.dto.CheckSpqInfoResponseDto; import cn.freemud.entities.dto.CheckSpqInfoResponseDto;
import cn.freemud.entities.dto.calculate.CalculationSharingDiscountRequestDto; import cn.freemud.entities.dto.calculate.CalculationSharingDiscountRequestDto;
import cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto; import cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto;
import cn.freemud.entities.dto.shoppingCart.SendPoint;
import cn.freemud.entities.vo.CartGoods; import cn.freemud.entities.vo.CartGoods;
import cn.freemud.entities.vo.ShoppingCartInfoRequestVo; import cn.freemud.entities.vo.ShoppingCartInfoRequestVo;
import cn.freemud.enums.*; import cn.freemud.enums.*;
...@@ -29,6 +31,7 @@ import java.util.ArrayList; ...@@ -29,6 +31,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors;
/** /**
* All rights Reserved, Designed By www.freemud.cn * All rights Reserved, Designed By www.freemud.cn
...@@ -168,6 +171,12 @@ public class CalculationSharingDiscountService { ...@@ -168,6 +171,12 @@ public class CalculationSharingDiscountService {
// 返回成功 // 返回成功
if (sharingDiscountResponseDto != null && StringUtils.equals(sharingDiscountResponseDto.getStatusCode(), ResponseCodeConstant.RESPONSE_SUCCESS_STR)) { if (sharingDiscountResponseDto != null && StringUtils.equals(sharingDiscountResponseDto.getStatusCode(), ResponseCodeConstant.RESPONSE_SUCCESS_STR)) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult result = sharingDiscountResponseDto.getResult(); CalculationSharingDiscountResponseDto.CalculationDiscountResult result = sharingDiscountResponseDto.getResult();
List<Integer> activityTypes = result.getDiscounts().stream().map(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Discount::getType).collect(Collectors.toList());
if (activityTypes.contains(221)) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Discount discountDTO = result.getDiscounts().stream().filter(d -> 221 == d.getType()).findFirst().get();
convert2SendPoint(result, discountDTO);
}
result.setValidCouponMap(validCouponMap); result.setValidCouponMap(validCouponMap);
result.setDeliveryAmount(deliveryAmount); result.setDeliveryAmount(deliveryAmount);
result.setDistributionFee(result.getDistributionFee()); result.setDistributionFee(result.getDistributionFee());
...@@ -179,6 +188,20 @@ public class CalculationSharingDiscountService { ...@@ -179,6 +188,20 @@ public class CalculationSharingDiscountService {
return null; return null;
} }
private void convert2SendPoint(CalculationSharingDiscountResponseDto.CalculationDiscountResult result, CalculationSharingDiscountResponseDto.CalculationDiscountResult.Discount discountDTO) {
SendPoint sendPointNew = new SendPoint();
CalculationSharingDiscountResponseDto.CalculationDiscountResult.SendPointDto sendPointVo = discountDTO.getSendPointVo();
if (sendPointVo != null) {
sendPointNew.setMaxNum(sendPointVo.getMaxNum());
sendPointNew.setSendPoint(sendPointVo.getSendPoint());
sendPointNew.setValidityDateDays(sendPointVo.getValidityDateDays());
sendPointNew.setActivityCode(discountDTO.getActivityCode());
sendPointNew.setEndTime(discountDTO.getEndTime());
result.setSendPointVo(sendPointNew);
}
}
/** /**
* 实物商品 * 实物商品
* @param calculationDiscountGoodsList * @param calculationDiscountGoodsList
......
...@@ -136,6 +136,7 @@ public class CalculationSharingEquallyService { ...@@ -136,6 +136,7 @@ public class CalculationSharingEquallyService {
calculationCommonService.setAddAndUpdateResponse(cartGoodsList, shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo, ShoppingCartConstant.QUERY_INFO); calculationCommonService.setAddAndUpdateResponse(cartGoodsList, shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo, ShoppingCartConstant.QUERY_INFO);
calculationCommonService.addNeedCardAmount(shoppingCartInfoRequestVo, shoppingCartGoodsResponseVo); calculationCommonService.addNeedCardAmount(shoppingCartInfoRequestVo, shoppingCartGoodsResponseVo);
shoppingCartGoodsDto.setSendPoint(discountResult.getSendPointVo());
shoppingCartGoodsDto.setDeliveryAmount(shoppingCartGoodsResponseVo.getDeliveryAmount()); shoppingCartGoodsDto.setDeliveryAmount(shoppingCartGoodsResponseVo.getDeliveryAmount());
shoppingCartGoodsDto.setDiscountDeliveryAmount(shoppingCartGoodsResponseVo.getDiscountDeliveryAmount()); shoppingCartGoodsDto.setDiscountDeliveryAmount(shoppingCartGoodsResponseVo.getDiscountDeliveryAmount());
shoppingCartGoodsDto.setThresholdAmount(shoppingCartGoodsResponseVo.getThresholdAmount()); shoppingCartGoodsDto.setThresholdAmount(shoppingCartGoodsResponseVo.getThresholdAmount());
......
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