提交 0064c7d7 authored 作者: huyufan's avatar huyufan

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

......@@ -146,6 +146,7 @@ public enum PerformanceResultEnum implements ResultEnum {
OWNER_LOAN_RECORD_PAY_WAIT_ERROR(1853,"当前借款单状态不是待付款"),
OWNER_LOAN_PAYMENT_STATUS_ERROR(1854, "执行借款审批失败,请稍后重试"),
OWNER_LOAN_PAY_STATUS_ERROR(1855, "付款失败"),
DATA_STATUS_ERROR(1856, "当前状态有误")
;
private final int code;
......
......@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Slf4j
......@@ -52,5 +53,12 @@ public class CarrierOwnerPaymentController {
return Result.ok();
}
@ApiOperation(value = "借款重新支付(只更改借款状态)",notes = "<br>By:胡宇帆")
@GetMapping("/ownerPaymentRetryPay")
public Result<Object> ownerPaymentRetryPay(@RequestParam(value = "id") @NotBlank Integer id) {
ownerPaymentService.ownerPaymentRetryPay(id);
return Result.ok();
}
}
......@@ -92,4 +92,13 @@ public class OwnerPaymentServiceImpl implements OwnerPaymentService {
ownerPaymentDao.updateStatusAndMerchantRunningWaterNo(ownerPayment);
}
@Override
public void ownerPaymentRetryPay(Integer id) {
OwnerPayment ownerPayment = ownerPaymentDao.getEntityByKey(id).orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
if (!OwnerPaymentEnum.Status.PAY_FAIL.getCode().equals(ownerPayment.getStatus())) {
throw new ServiceSystemException(PerformanceResultEnum.DATA_STATUS_ERROR);
}
ownerPaymentDao.updatePayStatus(id, OwnerPaymentEnum.Status.PAY_WAIT.getCode());
}
}
......@@ -16,4 +16,6 @@ public interface OwnerPaymentService {
CarrierOwnerPaymentVO getOwnerPaymentDetail(Integer id);
void pay(Integer id);
void ownerPaymentRetryPay(Integer id);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论