Commit 366d149a by 周晓航

Merge branch 'KA-20210705-日志问题导致qa回滚代码修复-fisherman' into qa

# Conflicts:
#	order-application-service/src/main/java/cn/freemud/enums/OrderAccountType.java
#	order-application-service/src/main/java/cn/freemud/service/coupon/impl/PlatformCouponRelationServiceImpl.java
parents 1dcb2665 ead220a2
......@@ -39,6 +39,18 @@ public enum OrderAccountType {
private String desc;
/**
* 需要 核销的 券 归类
* 代金券
* 商品券
* 运费全
* 折扣券
*/
public static List<Integer> verificationCoupon = Arrays.asList(OrderAccountType.COUPON.getCode(),
OrderAccountType.PRODUCT_COUPON.getCode(),
OrderAccountType.FREIGHT_COUPON.getCode(),
OrderAccountType.DISCOUNT_COUPON.getCode());
OrderAccountType(Integer code, String desc) {
this.code = code;
this.desc = desc;
......
......@@ -76,7 +76,13 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService
@Override
public BaseResponse verificationCoupon(List<QueryOrdersResponseDto.DataBean.OrderBean.AccountBean> accountList, QueryOrdersResponseDto.DataBean.OrderBean orderBean, CouponReqType couponReqType) {
if (accountList.size() > 1) {
LogUtil.info("fiserhman 券码核销 begin", JSON.toJSONString(accountList), JSON.toJSONString(orderBean));
if (CollectionUtils.isEmpty(accountList)) {
return ResponseUtil.success();
}
// 需要判断 accountList 里面 是都 同时包含 配送券+ other券
boolean isDoubleCoupon = checkAccountList(accountList);
if (isDoubleCoupon) {
Integer code = OrderAccountType.FREIGHT_COUPON.getCode();
// 运费券 塞进 核销接口里面, 这里真的是贼恶心 逻辑不敢动
QueryOrdersResponseDto.DataBean.OrderBean.AccountBean freightCouponAccountBean = accountList.stream().filter(accountBean -> code.equals(accountBean.getType())).findFirst().orElse(null);
......
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