结算相关改动

This commit is contained in:
liuyingfang 2023-07-03 15:18:55 +08:00
parent dbf20ce758
commit faa73ce1bc
4 changed files with 40 additions and 23 deletions

View File

@ -63,7 +63,7 @@ public class IntroduceController {
} }
} }
@PostMapping ({"/common"}) @PostMapping ("/common")
public Result<String> billIntro(HttpServletRequest httpServletRequest, public Result<String> billIntro(HttpServletRequest httpServletRequest,
@RequestBody Map<String, String> params) { @RequestBody Map<String, String> params) {
AppGuide entity = appGuideService.getByCode(params.get("code")); AppGuide entity = appGuideService.getByCode(params.get("code"));

View File

@ -33,7 +33,7 @@ public class MerchantChannelStatusController {
} }
/** /**
* 结算类型切换 * 结算银行卡切换
* @return * @return
*/ */
@GetMapping("/channelCheck") @GetMapping("/channelCheck")

View File

@ -2,6 +2,9 @@ package cn.pluss.platform.vo;
import lombok.Data; import lombok.Data;
import java.util.List;
import java.util.Map;
/** /**
* @author lyf * @author lyf
*/ */

View File

@ -1,5 +1,6 @@
package cn.pluss.platform.merchantChannelStatus.impl; package cn.pluss.platform.merchantChannelStatus.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.pluss.platform.SubMerchantApplyOrderService; import cn.pluss.platform.SubMerchantApplyOrderService;
import cn.pluss.platform.channel.MerchProtocolService; import cn.pluss.platform.channel.MerchProtocolService;
import cn.pluss.platform.channel.MerchantAuditService; import cn.pluss.platform.channel.MerchantAuditService;
@ -373,9 +374,14 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
.eq(MerchantChannelStatus::getMerchantCode, userApp.getMerchantCode()); .eq(MerchantChannelStatus::getMerchantCode, userApp.getMerchantCode());
MerchantChannelStatus quickChannel = getOne(qWrapper); MerchantChannelStatus quickChannel = getOne(qWrapper);
MsgException.checkNull(quickChannel, "暂未开通快速通道"); if (quickChannel == null){
userAppService.merchantAuditReq();
ChannelStatusVO channelStatusVO = new ChannelStatusVO();
channelStatusVO.setRemark("已发送进件申请");
return channelStatusVO;
}
MsgException.checkEquals(quickChannel.getValid(), MerchantChannelStatus.VALID_STATUS_BAN, quickChannel.getRemark()); MsgException.checkEquals(quickChannel.getValid(), MerchantChannelStatus.VALID_STATUS_BAN,"已提交申请,请勿重复提交");
if (!MerchantChannelStatus.isAudited(quickChannel)) { if (!MerchantChannelStatus.isAudited(quickChannel)) {
throw new MsgException("当前状态暂不允许切换通道"); throw new MsgException("当前状态暂不允许切换通道");
@ -394,12 +400,16 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
.eq(MerchantChannelStatus::getMerchantCode, userApp.getMerchantCode()); .eq(MerchantChannelStatus::getMerchantCode, userApp.getMerchantCode());
MerchantChannelStatus channelStatus = getOne(qWrapper); MerchantChannelStatus channelStatus = getOne(qWrapper);
if (channelStatus == null){
MsgException.checkNull(channelStatus, "暂未进件"); userAppService.merchantAuditReq();
ChannelStatusVO channelStatusVO = new ChannelStatusVO();
channelStatusVO.setRemark("已发送进件申请");
return channelStatusVO;
}
String status = channelStatus.getStatus(); String status = channelStatus.getStatus();
MsgException.checkEquals(channelStatus.getValid(), MerchantChannelStatus.VALID_STATUS_BAN, channelStatus.getRemark()); MsgException.checkEquals(channelStatus.getValid(), MerchantChannelStatus.VALID_STATUS_BAN, "已提交申请,请勿重复提交");
if (!MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(status) && !MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(status)) { if (!MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(status) && !MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(status)) {
throw new MsgException("进件暂未通过"); throw new MsgException("进件暂未通过");
@ -472,24 +482,28 @@ public class MerchantChannelStatusServiceImpl extends ServiceImpl<MerchantChanne
//另一个通道 //另一个通道
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = new LambdaQueryWrapper<MerchantChannelStatus>() LambdaQueryWrapper<MerchantChannelStatus> qWrapper = new LambdaQueryWrapper<MerchantChannelStatus>()
.eq(MerchantChannelStatus::getMerchantCode, entity.getMerchantCode()) .eq(MerchantChannelStatus::getMerchantCode, entity.getMerchantCode())
.eq(MerchantChannelStatus::getValid,0) .ne(MerchantChannelStatus::getId,entity.getId());
.ne(MerchantChannelStatus::getVirChannelFlag, entity.getVirChannelFlag())
.orderByAsc(MerchantChannelStatus::getValid)
.orderByDesc(MerchantChannelStatus::getId)
.last("limit 1");
MerchantChannelStatus one = getOne(qWrapper); MerchantChannelStatus one = getOne(qWrapper);
if (one == null) { if(ObjectUtil.isEmpty(one)){
accountChannelVO.setOtherChannel("0"); accountChannelVO.setOtherChannel("0");
}else if (one.getValid() == -1){ return accountChannelVO;
accountChannelVO.setOtherChannel("2"); }
}else if (Objects.equals(one.getStatus(), "3")){ switch (one.getStatus()){
accountChannelVO.setOtherChannel("4"); case "1":
}else if (one.getChannel() == null){ accountChannelVO.setOtherChannel("2");
accountChannelVO.setOtherChannel("3"); break;
}else if(Objects.equals(one.getStatus(), "2")) { case "3":
accountChannelVO.setOtherChannel("0"); if(one.getValid()==-1){
}else { accountChannelVO.setOtherChannel("2");
accountChannelVO.setOtherChannel("5"); }else {
accountChannelVO.setOtherChannel("0");
}
break;
case "2":
accountChannelVO.setOtherChannel("2");
break;
default:
accountChannelVO.setOtherChannel("2");
} }
return accountChannelVO; return accountChannelVO;
} }