|
|
@ -13,6 +13,7 @@ import org.springframework.util.ObjectUtils; |
|
|
|
import org.springframework.validation.BindingResult; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
@ -59,8 +60,8 @@ public class RateController { |
|
|
|
if (ObjectUtils.isEmpty(rate.getRateName())) { |
|
|
|
return Result.error("汇率名称不能为空"); |
|
|
|
} |
|
|
|
if (rate.getNum() == null) { |
|
|
|
return Result.error("汇率数值不能为空"); |
|
|
|
if(rate.getNum()==null || rate.getNum().compareTo(BigDecimal.ZERO) <= 0){ |
|
|
|
return Result.error(("汇率数值不能小于等于0")); |
|
|
|
} |
|
|
|
rateService.update(rate); |
|
|
|
return Result.success("编辑成功"); |
|
|
|