Commit 35b8f3d9 by 刘鹏飞

Merge remote-tracking branch 'origin/feature/coco-payGift-刘鹏飞' into feature/coco-payGift-刘鹏飞

parents 019f4c6b a81dee7a
...@@ -266,7 +266,7 @@ public class OrderSdkAdapter { ...@@ -266,7 +266,7 @@ public class OrderSdkAdapter {
// 买一赠一寄件信息 // 买一赠一寄件信息
if(requestVO.getChooseGoods() != null && !requestVO.getChooseGoods().isEmpty()){ if(requestVO.getChooseGoods() != null && !requestVO.getChooseGoods().isEmpty()){
request.setChooseGoods(JSONArray.parseArray(JSONObject.toJSONString(requestVO.getChooseGoods()), CreateOrderRequest.ChooseGood.class)); request.setOrderSendCouponRespList(JSONArray.parseArray(JSONObject.toJSONString(requestVO.getChooseGoods()), CreateOrderRequest.ChooseGood.class));
} }
return request; return request;
......
...@@ -176,7 +176,6 @@ public class OrderServiceImpl implements Orderservice { ...@@ -176,7 +176,6 @@ public class OrderServiceImpl implements Orderservice {
private String cloudPrintQueue; private String cloudPrintQueue;
@Value("${mq.cloud_print_exchange}") @Value("${mq.cloud_print_exchange}")
private String cloud_print_exchange; private String cloud_print_exchange;
/** /**
* coco商户 * coco商户
*/ */
...@@ -1288,12 +1287,14 @@ public class OrderServiceImpl implements Orderservice { ...@@ -1288,12 +1287,14 @@ public class OrderServiceImpl implements Orderservice {
queryOrderResponseVo.setRedpacketsPicture(getRedpacketsPicture(activityId)); queryOrderResponseVo.setRedpacketsPicture(getRedpacketsPicture(activityId));
} }
// 支付有礼 // 支付有礼
// 目前只有coco在订单详情参加支付有礼,且不检查订单的状态 // 目前只有coco在订单详情参加支付有礼,且不检查订单的状态
if(cocoPartnerId.contains(partnerId)){ if(cocoPartnerId.contains(partnerId)){
joinPayGift(sessionId, queryOrderResponseVo); joinPayGift(sessionId, queryOrderResponseVo);
} }
buildQueryOrderResponseVo(queryOrderResponseVo,response); buildQueryOrderResponseVo(queryOrderResponseVo,response);
return ResponseUtil.success(queryOrderResponseVo); return ResponseUtil.success(queryOrderResponseVo);
...@@ -3109,18 +3110,6 @@ public class OrderServiceImpl implements Orderservice { ...@@ -3109,18 +3110,6 @@ public class OrderServiceImpl implements Orderservice {
return ResponseUtil.success(responses.getData()); return ResponseUtil.success(responses.getData());
} }
public String getMealCodeRule(String appId){
String mealCodeRule = "";
List<AssortmentOpenPlatformPartnerWxappConfig> partnerWxappConfigs = orderAdapter.cacheSelectDefaultPage(appId, "2");
Map<String, AssortmentOpenPlatformPartnerWxappConfig> configMap = partnerWxappConfigs.stream().collect(Collectors.toMap(AssortmentOpenPlatformPartnerWxappConfig::getAppKey, Function.identity()));
AssortmentOpenPlatformPartnerWxappConfig refundDeliveryFeeConfig = configMap.get("mealCodeRule");
if(null != refundDeliveryFeeConfig) {
mealCodeRule = refundDeliveryFeeConfig.getAppValue();
}
return mealCodeRule;
}
public void buildQueryOrderResponseVo(QueryOrderResponseVo queryOrderResponseVo,QueryOrderByIdResponse response) { public void buildQueryOrderResponseVo(QueryOrderResponseVo queryOrderResponseVo,QueryOrderByIdResponse response) {
List<QueryOrderResponseVo.chooseGood> chooseGoods = new ArrayList<>(); List<QueryOrderResponseVo.chooseGood> chooseGoods = new ArrayList<>();
...@@ -3140,4 +3129,16 @@ public class OrderServiceImpl implements Orderservice { ...@@ -3140,4 +3129,16 @@ public class OrderServiceImpl implements Orderservice {
queryOrderResponseVo.setChooseGoods(chooseGoods); queryOrderResponseVo.setChooseGoods(chooseGoods);
} }
public String getMealCodeRule(String appId){
String mealCodeRule = "";
List<AssortmentOpenPlatformPartnerWxappConfig> partnerWxappConfigs = orderAdapter.cacheSelectDefaultPage(appId, "2");
Map<String, AssortmentOpenPlatformPartnerWxappConfig> configMap = partnerWxappConfigs.stream().collect(Collectors.toMap(AssortmentOpenPlatformPartnerWxappConfig::getAppKey, Function.identity()));
AssortmentOpenPlatformPartnerWxappConfig refundDeliveryFeeConfig = configMap.get("mealCodeRule");
if(null != refundDeliveryFeeConfig) {
mealCodeRule = refundDeliveryFeeConfig.getAppValue();
}
return mealCodeRule;
}
} }
...@@ -218,7 +218,7 @@ public class CreateOrderRequest extends BaseRequest { ...@@ -218,7 +218,7 @@ public class CreateOrderRequest extends BaseRequest {
/** /**
* 买一赠一选择的商品 * 买一赠一选择的商品
*/ */
private List<ChooseGood> chooseGoods; private List<ChooseGood> orderSendCouponRespList;
@Data @Data
public static class ChooseGood { public static class ChooseGood {
......
...@@ -214,7 +214,7 @@ public class GiftSharingService { ...@@ -214,7 +214,7 @@ public class GiftSharingService {
public CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount discountInfo(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods goods) { public CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount discountInfo(CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods goods) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount discount = goods.getDiscounts() CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods.GoodsDiscount discount = goods.getDiscounts()
.stream() .stream()
.filter(g -> ActivityTypeEnum.TYPE_62.getCode().equals(g.getType()) || ActivityTypeEnum.TYPE_61.getCode().equals(g.getType())) .filter(g -> ActivityTypeEnum.TYPE_63.getCode().equals(g.getType()) || ActivityTypeEnum.TYPE_62.getCode().equals(g.getType()) || ActivityTypeEnum.TYPE_61.getCode().equals(g.getType()))
.findFirst() .findFirst()
.get(); .get();
return discount; return discount;
......
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