Commit 21a49b86 by 徐康

Merge remote-tracking branch 'origin/qa' into qa

parents 28795853 44f0210c
......@@ -26,4 +26,7 @@ public class PayGitCheckAndJoinRequestDto {
private Integer orderWay;
private List<String> skuIds;
// 版本号
private Integer ver;
}
......@@ -940,7 +940,7 @@ public class OrderServiceImpl implements Orderservice {
// 所以在这个地方排除掉coco,在下边单独实现
//参与支付有礼活动
if(!cocoPartnerId.contains(queryOrderVo.getPartnerId())){
joinPayGift(queryOrderVo.getSessionId(), queryOrderResponseVo);
joinPayGift(queryOrderVo.getSessionId(), queryOrderResponseVo,partnerId);
}
} catch (Exception e) {
......@@ -953,7 +953,7 @@ public class OrderServiceImpl implements Orderservice {
if(cocoPartnerId.contains(queryOrderVo.getPartnerId())){
queryOrderResponseVos.forEach(queryOrderResponseVo -> {
try {
joinPayGift(queryOrderVo.getSessionId(), queryOrderResponseVo);
joinPayGift(queryOrderVo.getSessionId(), queryOrderResponseVo,partnerId);
} catch (Exception e) {
LogUtil.error("coco_queryOrders_activity_error", gson.toJson(queryOrdersDto), gson.toJson(queryOrderResponseVo), e);
......@@ -1277,7 +1277,7 @@ public class OrderServiceImpl implements Orderservice {
}
//参与支付有礼活动
private void joinPayGift(String sessionId, QueryOrderResponseVo queryOrderResponseVo) {
private void joinPayGift(String sessionId, QueryOrderResponseVo queryOrderResponseVo,String partnerId) {
PayGitCheckAndJoinRequestDto payGitRequestDto = new PayGitCheckAndJoinRequestDto();
payGitRequestDto.setStoreId(queryOrderResponseVo.getShopId());
payGitRequestDto.setSessionId(sessionId);
......@@ -1298,6 +1298,11 @@ public class OrderServiceImpl implements Orderservice {
} else {
payGitRequestDto.setOrderWay(2);
}
if(cocoPartnerId.contains(partnerId)){
payGitRequestDto.setVer(1);
}
BaseResponse<PayGiftCheckAndJoinResponseDto> payGiftBaseResponse = activityApplicationClient.payGiftCheckAndJoin(payGitRequestDto);
if (String.valueOf(RESPONSE_SUCCESS_CODE).equals(payGiftBaseResponse.getCode()) && payGiftBaseResponse.getResult() != null) {
PayGiftCheckAndJoinResponseDto payGiftResponse = payGiftBaseResponse.getResult();
......@@ -1463,7 +1468,7 @@ public class OrderServiceImpl implements Orderservice {
// 支付有礼
// 目前只有coco在订单详情参加支付有礼,且不检查订单的状态
if(cocoPartnerId.contains(partnerId)){
joinPayGift(sessionId, queryOrderResponseVo);
joinPayGift(sessionId, queryOrderResponseVo,partnerId);
}
......
......@@ -702,9 +702,7 @@ public class ShoppingCartConvertAdapter {
productComboType = parentProductBean.getProductComboList().stream().filter(p -> ObjectUtils.equals(comboxGoods.getGoodsId(), p.getProductId())).findFirst().orElse(new ProductTypeBeanDTO.ProductComboType());
} else {
Map<String, ProductTypeBeanDTO.ProductGroupType.GroupDetailType> map = new HashMap<>();
if (CollectionUtils.isNotEmpty(parentProductBean.getAdditionalGroupList())){
parentProductBean.getProductGroupList().stream().map(t -> t.getGroupDetail()).forEach(group -> group.forEach(detailType -> map.put(detailType.getProductId(), detailType)));
}
groupDetailType = map.get(comboxGoods.getGoodsId());
}
......@@ -736,12 +734,52 @@ public class ShoppingCartConvertAdapter {
comboxGoods.setTaxId(isComboxGoods ? (StringUtils.isNotEmpty(productComboType.getTaxId()) ? productComboType.getTaxId() : "") :
(StringUtils.isNotEmpty(groupDetailType.getTaxId()) ? groupDetailType.getTaxId() : ""));
//2020/12/10 套餐内可选商品加料
//2020/12/15 套餐内可选商品加料,暂无
if(CollectionUtils.isNotEmpty(comboxGoods.getProductMaterialList())){
if (CollectionUtils.isNotEmpty(parentProductBean.getAdditionalGroupList())) {
List<ProductTypeBeanDTO.ProductGroupType.GroupDetailType> groupDetail = new ArrayList<>();
for (ProductTypeBeanDTO.ProductGroupType productGroupType : parentProductBean.getAdditionalGroupList()){
groupDetail.addAll(productGroupType.getGroupDetail());
}
for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods productMaterial :comboxGoods.getProductMaterialList()){
for (ProductTypeBeanDTO.ProductGroupType.GroupDetailType productGroupType : groupDetail){
if(productGroupType.getProductId().equals(productMaterial.getSpuId())){
productMaterial.setSpuId(productGroupType.getProductId());
productMaterial.setAmount(productGroupType.getProductFinalPrice().longValue());
productMaterial.setFinalPrice(productGroupType.getProductFinalPrice().longValue());
productMaterial.setOriginalAmount(productGroupType.getProductFinalPrice().longValue());
productMaterial.setOriginalPrice(productGroupType.getProductFinalPrice().longValue());
productMaterial.setSpuName(productGroupType.getProductName());
}
}
}
}else {
if(CollectionUtils.isNotEmpty(parentProductBean.getAdditionalGroupList())){
List<ProductTypeBeanDTO.ProductGroupType.GroupDetailType> groupDetail = new ArrayList<>();
for (ProductTypeBeanDTO.ProductGroupType productGroupType : parentProductBean.getAdditionalGroupList()){
groupDetail.addAll(productGroupType.getGroupDetail());
}
for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.MaterialGoods productMaterial :comboxGoods.getProductMaterialList()){
for (ProductTypeBeanDTO.ProductGroupType.GroupDetailType productGroupType : groupDetail){
if(productGroupType.getProductId().equals(productMaterial.getSpuId())){
productMaterial.setSpuId(productGroupType.getProductId());
productMaterial.setAmount(productGroupType.getProductFinalPrice().longValue());
productMaterial.setFinalPrice(productGroupType.getProductFinalPrice().longValue());
productMaterial.setOriginalAmount(productGroupType.getProductFinalPrice().longValue());
productMaterial.setOriginalPrice(productGroupType.getProductFinalPrice().longValue());
productMaterial.setSpuName(productGroupType.getProductName());
}
}
}
}else {
//都不存在移除商品
comboxGoods.setProductMaterialList(new ArrayList<>());
}
}
}
}
private Map<String, String> getAttributesNew(List<com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.CartGoodsExtra> extra) {
if (CollectionUtils.isEmpty(extra)) {
return new HashMap<>();
......@@ -942,7 +980,8 @@ public class ShoppingCartConvertAdapter {
}
}else {
for (com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods.ComboxGoods productGroup : cartGoods.getProductGroupList()) {
updateComboxGoodsInfoForMCoffee(productGroup, spuProduct, false);
ProductTypeBeanDTO productBeanDTO = subProductTypeMap.get(productGroup.getSpuId());
updateComboxGoodsInfoForMCoffee(productGroup, productBeanDTO, false);
}
}
}
......
......@@ -147,6 +147,7 @@ public class CocoActiveServiceImpl implements ActiveService {
newCartGoods.setClassificationName(cgs.getClassificationName());
newCartGoods.setActivityType(discount.getType());
newCartGoods.setQty(discountForGift.get(cgs.getCartGoodsUid()).getGoodsQuantity());
newCartGoods.setProductMaterialList(cgs.getProductMaterialList());
addcartGoodsList.add(newCartGoods);
}
}
......
......@@ -186,6 +186,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
newCartGoods.setClassificationName(cgs.getClassificationName());
newCartGoods.setActivityType(activityType);
newCartGoods.setQty(qty);
newCartGoods.setProductMaterialList(cgs.getProductMaterialList());
return newCartGoods;
}
......
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