新版仿ok交易所-后端
1
zj
yesterday f31fc9f42f78de0808e7f4bdc797c5e622df09e3
trading-order-admin/src/main/java/com/yami/trading/admin/controller/item/TItemLeverageController.java
@@ -79,16 +79,16 @@
    public Result<String> save(@Valid @RequestBody ItemLeverageDTO itemLeverageDTO) {
        String leverRate = itemLeverageDTO.getLeverRate();
        if (StrUtil.isEmpty(leverRate)) {
            throw new YamiShopBindException("杠杆倍数不能为空");
            throw new YamiShopBindException("Leverage multiplier cannot be empty");
        }
        BigDecimal bigDecimal;
        try {
            bigDecimal = new BigDecimal(leverRate);
        } catch (Exception e) {
            throw new YamiShopBindException("杠杆倍数必须是数字");
            throw new YamiShopBindException("Leverage multiplier must be a number");
        }
        if (bigDecimal.compareTo(BigDecimal.ONE) <= 0) {
            throw new YamiShopBindException("杠杆倍数必须大于1");
            throw new YamiShopBindException("Leverage multiplier must be greater than 1");
        }
        //新增或编辑表单保存
        itemLeverageService.saveOrUpdate(tItemLeverageWrapper.toEntity(itemLeverageDTO));