| @@ -1,6 +1,7 @@ | |||||
| package com.iformall.controller; | package com.iformall.controller; | ||||
| import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
| import com.alibaba.fastjson.JSONObject; | |||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| @@ -68,6 +69,17 @@ public class WxProfitSharingReceiverApplyController extends BaseController { | |||||
| // return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "平台不合法"); | // 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){ | if(receiverAdd.getId() != null){ | ||||
| WxProfitSharingReceiverApply receiverApply = wxProfitSharingReceiverApplyService.selectById(receiverAdd.getId()); | WxProfitSharingReceiverApply receiverApply = wxProfitSharingReceiverApplyService.selectById(receiverAdd.getId()); | ||||
| if(receiverApply == null){ | if(receiverApply == null){ | ||||
| @@ -96,6 +108,8 @@ public class WxProfitSharingReceiverApplyController extends BaseController { | |||||
| receiverAdd.setId(receiverApply.getId()); | receiverAdd.setId(receiverApply.getId()); | ||||
| } | } | ||||
| } | } | ||||
| return wxProfitSharingReceiverApplyService.saveOrUpdate(receiverAdd); | return wxProfitSharingReceiverApplyService.saveOrUpdate(receiverAdd); | ||||
| } | } | ||||