Browse Source

// test

release_toaliyun_real
xhxu 3 years ago
parent
commit
9f83402fe9
3 changed files with 25 additions and 22 deletions
  1. +2
    -2
      mallinkService/src/main/java/com/iformall/service/WxCouponChannelService.java
  2. +17
    -17
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  3. +6
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java

+ 2
- 2
mallinkService/src/main/java/com/iformall/service/WxCouponChannelService.java View File

@@ -84,8 +84,8 @@ public interface WxCouponChannelService {

ResultData updateOnline(WxCouponChannel wxCouponChannel);

Long getCouponOneMerchantId(EnumPayWay payWay,Long couponChannelId, String tenantId);
Long getCouponOneMerchantId(Long couponChannelId, String tenantId);

String getCouponOneMerchantUid(EnumPayWay payWay,Long merchantId, String tenantId);
// String getCouponOneMerchantUid(EnumPayWay payWay,Long merchantId, String tenantId);

}

+ 17
- 17
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java View File

@@ -829,7 +829,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
}

@Override
public Long getCouponOneMerchantId(EnumPayWay payWay, Long couponChannelId, String tenantId) {
public Long getCouponOneMerchantId(Long couponChannelId, String tenantId) {
WxCouponChannel couponChannel = wxCouponChannelMapper.selectById(couponChannelId, tenantId);
List<Long> merchantIds = wxCouponMerchantMapper.findMerchantIdListByProduct(couponChannel.getCouponId(), tenantId);
Long merchantId = null;
@@ -849,22 +849,22 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
return merchantId;
}

@Override
public String getCouponOneMerchantUid(EnumPayWay payWay,Long merchantId, String tenantId) {
if(merchantId != null){
WxProfitSharingReceiver psReceiverQ = new WxProfitSharingReceiver();
psReceiverQ.setTenantId(tenantId);
psReceiverQ.setMerchantId(merchantId);
// psReceiverQ.setSharingType(payServiceFactory.getPayShareAdapterService(payWay.getCode()).getProfitSharingType());
psReceiverQ.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode());
psReceiverQ.setPlat(payWay.getPlat().getCode());
List<WxProfitSharingReceiver> psReceiverList = wxProfitSharingReceiverMapper.findList(psReceiverQ);
if(psReceiverList != null && psReceiverList.size() == 1){
return psReceiverList.get(0).getReceiverAccount();
}
}
return null;
}
// @Override
// public String getCouponOneMerchantUid(EnumPayWay payWay,Long merchantId, String tenantId) {
// if(merchantId != null){
// WxProfitSharingReceiver psReceiverQ = new WxProfitSharingReceiver();
// psReceiverQ.setTenantId(tenantId);
// psReceiverQ.setMerchantId(merchantId);
//// psReceiverQ.setSharingType(payServiceFactory.getPayShareAdapterService(payWay.getCode()).getProfitSharingType());
// psReceiverQ.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode());
// psReceiverQ.setPlat(payWay.getPlat().getCode());
// List<WxProfitSharingReceiver> psReceiverList = wxProfitSharingReceiverMapper.findList(psReceiverQ);
// if(psReceiverList != null && psReceiverList.size() == 1){
// return psReceiverList.get(0).getReceiverAccount();
// }
// }
// return null;
// }

@Override
public WxCouponChannel getPriceAndStock(TenantEntity tenantEntity, Long couponChannelId) {


+ 6
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java View File

@@ -454,11 +454,14 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
Long merchant_id = null;
String merchant_uid = "";
if(EnumPayMchType.DIRECT.equals(payMchType)){//直连模式记录收款商户
merchant_id = wxCouponChannelService.getCouponOneMerchantId(payWay,o.getCouponChannelId(),o.getTenantId());
merchant_uid = wxCouponChannelService.getCouponOneMerchantUid(payWay,merchant_id,o.getTenantId());
if(null == merchant_id || StringUtils.isBlank(merchant_uid)){
merchant_id = wxCouponChannelService.getCouponOneMerchantId(o.getCouponChannelId(),o.getTenantId());
WxProfitSharingReceiver receiver = payShareServie.getReceiver(payAccount, merchant_id, null, payMchTypeEnum.getCode());
// merchant_uid = wxCouponChannelService.getCouponOneMerchantUid(payWay,merchant_id,o.getTenantId());
// if(null == merchant_id || StringUtils.isBlank(merchant_uid)){
if(receiver == null){
throw new MallinkException(ErrorCode.PAY_ORDER_MERCHANT_UID_ERROR);
}
merchant_uid = receiver.getReceiverAccount();
}
int rate = payShareServie.getOfficialCommission(o,payAccount);//抖音分佣率
logger.info("抖音分佣率"+rate);


Loading…
Cancel
Save