新版仿ok交易所-后端
1
zj
18 hours ago 640ccb9229224642515527daf87f308a7aa9bdf4
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));