提交 c182a98f authored 作者: liuhaiquan's avatar liuhaiquan

修改同意货主借款申请的还款时间赋值

上级 efc8b009
...@@ -155,8 +155,6 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService { ...@@ -155,8 +155,6 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
OwnerLoanRecord entity = new OwnerLoanRecord(); OwnerLoanRecord entity = new OwnerLoanRecord();
LocalDateTime createTime = LocalDateTime.now(); LocalDateTime createTime = LocalDateTime.now();
LocalDateTime loanRepaymentTime = createTime.plusDays(param.getExpireDay());
entity.setLoanRepaymentTime(loanRepaymentTime);
entity.setLoanNo(idGenerateSnowFlake.nextId(1L)); entity.setLoanNo(idGenerateSnowFlake.nextId(1L));
entity.setCreateTime(createTime); entity.setCreateTime(createTime);
entity.setOwnerUserNo(loginUserInfo.getUserNo()); entity.setOwnerUserNo(loginUserInfo.getUserNo());
...@@ -191,8 +189,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService { ...@@ -191,8 +189,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
throw new ServiceSystemException(PerformanceResultEnum.DATA_NOT_FIND); throw new ServiceSystemException(PerformanceResultEnum.DATA_NOT_FIND);
} }
if (param.getStatus()) { if (param.getStatus()) {
borrowerConfigDao.selectByBorrowerIdAndType(ownerLoanRecord.getBorrowerId(), param.getLoanType()) BorrowerConfig borrowerConfig = borrowerConfigDao.selectByBorrowerIdAndType(ownerLoanRecord.getBorrowerId(),
.orElseThrow(PerformanceResultEnum.BORROWER_CONFIG_TYPE_NOT_SUPPORT_ERROR); param.getLoanType()).orElseThrow(PerformanceResultEnum.BORROWER_CONFIG_TYPE_NOT_SUPPORT_ERROR);
Borrower borrower = borrowerDao.getEntityByKey(ownerLoanRecord.getBorrowerId()) Borrower borrower = borrowerDao.getEntityByKey(ownerLoanRecord.getBorrowerId())
.orElseThrow(PerformanceResultEnum.DATA_NOT_FIND); .orElseThrow(PerformanceResultEnum.DATA_NOT_FIND);
...@@ -216,6 +214,9 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService { ...@@ -216,6 +214,9 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
ownerLoanRecord.setApproveBy(TokenUtil.getLoginUserInfo().getUserName()); ownerLoanRecord.setApproveBy(TokenUtil.getLoginUserInfo().getUserName());
ownerLoanRecord.setApproveTime(LocalDateTime.now()); ownerLoanRecord.setApproveTime(LocalDateTime.now());
LocalDateTime loanRepaymentTime = LocalDateTime.now().plusDays(borrowerConfig.getDay());
ownerLoanRecord.setLoanRepaymentTime(loanRepaymentTime);
if (OwnerLoanRecordEnum.LoanType.FUND.getCode().equals(param.getLoanType())) { if (OwnerLoanRecordEnum.LoanType.FUND.getCode().equals(param.getLoanType())) {
ownerLoanRecord.setStatus(OwnerLoanRecordEnum.Status.PAY_WAIT.getCode()); ownerLoanRecord.setStatus(OwnerLoanRecordEnum.Status.PAY_WAIT.getCode());
//fundPayProcess(param, ownerLoanRecord, borrower); //fundPayProcess(param, ownerLoanRecord, borrower);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论