1123
This commit is contained in:
@@ -60,12 +60,12 @@ public class AppSettingController {
|
||||
public AjaxResult<LoansSettingVO> loans() {
|
||||
LoansSetting setting = loansSettingService.getLoansSetting();
|
||||
LoansSettingVO vo = BeanConvertUtil.convertTo(setting, LoansSettingVO::new);
|
||||
Double minDayServiceRate = Arrays.stream(setting.getServiceRate().split(","))
|
||||
Double minDayServiceRate = 0D;
|
||||
Double minMonthRate = Arrays.stream(setting.getServiceRate().split(","))
|
||||
.map(Double::valueOf).min(Double::compareTo).orElse(null);
|
||||
if(minDayServiceRate != null){
|
||||
minDayServiceRate = NumberUtil.div(minDayServiceRate, new Double(30D), 4);
|
||||
}else{
|
||||
minDayServiceRate = 0D;
|
||||
vo.setMinMonthRate(minMonthRate);
|
||||
if(minMonthRate != null){
|
||||
minDayServiceRate = NumberUtil.div(minMonthRate, new Double(30D), 4);
|
||||
}
|
||||
vo.setMinDayServiceRate(minDayServiceRate);
|
||||
return AjaxResult.success(vo);
|
||||
|
||||
@@ -51,4 +51,6 @@ public class LoansSettingVO {
|
||||
@ApiModelProperty("最小 日息")
|
||||
private Double minDayServiceRate;
|
||||
|
||||
private Double minMonthRate;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user