提交 35ef78b8 authored 作者: huyufan's avatar huyufan

Merge remote-tracking branch 'origin/v10.7_borrowing_and_repayment_20240118' into test

Former-commit-id: 39259e33
......@@ -141,7 +141,7 @@ public enum PerformanceResultEnum implements ResultEnum {
OWNER_LOAN_RECORD_CANCEL_STATUS_ERROR(1851, "状态已变更无法取消"),
OWNER_LOAN_RECORD_ADJUST_STATUS_ERROR(1851, "状态已变更无法核销"),
OWNER_LOAN_RECORD_PAY_WAIT_ERROR(1852,"当前借款单状态不是待付款"),
OWNER_LOAN_PAYMENT_STATUS_ERROR(1851, "状态已变变更"),
OWNER_LOAN_PAYMENT_STATUS_ERROR(1851, "执行借款审批失败,请稍后重试"),
;
private final int code;
......
......@@ -12,7 +12,7 @@ public class RedissonConstants {
public static final String ORDER_CHILD_LOAN_OWNER_USERID_LOCK = "clx-performance:orderChild:loan:ownerUserId:";
public static final String ORDER_CHILD_LOAN_RECORD_LOAN_NO_LOCK = "clx-performance:loanRecord:loanNo:";
public static final String ORDER_CHILD_LOAN_RECORD_LOAN_NO_LOCK = "clx-performance:loanRecordApprove:loanNo:";
}
package com.clx.performance.controller.pc.loan.carrier;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.constant.RedissonConstants;
import com.clx.performance.enums.PerformanceResultEnum;
......@@ -56,13 +57,14 @@ public class CarrierOwnerLoanRecordController {
try {
lock = redissonClient.getLock(RedissonConstants.ORDER_CHILD_LOAN_RECORD_LOAN_NO_LOCK + param.getLoanNo());
boolean flag = lock.tryLock(3, 5, TimeUnit.SECONDS);
boolean flag = lock.tryLock(5, 4, TimeUnit.SECONDS);
if (!flag) {
throw new ServiceSystemException(PerformanceResultEnum.OWNER_LOAN_PAYMENT_STATUS_ERROR);
}
ownerLoanRecordService.ownerLoanRecordApprove(param);
} catch (Exception e) {
log.info("借款审批异常,param:{}, lock:{}", param, JSONUtil.parse(lock));
throw new ServiceSystemException(PerformanceResultEnum.OWNER_LOAN_PAYMENT_STATUS_ERROR, e.getMessage());
} finally {
if (lock != null && lock.isLocked() && lock.isHeldByCurrentThread()) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论