瀏覽代碼

Merge commit 'refs/tags/jenkins-back-end-1523^{}' into release

release_toaliyun_real
hupeng 7 年之前
父節點
當前提交
6fa2667081
共有 3 個檔案被更改,包括 12 行新增12 行删除
  1. +1
    -0
      mallinkService/src/main/java/com/iformall/common/ErrorCode.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java
  3. +10
    -11
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java

+ 1
- 0
mallinkService/src/main/java/com/iformall/common/ErrorCode.java 查看文件

@@ -240,6 +240,7 @@ public enum ErrorCode{
*/ */
VERIFY_ERROR(12050, "核销异常"), VERIFY_ERROR(12050, "核销异常"),
MSG_REPEAT_SEND(12061, "短信重复发送"), MSG_REPEAT_SEND(12061, "短信重复发送"),
VERIFY_COUPON_ORDER_MERANT_IS_NULL(12062, "卡券核销商户无权限"),


/** /**
* 解单 * 解单


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java 查看文件

@@ -301,7 +301,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService {
List<WxCouponMerchant> couponMerchantList = wxCouponMerchantMapper.findList(wxCouponMerchant); List<WxCouponMerchant> couponMerchantList = wxCouponMerchantMapper.findList(wxCouponMerchant);
if (!couponMerchantList.stream().anyMatch(cm->cm.getMerchantId().equals(wxMerchantBUser.getMerchantId()))){ if (!couponMerchantList.stream().anyMatch(cm->cm.getMerchantId().equals(wxMerchantBUser.getMerchantId()))){
logger.error("券: coupon-" + wxCoupon.getId() + "核销: couponMerchantId-" + wxMerchantBUser.getMerchantId()); logger.error("券: coupon-" + wxCoupon.getId() + "核销: couponMerchantId-" + wxMerchantBUser.getMerchantId());
throw new MallinkException(ErrorCode.COUPON_ORDER_IS_NULL);
throw new MallinkException(ErrorCode.VERIFY_COUPON_ORDER_MERANT_IS_NULL);
} }
} }




+ 10
- 11
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingOrderServiceImpl.java 查看文件

@@ -255,23 +255,22 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
psReceiverQ.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode()); psReceiverQ.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode());
List<WxProfitSharingReceiver> psReceiverList = wxProfitSharingReceiverMapper.findList(psReceiverQ); List<WxProfitSharingReceiver> psReceiverList = wxProfitSharingReceiverMapper.findList(psReceiverQ);
if (psReceiverList.size() < 0 || psReceiverList.size() > 50) { if (psReceiverList.size() < 0 || psReceiverList.size() > 50) {
throw new MallinkException(ErrorCode.PROFIT_SHARING_RECEIVER_INVALID);
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_INVALID);
} }


if (psReceiverList.size() == 0) { //没有分账账户,直接分入商户号
WxProfitSharingReceiver receiver = new WxProfitSharingReceiver();
receiver.setReceiverAccount(payAccount.getSubMchId());
receiver.setReceiverType(EnumProfitSharingReceiverType.PROFIT_SHARING_RECEIVER_MERCHANT_ID.getCode());
receiver.setSharingAmount(sharingOrderDto.getShareAmount());
receiver.setParameter(null);
receiver.setId(0L);
psReceiverList.add(receiver);
if (psReceiverList.size() == 0) { //没有分账账户,直接结束分账
if (sharingOrderDto.getType().equals(EnumProfitSharingOrderType.PROFIT_SHARING_SINGLE.getCode()))
sharingOrderDto.setType(EnumProfitSharingOrderType.PROFIT_SHARING_SINGLE_FINISH.getCode());
if (sharingOrderDto.getType().equals(EnumProfitSharingOrderType.PROFIT_SHARING_MULTI.getCode()))
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_INVALID);

return finishSharingOrder(sharingOrderDto);
} }


//计算分账账户合法性 //计算分账账户合法性
if (psReceiverList.size() > 1 && if (psReceiverList.size() > 1 &&
psReceiverList.stream().filter(r->(r.getParameter() == null)).count() > 0) { psReceiverList.stream().filter(r->(r.getParameter() == null)).count() > 0) {
throw new MallinkException(ErrorCode.PROFIT_SHARING_RECEIVER_INVALID);
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_INVALID);
} }


//计算分账金额合法性 //计算分账金额合法性
@@ -284,7 +283,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ
} }
}); });
if (psReceiverList.stream().mapToInt(r->r.getSharingAmount()).sum() > sharingOrderDto.getShareAmount()){ if (psReceiverList.stream().mapToInt(r->r.getSharingAmount()).sum() > sharingOrderDto.getShareAmount()){
throw new MallinkException(ErrorCode.PROFIT_SHARING_RECEIVER_INVALID);
return new ResultData(ErrorCode.PROFIT_SHARING_RECEIVER_INVALID);
} }


//单次分账检查是否已创建分账订单 //单次分账检查是否已创建分账订单


Loading…
取消
儲存