结算相关改动

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,
@RequestBody Map<String, String> params) {
AppGuide entity = appGuideService.getByCode(params.get("code"));

View File

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

View File

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

View File

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