Просмотр исходного кода

// add shar app

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
dba564ea5f
2 измененных файлов: 44 добавлений и 14 удалений
  1. +12
    -14
      mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java
  2. +32
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java

+ 12
- 14
mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java Просмотреть файл

@@ -38,15 +38,7 @@ public class WxProfitSharingReceiverApplyController extends BaseController {
if(receiverAdd == null){
receiverAdd = new WxProfitSharingReceiverApply();
}
if(receiverAdd.getMerchantId() == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户ID不能为空");
}
WxMerchant merchant = wxMerchantService.selectById(receiverAdd.getMerchantId());
if(merchant == null || EnumMerchantStatus.NOT_VALID.getCode().equals(merchant.getStatus())){
return new ResultData(ErrorCode.MERCHANT_INFO_NOT_VALID.getCode(),"商户不存在或已停用");
}

receiverAdd.updateTenantInfo(merchant);
receiverAdd.updateTenantInfo(getTenantInfo());
receiverAdd.setPlat(EnumAppPlat.WX.getCode());
// if(receiverAdd.getPlat() == null){
// receiverAdd.setPlat(EnumAppPlat.WX.getCode());
@@ -56,11 +48,6 @@ public class WxProfitSharingReceiverApplyController extends BaseController {
// 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(), "该商户已进件成功");
}

if(receiverAdd.getId() != null){
WxProfitSharingReceiverApply receiverApply = wxProfitSharingReceiverApplyService.selectById(receiverAdd.getId());
if(receiverApply == null){
@@ -70,6 +57,17 @@ public class WxProfitSharingReceiverApplyController extends BaseController {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "该商户进件流程中,无法修改");
}
}else{
if(receiverAdd.getMerchantId() == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户ID不能为空");
}
WxMerchant merchant = wxMerchantService.selectById(receiverAdd.getMerchantId());
if(merchant == null || EnumMerchantStatus.NOT_VALID.getCode().equals(merchant.getStatus())){
return new ResultData(ErrorCode.MERCHANT_INFO_NOT_VALID.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(), "该商户已进件成功");
}
WxProfitSharingReceiverApply receiverApply = wxProfitSharingReceiverApplyService.selectByPlat(merchant,merchant.getId(),EnumAppPlat.WX);
if(receiverApply != null){
if(receiverApply.getApplymentState() != null && !EnumSharingReceiverApplymentState.getUpdList().contains(receiverApply.getApplymentState())){


+ 32
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java Просмотреть файл

@@ -921,6 +921,38 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR

return true;
}

/**
* 补充材料
* @param
* {
* "id":********,
* "organizationType":,//4个体,2企业
* "additionInfo":"",//json格式在下面 转成字符串
* "businessAdditionPics":"",//json格式在下面 转成字符串
* "businessAdditionDesc":""//补充说明
* }
* //additionInfo
* {
* "legal_person_commitment":{//法人开户承诺函
* "url":"",
* "media_id":""
* },
* "legal_person_video":{//法人开户意愿视频
* "url":"",
* "media_id":""
* }
* }
* //businessAdditionPics
* [
* {
* "url":"",
* "media_id":""
* }
* ...
* ]
*/

private String getMerchantMediaId(JSONObject obj){
if(obj == null){


Загрузка…
Отмена
Сохранить