From 0a6e3fcaa4850d319c4cfeb60b96c255eb476075 Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Wed, 31 Jan 2024 11:04:40 +0800 Subject: [PATCH] 会员列表增加波卷功能 --- src/main/java/cc/mrbird/febs/mall/service/impl/MallMemberWithdrawServiceImpl.java | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/MallMemberWithdrawServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/MallMemberWithdrawServiceImpl.java index 8cc641c..474b714 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/MallMemberWithdrawServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/MallMemberWithdrawServiceImpl.java @@ -56,14 +56,14 @@ } - CashOutSettingVo cashOutSettingVo = new CashOutSettingVo(); - DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.CASHOUT_SETTING.getType(), DataDictionaryEnum.CASHOUT_SETTING.getCode()); - if (dic != null) { - cashOutSettingVo = JSONObject.parseObject(dic.getValue(), CashOutSettingVo.class); - } - if (withdrawalDto.getAmount().compareTo(cashOutSettingVo.getMinCashOut()) < 0) { - throw new FebsException("最小提现金额为"+cashOutSettingVo.getMinCashOut()+"元"); - } +// CashOutSettingVo cashOutSettingVo = new CashOutSettingVo(); +// DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.CASHOUT_SETTING.getType(), DataDictionaryEnum.CASHOUT_SETTING.getCode()); +// if (dic != null) { +// cashOutSettingVo = JSONObject.parseObject(dic.getValue(), CashOutSettingVo.class); +// } +// if (withdrawalDto.getAmount().compareTo(cashOutSettingVo.getMinCashOut()) < 0) { +// throw new FebsException("最小提现金额为"+cashOutSettingVo.getMinCashOut()+"元"); +// } String openId = mallMember.getOpenId(); if(StrUtil.isEmpty(openId)){ @@ -80,13 +80,16 @@ } walletService.reduce(withdrawalDto.getAmount(), memberId, "balance"); - String withdrawalNo = "TX_"+MallUtils.getOrderNum(); +// String withdrawalNo = "TX_"+MallUtils.getOrderNum(); MallMemberWithdraw withdraw = new MallMemberWithdraw(); - withdraw.setWithdrawNo(withdrawalNo); +// withdraw.setWithdrawNo(withdrawalNo); withdraw.setMemberId(memberId); withdraw.setAmount(withdrawalDto.getAmount()); withdraw.setStatus(1); this.baseMapper.insert(withdraw); + String withdrawalNo = "TX_"+withdraw.getId().toString(); + withdraw.setWithdrawNo(withdrawalNo); + this.baseMapper.updateById(withdraw); mallMemberService.addMoneyFlow(memberId, withdrawalDto.getAmount().negate(), MoneyFlowTypeEnum.WITHDRAWAL.getValue(), withdrawalNo, null, null, null, 1, FlowTypeEnum.BALANCE.getValue()); } -- Gitblit v1.9.1