Helius
2021-03-26 071b6afa2e5d03fe2375f48499041e1ae415509b
modify
4 files modified
30 ■■■■ changed files
src/main/java/com/xcong/excoin/modules/member/mapper/MemberMapper.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java 18 ●●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 6 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MemberMapper.xml 4 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/member/mapper/MemberMapper.java
@@ -423,4 +423,6 @@
    String selectMemberWalletContractByMemberId(@Param("memberId")long memberId);
    
    MemberEntity selectMemberInfoByQueryKey(@Param("queryKey") String queryKey);
}
src/main/java/com/xcong/excoin/modules/member/service/impl/MemberServiceImpl.java
@@ -13,6 +13,7 @@
import com.xcong.excoin.common.configure.FebsConfigure;
import com.xcong.excoin.common.entity.FebsResponse;
import com.xcong.excoin.common.entity.QueryRequest;
import com.xcong.excoin.common.exception.GlobalException;
import com.xcong.excoin.modules.Sms106Send;
import com.xcong.excoin.modules.member.dto.MemberDetailConfirmDto;
import com.xcong.excoin.modules.member.entity.AgentFriendRelationEntity;
@@ -488,7 +489,7 @@
    }
    @Override
    @Transactional
    @Transactional(rollbackFor = Exception.class)
    public FebsResponse memberWithdrawCoinConfirm(@NotNull(message = "{required}") Long id) {
        
        MemberCoinWithdrawEntity selectById = memberCoinWithdrawMapper.selectById(id);
@@ -516,10 +517,19 @@
            columnMap.put("address", address);
            // 如果是内部转账 则需要将币加到内部地址
            List<MemberCoinAddressEntity> selectByMap = memberCoinAddressMapper.selectByMap(columnMap);
            if(selectByMap == null || selectByMap.isEmpty()) {
                return new FebsResponse().message("地址有误,请拒绝!");
            Long aimMemberId = null;
            if(CollUtil.isEmpty(selectByMap)) {
//                return new FebsResponse().message("地址有误,请拒绝!");
//                throw new GlobalException("地址有误,请拒绝!");
                MemberEntity memberEntity = memberMapper.selectMemberInfoByQueryKey(address);
                if (memberEntity == null) {
                    throw new GlobalException("地址有误或用户不存在,请拒绝!");
            }
            Long aimMemberId = selectByMap.get(0).getMemberId();
                aimMemberId = memberEntity.getId();
            } else {
                aimMemberId = selectByMap.get(0).getMemberId();
            }
            MemberWalletCoinEntity aimWalletCoin = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(aimMemberId, symbol);
            
            BigDecimal addTotal = aimWalletCoin.getTotalBalance().add(selectById.getAmount());
src/main/resources/application-dev.yml
@@ -23,13 +23,13 @@
  redis:
    ## Redis数据库索引(默认为0)
    database: 1
    database: 0
    ## Redis服务器地址
    host: 114.55.92.106
    host: 121.37.162.173
    ## Redis服务器连接端口
    port: 6379
    ## Redis服务器连接密码(默认为空)
    password: hibit123
    password: d32ncxe@i3#!dV
    lettuce:
      pool:
        # 连接池中的最小空闲连接
src/main/resources/mapper/modules/MemberMapper.xml
@@ -2,6 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xcong.excoin.modules.member.mapper.MemberMapper">
    <select id="selectMemberInfoByQueryKey" resultType="com.xcong.excoin.modules.member.entity.MemberEntity">
        select * from member where phone=#{queryKey} or invite_id=#{queryKey} or email=#{queryKey}
    </select>
    <select id="selectMemberWalletContractByMemberId" resultType="java.lang.String">
        SELECT
        total_balance