xiaoyong931011
2022-09-01 5a4ab1f92adb1f6d7e3596388bcebc77709e460f
src/main/java/cc/mrbird/febs/mall/service/impl/MallMemberWithdrawServiceImpl.java
@@ -22,6 +22,7 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
@@ -42,6 +43,7 @@
    private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void withdrawal(WithdrawalDto withdrawalDto) {
        Long memberId = LoginUserUtil.getLoginUser().getId();
        MallMember mallMember = mallMemberService.getById(memberId);
@@ -59,9 +61,8 @@
        if (dic != null) {
            cashOutSettingVo = JSONObject.parseObject(dic.getValue(), CashOutSettingVo.class);
        }
        DataDictionaryCustom withdrawalCnt = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.MEMBER_WITHDRAWAL_CNT.getType(), DataDictionaryEnum.MEMBER_WITHDRAWAL_CNT.getCode());
        if (withdrawalDto.getAmount().compareTo(cashOutSettingVo.getMinCashOut()) < 0) {
            throw new FebsException("最小提现金额为"+withdrawalCnt.getValue()+"元");
            throw new FebsException("最小提现金额为"+cashOutSettingVo.getMinCashOut()+"元");
        }
        String openId = mallMember.getOpenId();