Browse Source

fix

release_toaliyun_real
winter 1 year ago
parent
commit
2a99941e4e
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java

+ 14
- 0
mallinkBApi/src/main/java/com/iformall/controller/WxProfitSharingReceiverApplyController.java View File

@@ -1,6 +1,7 @@
package com.iformall.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxMerchant;
@@ -68,6 +69,17 @@ public class WxProfitSharingReceiverApplyController extends BaseController {
// return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "平台不合法");
// }

//检查结算账户
if (StringUtils.isNotBlank(receiverAdd.getAccountInfo())) {
JSONObject ao = JSON.parseObject(receiverAdd.getAccountInfo());
boolean needBankBranch = ao.getBoolean("need_bank_branch");
String bankBranchId = ao.getString("bank_branch_id");
String bankName = ao.getString("bank_name");
if (needBankBranch && (StringUtils.isBlank(bankBranchId) || StringUtils.isBlank(bankName)) ) {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "未选取到支行,请确认开户行是否选择正确!");
}
}

if(receiverAdd.getId() != null){
WxProfitSharingReceiverApply receiverApply = wxProfitSharingReceiverApplyService.selectById(receiverAdd.getId());
if(receiverApply == null){
@@ -96,6 +108,8 @@ public class WxProfitSharingReceiverApplyController extends BaseController {
receiverAdd.setId(receiverApply.getId());
}
}

return wxProfitSharingReceiverApplyService.saveOrUpdate(receiverAdd);
}


Loading…
Cancel
Save