zyy
2025-11-26 c76d21afb6853938a8f743a9fbaad9b5855d19c6
提币手续费
2 files modified
17 ■■■■■ changed files
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java 9 ●●●● patch | view | raw | blame | history
trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java 8 ●●●● patch | view | raw | blame | history
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
@@ -2,6 +2,7 @@
import cn.hutool.core.util.StrUtil;
import com.yami.trading.api.util.ServletUtil;
import com.yami.trading.bean.item.domain.Item;
import com.yami.trading.bean.model.User;
import com.yami.trading.bean.model.Withdraw;
import com.yami.trading.common.constants.Constants;
@@ -220,7 +221,7 @@
     */
    @GetMapping("fee")
    @ApiOperation("提现手续费")
    public Result fee(String channel, String amount) {
    public Result fee(String channel, String amount, String type) {
        String error = this.verif(amount);
        if (!StringUtils.isNullOrEmpty(error)) {
            throw new YamiShopBindException(error);
@@ -237,6 +238,10 @@
            // 手续费(USDT)
            // 提现手续费类型,fixed是单笔固定金额,rate是百分比,part是分段
            String withdraw_fee_type = this.sysparaService.find("withdraw_fee_type").getSvalue();
            map.put("withdraw_fee_type", withdraw_fee_type);
            if (type!=null && type.equalsIgnoreCase(Item.cryptos)) {
                fee = 0;
            } else {
            // fixed单笔固定金额 和 rate百分比 的手续费数值
            double withdraw_fee = Double.valueOf(this.sysparaService.find("withdraw_fee").getSvalue());
            if ("fixed".equals(withdraw_fee_type)) {
@@ -260,7 +265,7 @@
                    i++;
                }
            }
            map.put("withdraw_fee_type", withdraw_fee_type);
            }
        }
        double volume_last = Arith.sub(amount_double, fee);
trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java
@@ -552,7 +552,7 @@
         */
        double withdraw_fee = Double.valueOf(sysparaService.find("withdraw_fee").getSvalue());
        double fee = 0;
        if ("fixed".equals(withdraw_fee_type)) {
        /*if ("fixed".equals(withdraw_fee_type)) {
            fee = withdraw_fee;
        }
        if ("rate".equals(withdraw_fee_type)) {
@@ -560,9 +560,9 @@
            fee = Arith.mul(withdraw.getVolume().doubleValue(), withdraw_fee);
        }
        if ("part".equals(withdraw_fee_type)) {
            /**
            *//**
             * 提现手续费part分段的值
             */
             *//*
            String withdraw_fee_part = sysparaService.find("withdraw_fee_part").getSvalue();
            String[] withdraw_fee_parts = withdraw_fee_part.split(",");
            for (int i = 0; i < withdraw_fee_parts.length; i++) {
@@ -574,7 +574,7 @@
                }
                i++;
            }
        }
        }*/
        /**
         * 当日提现次数是否超过
         */