xiaoyong931011
2023-04-13 f5beeeda5c8cad4ef29a4a875d5a05543657f1eb
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
@@ -748,11 +748,13 @@
        Integer type = apiRechargeWalletDto.getType();
        if(2 == type){
            //成为合伙人的充值金额
            DataDictionaryCustom agentPriceDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.PRICE_AMOUNT.getType(),
                    DataDictionaryEnum.PRICE_AMOUNT.getCode());
            String agentPrice = agentPriceDic.getValue();
            BigDecimal price = new BigDecimal(agentPrice);
            if(price.compareTo(amount) != 0){
            MallAgentRecord mallAgentRecord = mallAgentRecordMapper.selectById(apiRechargeWalletDto.getAgentApplyId());
            BigDecimal agentPrice = mallAgentRecord.getAmount();
//            DataDictionaryCustom agentPriceDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.PRICE_AMOUNT.getType(),
//                    DataDictionaryEnum.PRICE_AMOUNT.getCode());
//            String agentPrice = agentPriceDic.getValue();
//            BigDecimal price = new BigDecimal(agentPrice);
            if(agentPrice.compareTo(amount) != 0){
                return new FebsResponse().fail().message("成为合伙人的金额为"+agentPrice);
            }
        }