From 95da7870f87ec42dbd572aba040492c881fe0b9c Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Fri, 05 Jun 2020 15:35:21 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/chonggaoxiao/new_excoin.git --- src/main/java/com/xcong/excoin/modules/home/service/impl/MemberQuickBuySaleServiceImpl.java | 19 +++---------------- 1 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/home/service/impl/MemberQuickBuySaleServiceImpl.java b/src/main/java/com/xcong/excoin/modules/home/service/impl/MemberQuickBuySaleServiceImpl.java index 7dbddec..a7e4e10 100644 --- a/src/main/java/com/xcong/excoin/modules/home/service/impl/MemberQuickBuySaleServiceImpl.java +++ b/src/main/java/com/xcong/excoin/modules/home/service/impl/MemberQuickBuySaleServiceImpl.java @@ -15,19 +15,19 @@ import com.xcong.excoin.common.LoginUserUtils; import com.xcong.excoin.common.enumerates.CoinTypeEnum; import com.xcong.excoin.common.response.Result; -import com.xcong.excoin.modules.home.dao.MemberPaymentMethodDao; import com.xcong.excoin.modules.home.dao.MemberQuickBuySaleDao; import com.xcong.excoin.modules.home.dto.MemberQuickBuySaleCommitDto; import com.xcong.excoin.modules.home.dto.MemberQuickBuySaleDto; -import com.xcong.excoin.modules.home.entity.MemberPaymentMethodEntity; import com.xcong.excoin.modules.home.entity.MemberQuickBuySaleEntity; import com.xcong.excoin.modules.home.mapper.MemberQuickBuySaleEntityMapper; import com.xcong.excoin.modules.home.service.MemberQuickBuySaleService; import com.xcong.excoin.modules.home.vo.MemberQuickBuySaleDetailVo; import com.xcong.excoin.modules.home.vo.MemberQuickBuySaleVo; import com.xcong.excoin.modules.member.dao.MemberDao; +import com.xcong.excoin.modules.member.dao.MemberPaymentMethodDao; import com.xcong.excoin.modules.member.dao.MemberWalletCoinDao; import com.xcong.excoin.modules.member.entity.MemberEntity; +import com.xcong.excoin.modules.member.entity.MemberPaymentMethodEntity; import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity; import com.xcong.excoin.modules.platform.dao.PlatformPaymentMethodDao; import com.xcong.excoin.modules.platform.entity.PlatformPaymentMethodEntity; @@ -70,7 +70,7 @@ MemberQuickBuySaleVo memberQuickBuySaleVo = new MemberQuickBuySaleVo(); memberQuickBuySaleVo.setId(memberQuickBuySaleEntity.getId()); // 返回前台付款方式 - return Result.ok(memberQuickBuySaleVo); + return Result.ok("提交成功",memberQuickBuySaleVo); } @Override @@ -183,19 +183,6 @@ MemberQuickBuySaleEntity memberQuickBuySaleEntity = memberQuickBuySaleDao.selectByIdAndMemberId(member.getId(),id); memberQuickBuySaleEntity.setOrderStatus(MemberQuickBuySaleEntity.CHARGE_STATUS_CANCEL_USER); memberQuickBuySaleDao.updateById(memberQuickBuySaleEntity); - - // 判断是否存在足够余额 - MemberWalletCoinEntity walletCoin = memberWalletCoinDao.selectWalletCoinBymIdAndCode(member.getId(),CoinTypeEnum.USDT.toString()); - boolean flag = true; - while(flag) { - walletCoin.setAvailableBalance(walletCoin.getAvailableBalance().add(memberQuickBuySaleEntity.getAmountUsdt())); - walletCoin.setFrozenBalance(walletCoin.getFrozenBalance().subtract(memberQuickBuySaleEntity.getAmountUsdt())); - int i = memberWalletCoinDao.updateById(walletCoin); - if(i>0) { - flag = false; - } - walletCoin = memberWalletCoinDao.selectWalletCoinBymIdAndCode(member.getId(),CoinTypeEnum.USDT.toString()); - } return Result.ok("成功"); } } -- Gitblit v1.9.1