From 09440c185c3005454f32cfbbf9972fd5e81900bd Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 17 Aug 2022 15:53:15 +0800 Subject: [PATCH] // add shar --- .../WxProfitSharingReceiverApplyController.java | 11 ++++++++++- .../com/iformall/enums/EnumProfitSharingType.java | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java b/mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java index 2f79669f3..38373978a 100644 --- a/mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java +++ b/mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java @@ -38,7 +38,6 @@ public class WxProfitSharingReceiverApplyController extends BaseController { if(receiverAdd == null){ receiverAdd = new WxProfitSharingReceiverApply(); } - receiverAdd.updateTenantInfo(getTenantInfo()); if(receiverAdd.getMerchantId() == null){ return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户ID不能为空"); } @@ -46,6 +45,16 @@ public class WxProfitSharingReceiverApplyController extends BaseController { if(merchant == null || EnumMerchantStatus.NOT_VALID.getCode().equals(merchant.getStatus())){ return new ResultData(ErrorCode.MERCHANT_INFO_NOT_VALID.getCode(),"商户不存在或已停用"); } + + receiverAdd.updateTenantInfo(merchant); + if(receiverAdd.getPlat() == null){ + receiverAdd.setPlat(EnumAppPlat.WX.getCode()); + } + EnumAppPlat enumPlat = EnumAppPlat.getByCode(receiverAdd.getPlat()); + if(enumPlat == null){ + return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "平台不合法"); + } + WxProfitSharingReceiver receiver = wxProfitSharingReceiverService.findReceiver(merchant, merchant.getId(), EnumAppPlat.WX, EnumProfitSharingType.PROFIT_SHARING_TYPE_WECHAT_v2); if(receiver != null && MerchantImportStatus.improt_success.getCode().equals(receiver.getWxImportStatus())){ return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该商户已进件成功"); diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumProfitSharingType.java b/mallinkService/src/main/java/com/iformall/enums/EnumProfitSharingType.java index 427ba2141..43d1e3b5e 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumProfitSharingType.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumProfitSharingType.java @@ -8,7 +8,7 @@ public enum EnumProfitSharingType { PROFIT_SHARING_TYPE_BANK(2, "银行卡分账"), PROFIT_SHARING_TYPE_DOUYIN(3, "抖音进件"), - PROFIT_SHARING_TYPE_WECHAT_v2(4, "微信进件"), + PROFIT_SHARING_TYPE_WECHAT_v2(4, "微信特约商户进件"), ; public static EnumProfitSharingType getEnum(Integer code) {