|
|
@@ -38,7 +38,6 @@ public class WxProfitSharingReceiverApplyController extends BaseController { |
|
|
if(receiverAdd == null){ |
|
|
if(receiverAdd == null){ |
|
|
receiverAdd = new WxProfitSharingReceiverApply(); |
|
|
receiverAdd = new WxProfitSharingReceiverApply(); |
|
|
} |
|
|
} |
|
|
receiverAdd.updateTenantInfo(getTenantInfo()); |
|
|
|
|
|
if(receiverAdd.getMerchantId() == null){ |
|
|
if(receiverAdd.getMerchantId() == null){ |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户ID不能为空"); |
|
|
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())){ |
|
|
if(merchant == null || EnumMerchantStatus.NOT_VALID.getCode().equals(merchant.getStatus())){ |
|
|
return new ResultData(ErrorCode.MERCHANT_INFO_NOT_VALID.getCode(),"商户不存在或已停用"); |
|
|
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); |
|
|
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())){ |
|
|
if(receiver != null && MerchantImportStatus.improt_success.getCode().equals(receiver.getWxImportStatus())){ |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该商户已进件成功"); |
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该商户已进件成功"); |
|
|
|