Commit 314dcba8 by 张跃

券核销接口字段添加

parent f1d26e05
...@@ -98,9 +98,9 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService ...@@ -98,9 +98,9 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService
|| OrderAccountType.PRODUCT_COUPON.getCode().equals(accountBean.getType()) || OrderAccountType.PRODUCT_COUPON.getCode().equals(accountBean.getType())
|| OrderAccountType.DISCOUNT_COUPON.getCode().equals(accountBean.getType())) { || OrderAccountType.DISCOUNT_COUPON.getCode().equals(accountBean.getType())) {
CouponCodeVerificationDto couponCodeVerificationDto = couponAdapter.convert2CouponCodeVerificationDto(activityChannelEnum, accountBean.getAccountId(), orderBean.getOid(), orderBean.getCompanyId(), orderBean.getShopId(), orderBean.getUserId(), products, accountBean.getPrice().intValue(),couponReqType); CouponCodeVerificationDto couponCodeVerificationDto = couponAdapter.convert2CouponCodeVerificationDto(activityChannelEnum, accountBean.getAccountId(), orderBean.getOid(), orderBean.getCompanyId(), orderBean.getShopId(), orderBean.getUserId(), products, accountBean.getPrice().intValue(),couponReqType);
couponCodeVerificationDto.setOrderTotalAmount(orderBean.getAmount()); couponCodeVerificationDto.setOrderTotalAmount(orderBean.getOriginalAmount()==null ? 0L: orderBean.getOriginalAmount().longValue());
couponCodeVerificationDto.setOrderPaymentAmount(orderBean.getOriginalAmount()==null ? 0L: orderBean.getOriginalAmount().longValue()); couponCodeVerificationDto.setOrderPaymentAmount(orderBean.getAmount());
couponCodeVerificationDto.setOrderDiscountAmount(accountList.stream().mapToLong(account->account.getShopDiscountAmount()==null?0L:account.getShopDiscountAmount()).sum()); couponCodeVerificationDto.setOrderDiscountAmount(Math.abs(accountList.stream().mapToLong(account->account.getShopDiscountAmount()==null?0L:account.getShopDiscountAmount()).sum()));
// 核销券新增参数:组织机构ID // 核销券新增参数:组织机构ID
couponCodeVerificationDto.setChannel_codes(storeService.getOrgIdsArr(orderBean.getCompanyId(), orderBean.getShopId())); couponCodeVerificationDto.setChannel_codes(storeService.getOrgIdsArr(orderBean.getCompanyId(), orderBean.getShopId()));
try { try {
......
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