Commit a0df3271 authored by suntao's avatar suntao

二次审批 重复操作 UI提示

parent 0525428d
...@@ -100,8 +100,8 @@ public class OrderController { ...@@ -100,8 +100,8 @@ public class OrderController {
@GetMapping("/secondAudit") @GetMapping("/secondAudit")
public Result<Boolean> secondAudit(String channelOrderNumber) { public Result<Boolean> secondAudit(String channelOrderNumber) {
if (Application.isDebug()) { if (Application.isDebug()) {
boolean secondAudit = this.orderService.secondAudit(channelOrderNumber); Tuple<Boolean, String> booleanStringTuple = this.orderService.secondAudit(channelOrderNumber);
return Result.buildSuccess(secondAudit, secondAudit ? "操作成功" : "操作失败"); return Result.buildSuccess(booleanStringTuple.getKey(), booleanStringTuple.getValue());
} else { } else {
return Result.buildSuccess(false,"无此操作"); return Result.buildSuccess(false,"无此操作");
} }
......
...@@ -22,8 +22,13 @@ public interface OrderService { ...@@ -22,8 +22,13 @@ public interface OrderService {
Tuple<Boolean, Boolean> approveOpt(ApproveVo approveVo); Tuple<Boolean, Boolean> approveOpt(ApproveVo approveVo);
/**
*
* @param channelOrderNumber
* @return 《是否成功 , msg》
*/
@Transactional @Transactional
boolean secondAudit(String channelOrderNumber); Tuple<Boolean, String> secondAudit(String channelOrderNumber);
@Transactional @Transactional
boolean lending(LendingFormModel lendingFormModel); boolean lending(LendingFormModel lendingFormModel);
......
...@@ -311,7 +311,7 @@ public class OrderServiceImpl implements OrderService{ ...@@ -311,7 +311,7 @@ public class OrderServiceImpl implements OrderService{
*/ */
@Transactional @Transactional
@Override @Override
public boolean secondAudit(String channelOrderNumber) { public Tuple<Boolean, String> secondAudit(String channelOrderNumber) {
OptEnumName secondAudit = OptEnumName.SECORD_AUDIT; OptEnumName secondAudit = OptEnumName.SECORD_AUDIT;
...@@ -330,7 +330,7 @@ public class OrderServiceImpl implements OrderService{ ...@@ -330,7 +330,7 @@ public class OrderServiceImpl implements OrderService{
optHistoryLog.setOptResult(false); optHistoryLog.setOptResult(false);
optHistoryLog.setCreateTime(new Date()); optHistoryLog.setCreateTime(new Date());
optHistoryLogService.save(optHistoryLog); optHistoryLogService.save(optHistoryLog);
return false; return new Tuple<>(false, "orderMapping为空或者loanId为空");
} }
optHistoryLog.setCreditNumber(orderMapping.getApplyNo()); optHistoryLog.setCreditNumber(orderMapping.getApplyNo());
...@@ -344,7 +344,7 @@ public class OrderServiceImpl implements OrderService{ ...@@ -344,7 +344,7 @@ public class OrderServiceImpl implements OrderService{
optHistoryLog.setOptLogDetail("已经操作成功. 重复操作"); optHistoryLog.setOptLogDetail("已经操作成功. 重复操作");
optHistoryLog.setOptResult(true); optHistoryLog.setOptResult(true);
optHistoryLogService.save(optHistoryLog); optHistoryLogService.save(optHistoryLog);
return true; return new Tuple<>(true, "已经操作成功. 重复操作");
} }
// 更新合同状态 // 更新合同状态
...@@ -376,7 +376,7 @@ public class OrderServiceImpl implements OrderService{ ...@@ -376,7 +376,7 @@ public class OrderServiceImpl implements OrderService{
optHistoryLog.setOptLogDetail("二次风控失败,未找到user"); optHistoryLog.setOptLogDetail("二次风控失败,未找到user");
optHistoryLog.setOptResult(false); optHistoryLog.setOptResult(false);
optHistoryLogService.save(optHistoryLog); optHistoryLogService.save(optHistoryLog);
return false; return new Tuple<>(false, "二次风控失败,未找到user");
} }
ChannelConf channelConf = channelConfRepository.getByChannelId(orderMapping.getRegisteredFrom()); ChannelConf channelConf = channelConfRepository.getByChannelId(orderMapping.getRegisteredFrom());
if (channelConf == null) { if (channelConf == null) {
...@@ -384,7 +384,7 @@ public class OrderServiceImpl implements OrderService{ ...@@ -384,7 +384,7 @@ public class OrderServiceImpl implements OrderService{
optHistoryLog.setOptLogDetail("二次风控失败,未找到channelConf配置"); optHistoryLog.setOptLogDetail("二次风控失败,未找到channelConf配置");
optHistoryLog.setOptResult(false); optHistoryLog.setOptResult(false);
optHistoryLogService.save(optHistoryLog); optHistoryLogService.save(optHistoryLog);
return false; return new Tuple<>(false, "二次风控失败,未找到channelConf配置");
} }
LoanApplicationHistory loanApplicationHistory = xyqbCenterService.findLoanApplicationHistoryById(orderMapping.getLoanId()); LoanApplicationHistory loanApplicationHistory = xyqbCenterService.findLoanApplicationHistoryById(orderMapping.getLoanId());
...@@ -400,7 +400,7 @@ public class OrderServiceImpl implements OrderService{ ...@@ -400,7 +400,7 @@ public class OrderServiceImpl implements OrderService{
optHistoryLog.setOptLogDetail("二次风控失败,clotho返回失败"); optHistoryLog.setOptLogDetail("二次风控失败,clotho返回失败");
optHistoryLog.setOptResult(false); optHistoryLog.setOptResult(false);
optHistoryLogService.save(optHistoryLog); optHistoryLogService.save(optHistoryLog);
return false; return new Tuple<>(false, "二次风控失败,clotho返回失败");
} }
} else if (LoanProgress.WAITING_FUND.equals(loanApplicationHistory.getProgress())) { } else if (LoanProgress.WAITING_FUND.equals(loanApplicationHistory.getProgress())) {
// 20 已经回调过 // 20 已经回调过
...@@ -414,7 +414,7 @@ public class OrderServiceImpl implements OrderService{ ...@@ -414,7 +414,7 @@ public class OrderServiceImpl implements OrderService{
optHistoryLogService.save(optHistoryLog); optHistoryLogService.save(optHistoryLog);
log.info("[secendAudit]二次风控操作 最后结果,channelOrderNumber={}, result={}", channelOrderNumber, result); log.info("[secendAudit]二次风控操作 最后结果,channelOrderNumber={}, result={}", channelOrderNumber, result);
return result; return new Tuple<>(result, "二次风控审批完成");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment