cloudroam
2024-10-28 617cac9aab814b33a4a0947d7222eae1098028ca
src/main/java/com/mzl/flower/web/v2/wallet/WalletController.java
@@ -19,6 +19,7 @@
import com.mzl.flower.entity.wallet.WalletDO;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;
/**
* @author @TaoJie
@@ -66,9 +67,19 @@
        if(null==currentSupplier){
            throw new ValidationException("供应商不能为空");
        }
        final WalletDO walletDO = walletService.getCurrentSupplier();
        if(null!=walletDO){
            // 根据当前供应商获取待结算的钱
            BigDecimal waittingSettlementAmount = walletService.getWaittingSettlementAmount(walletDO);
            walletDO.setSettlingAmount(waittingSettlementAmount);
            // 总交易额度
            walletDO.setTotalTransactionAmount(walletService.getSupplierTotalTransactionAmount(walletDO));
            // 总扣款数量
            walletDO.setTotalDeduction(walletService.getSupplierDeductAmount(walletDO));
        }
        return returnData(R.SUCCESS.getCode(), walletService.getCurrentSupplier());
        return returnData(R.SUCCESS.getCode(), walletDO);
    }
    @GetMapping("/page")