Commit a68866ed by 周晓航

新增接口 查询促销反馈是否是 V3算计

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent c0123d50
......@@ -284,6 +284,17 @@ public class ShoppingCartController {
return SDKCommonBaseContextWare.getBean(ShoppingCartNewServiceImpl.class).replaceGoodsByShop(request);
}
/**
* 一单多券
* 券码需要知道配置的数据 是否是V3算价
*
*/
@PostMapping(value = "/getV3Promotion")
@ApiAnnotation(logMessage = "/getV3Promotion")
public BaseResponse getV3Promotion(@LogParams @RequestBody @Validated BaseRequestVo request) {
return SDKCommonBaseContextWare.getBean(ShoppingCartNewServiceImpl.class).getV3Promotion(request);
}
@Autowired
private ShoppingCartBaseServiceImpl shoppingCartService;
......
......@@ -5,7 +5,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class ActivityBaseResponseDto {
public class ActivityBaseResponseDto<T> {
private int ver;
/**
......@@ -14,9 +14,9 @@ public class ActivityBaseResponseDto {
private String statusCode;
/**
*状态码描述
* 状态码描述
*/
private String msg;
private T result;
}
package cn.freemud.entities.dto.shoppingCart;
import lombok.Data;
/**
* @author : xh.Z
* @email : fisherman0510@163.com
* @Date : 2021/10/20 上午11:32
* @description :
*/
@Data
public class PromotionResultVO {
private boolean v3Promotion;
}
......@@ -315,4 +315,6 @@ public interface ShoppingCartNewService {
default BaseResponse<PremiumExchangeResponseVo> premiumExchange(PremiumExchangeRequestVo request){
return null;
};
BaseResponse getV3Promotion(BaseRequestVo request);
}
......@@ -926,6 +926,11 @@ public class ShoppingCartCollageServiceImpl extends AbstractShoppingCartImpl imp
return nowCartGoodsList;
}
@Override
public BaseResponse getV3Promotion(BaseRequestVo request) {
return null;
}
public List<CartGoods> getShoppingCart(AddShoppingCartGoodsRequestVo addShoppingCartGoodsRequestVo) {
return null;
}
......
......@@ -780,6 +780,11 @@ public class ShoppingCartMallServiceImpl implements ShoppingCartNewService {
return nowCartGoodsList;
}
@Override
public BaseResponse getV3Promotion(BaseRequestVo request) {
return null;
}
/**
* 添加非商品券商品
*
......
......@@ -678,6 +678,11 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService {
return oldAllCartGoodsList;
}
@Override
public BaseResponse getV3Promotion(BaseRequestVo request) {
return null;
}
private void checkBase(CustomerInfoVo assortmentCustomerInfoVo) {
if (assortmentCustomerInfoVo == null || assortmentCustomerInfoVo.getMemberId() == null) {
......
......@@ -32,6 +32,7 @@ import cn.freemud.entities.dto.calculate.ActivityCalculationDiscountResponseDto;
import cn.freemud.entities.dto.openplatform.WeixinProductRequestDto;
import cn.freemud.entities.dto.openplatform.WeixinProductResponseDto;
import cn.freemud.entities.dto.pay.*;
import cn.freemud.entities.dto.shoppingCart.PromotionResultVO;
import cn.freemud.entities.dto.shoppingCart.SendPoint;
import cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto;
import cn.freemud.entities.dto.user.GetUserScoreUseDetailRequest;
......@@ -3165,6 +3166,19 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
return ResponseUtil.success(premiumExchangeResponseVo);
}
@Override
public BaseResponse getV3Promotion(BaseRequestVo request) {
boolean grayPush = grayPush(request.getPartnerId(), request.getShopId(), "2");
PromotionResultVO vo = new PromotionResultVO();
if (grayPush) {
ActivityBaseResponseDto<PromotionResultVO> responseDto = activityClient.getV3Promotion(request);
if (responseDto != null && StringUtils.equals(responseDto.getStatusCode(),ResponseCodeConstant.RESPONSE_SUCCESS_STR)) {
vo.setV3Promotion(responseDto.getResult().isV3Promotion());
}
}
return ResponseUtil.success(vo);
}
private void removeByProductStock(List<PremiumExchangeResponseVo.PremiumExchangeProduct> products, List<ValidateProductInfosDto.ProductData> productDataList, String partnerId, String storeId, String channel) {
List<Long> limitSkuIds = new ArrayList<>();
productDataList.stream().forEach(ProductData -> {
......
......@@ -19,6 +19,8 @@ import cn.freemud.entities.dto.*;
import cn.freemud.entities.dto.activity.ActivityQueryResponseDto;
import cn.freemud.entities.dto.calculate.ActivityCalculationDiscountRequestDto;
import cn.freemud.entities.dto.calculate.ActivityCalculationDiscountResponseDto;
import cn.freemud.entities.dto.shoppingCart.PromotionResultVO;
import cn.freemud.entities.vo.BaseRequestVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -73,4 +75,8 @@ public interface ActivityClient {
@PostMapping("/promotioncenter/calculateservice/discount/sharing")
//@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ActivityCalculationDiscountResponseDto calculationSharingDiscount(ActivityCalculationDiscountRequestDto shareDiscountRequestDto);
@PostMapping("/activity/getV3Promotion")
@IgnoreFeignLogAnnotation(logMessage = "/activity/getV3Promotion",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
ActivityBaseResponseDto<PromotionResultVO> getV3Promotion(BaseRequestVo request);
}
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