xiaoyong931011
2020-07-06 1d1c0022e05ffacfe1733561951070df888a4a03
20200706   代码提交
4 files modified
42 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberAvivableCoinInfoVo.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java 23 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformFeeSettingDao.java 4 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/platform/PlatformFeeSettingDao.xml 12 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/parameter/vo/MemberAvivableCoinInfoVo.java
@@ -16,4 +16,7 @@
    @ApiModelProperty(value = "手续费")
    private BigDecimal fee;
    
    @ApiModelProperty(value = "USDT链名")
    private String lable;
}
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -811,15 +811,22 @@
            return Result.fail(MessageSourceUtils.getString("member_service_0087"));
        }
        MemberAvivableCoinInfoVo memberAvivableCoinInfoVo = new MemberAvivableCoinInfoVo();
        memberAvivableCoinInfoVo.setAvailableBalance(walletCoin.getAvailableBalance());
        List<MemberAvivableCoinInfoVo> arrayList = new ArrayList<>();
        PlatformFeeSettingEntity feeSetting = platformFeeSettingDao.getFeeSettingByTypeAndSymbol(2, symbol);
        if (ObjectUtil.isEmpty(feeSetting)) {
        List<PlatformFeeSettingEntity> feeSettingByTypeAndSymbolLable = platformFeeSettingDao.getFeeSettingsByTypeAndSymbol(2, symbol);
        if (CollUtil.isEmpty(feeSettingByTypeAndSymbolLable)) {
            return Result.fail(MessageSourceUtils.getString("member_service_0087"));
        }
        memberAvivableCoinInfoVo.setFee(feeSetting.getFeePrice());
        return Result.ok(memberAvivableCoinInfoVo);
        for(PlatformFeeSettingEntity platformFeeSettingEntity : feeSettingByTypeAndSymbolLable) {
            MemberAvivableCoinInfoVo memberAvivableCoinInfoVo = new MemberAvivableCoinInfoVo();
            memberAvivableCoinInfoVo.setAvailableBalance(walletCoin.getAvailableBalance());
            memberAvivableCoinInfoVo.setFee(platformFeeSettingEntity.getFeePrice());
            memberAvivableCoinInfoVo.setLable(platformFeeSettingEntity.getLable());
            arrayList.add(memberAvivableCoinInfoVo);
        }
        return Result.ok(arrayList);
    }
    @Override
@@ -870,7 +877,7 @@
        if (flag) {
            MemberWalletCoinEntity walletCoin = memberWalletCoinDao.selectWalletCoinBymIdAndCode(memberId, memberSubmitCoinApplyDto.getSymbol());
            BigDecimal availableBalance = walletCoin.getAvailableBalance();
            BigDecimal coinNumber = memberSubmitCoinApplyDto.getCoinNumber().add(memberSubmitCoinApplyDto.getFeeAmount());
            BigDecimal coinNumber = memberSubmitCoinApplyDto.getCoinNumber();
            if (availableBalance.compareTo(BigDecimal.ZERO) > 0
                    && availableBalance.compareTo(coinNumber) > 0) {
                //新增提币记录
@@ -901,7 +908,7 @@
                MemberAccountMoneyChange accountRecord = new MemberAccountMoneyChange();
                accountRecord.setContent("提币");
                accountRecord.setMemberId(memberId);
                accountRecord.setAmount(memberSubmitCoinApplyDto.getCoinNumber());
                accountRecord.setAmount(coinNumber);
                accountRecord.setStatus(MemberAccountMoneyChange.STATUS_WAIT_INTEGER);
                accountRecord.setSymbol(memberSubmitCoinApplyDto.getSymbol());
                accountRecord.setType(MemberAccountMoneyChange.TYPE_WALLET_COIN);
src/main/java/com/xcong/excoin/modules/platform/dao/PlatformFeeSettingDao.java
@@ -1,5 +1,7 @@
package com.xcong.excoin.modules.platform.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -11,4 +13,6 @@
    PlatformFeeSettingEntity getFeeSettingByTypeAndSymbol(@Param("type")Integer type,@Param("symbol")String symbol);
    List<PlatformFeeSettingEntity> getFeeSettingsByTypeAndSymbol(@Param("type")int i,@Param("symbol")String symbol);
}
src/main/resources/mapper/platform/PlatformFeeSettingDao.xml
@@ -20,5 +20,17 @@
     <select id="getFeeSettingByTypeAndSymbol" resultType="com.xcong.excoin.modules.platform.entity.PlatformFeeSettingEntity">
         select * from platform_fee_setting where  type = #{type} and symbol = #{symbol}
     </select>
     <select id="getFeeSettingsByTypeAndSymbol" resultType="com.xcong.excoin.modules.platform.entity.PlatformFeeSettingEntity">
         select * from platform_fee_setting
          <where>
             <if test="type != null  and  type  != ''">
                  type = #{type}
             </if>
             <if test="symbol != null  and  symbol  != ''">
                 and symbol = #{symbol}
             </if>
         </where>
     </select>
    
</mapper>