Commit 4cfb348e by 周晓航

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

# Conflicts:
#	order-application-service/src/main/java/cn/freemud/service/coupon/impl/PlatformCouponRelationServiceImpl.java
parents 8e848ba3 8927ce2d
......@@ -101,6 +101,28 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService
}
/**
* 要校验一遍是否 使用了 需要核销的券 代金券 商品券 运费全 折扣券 需要核销
*
* @param accountList 这里会传递 多张券 和其他的计算 类型
* @return
*/
private boolean checkAccountList(List<QueryOrdersResponseDto.DataBean.OrderBean.AccountBean> accountList) {
// 里面只有一个值 直接使用老逻辑 不管是 什么券
if (accountList.size() == 1) {
return false;
}
// 拿出 所有的使用券信息 代金券 商品券 运费全 折扣券 需要核销
int count = 0;
for (QueryOrdersResponseDto.DataBean.OrderBean.AccountBean accountBean : accountList) {
if (OrderAccountType.verificationCoupon.contains(accountBean.getType())){
count ++;
}
}
// 说明使用了 2张以上的优惠券 需要核销
return count > 1;
}
/**
* 原有逻辑没变动的基础上 加上 配送券信息对象
*
* @param couponCodeVerificationTransDto 配送券信息对象 如果为null 就是原来的逻辑
......@@ -161,6 +183,9 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService
couponCodeVerificationDto.setOrderDiscountAmount(Math.abs(accountBean.getPrice()));
// 核销券新增参数:组织机构ID
couponCodeVerificationDto.setChannel_ids(storeService.getOrgIdsArr(orderBean.getCompanyId(), orderBean.getShopId()));
boolean ok = false;
Exception lastException = null;
CouponCodeResponseDto couponCodeResponseDto = null;
// 设置配送券的 transactions
if (couponCodeVerificationTransDto != null) {
List<CouponCodeVerificationTransDto> transactions = couponCodeVerificationDto.getTransactions();
......@@ -168,9 +193,6 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService
//只 传递一次, 防止后续开发 多张优惠券使用情况
couponCodeVerificationTransDto = null;
}
boolean ok = false;
Exception lastException = null;
CouponCodeResponseDto couponCodeResponseDto = null;
try {
//71.券核销
// todo 这循环有啥用-.-
......
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