123
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.bashi.dk.service.impl;
|
package com.bashi.dk.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.annotation.MirroredAnnotationAttribute;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
@@ -35,6 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -77,7 +79,16 @@ public class BorrowServiceImpl extends ServiceImpl<BorrowMapper, Borrow> impleme
|
|||||||
if(customer.getRealNameAuth() != 1){
|
if(customer.getRealNameAuth() != 1){
|
||||||
throw new CustomException("请补全个人资料后在发起贷款");
|
throw new CustomException("请补全个人资料后在发起贷款");
|
||||||
}
|
}
|
||||||
|
if(req.getTotalLoanMoney() == null){
|
||||||
|
throw new CustomException("请选择贷款金额");
|
||||||
|
}
|
||||||
LoansSetting loansSetting = loansSettingService.getLoansSetting();
|
LoansSetting loansSetting = loansSettingService.getLoansSetting();
|
||||||
|
if(req.getTotalLoanMoney().compareTo(loansSetting.getLoansMinAccount()) < 0){
|
||||||
|
throw new CustomException("贷款金额不能小于"+loansSetting.getLoansMinAccount());
|
||||||
|
}
|
||||||
|
if(req.getTotalLoanMoney().compareTo(loansSetting.getLoansMaxAccount()) > 0){
|
||||||
|
throw new CustomException("贷款金额不能大于"+loansSetting.getLoansMaxAccount());
|
||||||
|
}
|
||||||
CalLoanReq calLoanReq = new CalLoanReq();
|
CalLoanReq calLoanReq = new CalLoanReq();
|
||||||
calLoanReq.setTotalLoanMoney(req.getTotalLoanMoney());
|
calLoanReq.setTotalLoanMoney(req.getTotalLoanMoney());
|
||||||
calLoanReq.setTotalMonth(req.getTotalMonth());
|
calLoanReq.setTotalMonth(req.getTotalMonth());
|
||||||
|
|||||||
Reference in New Issue
Block a user