Browse Source

修改提现逻辑

gogs 1 month ago
parent
commit
bf53258f4e

+ 3 - 1
game-business/src/main/java/com/game/business/controller/AppUserController.java

@@ -139,6 +139,7 @@ public class AppUserController extends BaseController
             userChargeDto.setRate(channel.getRate());
             remark = "后台充值补单,渠道:".concat(channel.getName());
         }
+        Long groupId = IdUtil.getSnowflakeNextId();
         /*if(StringUtils.isNotBlank(userChargeDto.getRemark())){
             String r = userChargeDto.getRemark().replace("后台充值","");
             remark = remark.concat(",").concat(r);
@@ -155,6 +156,7 @@ public class AppUserController extends BaseController
             tran.setDiamondCoinChange(userChargeDto.getAmount());
             tran.setCurrencyType(TranCurrencyType.Balance.getType());
         }
+        tran.setTranGroupId(groupId);
         tran.setRemarks(remark);
 
         try {
@@ -218,7 +220,7 @@ public class AppUserController extends BaseController
 
             appUsersCharge.setCoin(BigDecimal.valueOf(userChargeDto.getAmount()));
             appUsersCharge.setCoinType(Long.parseLong(String.valueOf(userChargeDto.getType())));
-            appUsersCharge.setOrderno(IdUtil.fastUUID());
+            appUsersCharge.setOrderno(String.valueOf(groupId));
             // 充值成功
             appUsersCharge.setStatus(1L);
             // 人工充值

+ 14 - 2
game-business/src/main/java/com/game/business/domain/AppUser.java

@@ -953,8 +953,8 @@ private static final long serialVersionUID=1L;
     private Double diamondCoinTotal;
 
     /** 累计余额总数 */
-    @ApiModelProperty(value = "可提现余额")
-    @Excel(name = "可提现余额")
+    @ApiModelProperty(value = "可提现余额(已废弃)")
+    @Excel(name = "可提现余额(已废弃)")
     @TableField(value = "diamond_coin_cash")
     private Double diamondCoinCash;
 
@@ -970,4 +970,16 @@ private static final long serialVersionUID=1L;
     @TableField(value = "agent_flag")
     private Integer agentFlag;
 
+    /** 可提现余额 */
+    @ApiModelProperty(value = "可提现余额")
+    @Excel(name = "可提现余额")
+    @TableField(value = "withdraw_able")
+    private Double withdrawAble;
+
+    /** 已提现余额 */
+    @ApiModelProperty(value = "已提现余额")
+    @Excel(name = "已提现余额")
+    @TableField(value = "withdraw")
+    private Double withdraw;
+
 }

+ 6 - 0
game-business/src/main/java/com/game/business/domain/FinTranRecord.java

@@ -229,6 +229,12 @@ private static final long serialVersionUID=1L;
     @TableField(value = "uid")
     private Long uid;
 
+    /**  是否已满足提现 */
+    @ApiModelProperty(value = " 是否已满足提现 0:未满足  1:已满足")
+    @Excel(name = " 是否已满足提现")
+    @TableField(value = "withdraw_flag")
+    private Integer withdrawFlag;
+
     /**
      * 初始化 基本信息
      *

+ 2 - 0
game-business/src/main/java/com/game/business/service/IAppUsersChargeService.java

@@ -70,4 +70,6 @@ public interface IAppUsersChargeService extends IService<AppUsersCharge> {
      * 查询返佣比例
      * */
     public double isChargeToday(Long userId);
+
+    AppUsersCharge selectByOrderNo(String orderNo);
 }

+ 6 - 0
game-business/src/main/java/com/game/business/service/IFinTranRecordService.java

@@ -1,5 +1,6 @@
 package com.game.business.service;
 
+import java.util.Date;
 import java.util.List;
 
 import com.alibaba.fastjson2.JSONObject;
@@ -95,4 +96,9 @@ public interface IFinTranRecordService extends IService<FinTranRecord> {
     public JSONObject selecFinTranRecordCount(FinTranRecordDTO finTranRecordDTO);
 
     List<FinTranVo> selectTranList(FinTranDto finTranDto);
+
+    /**
+     * 根据type查询流水
+     * */
+    List<FinTranRecord> selectUserTran(Integer type1, String type3s, Long userId, Date beginDate,Date endDate,Integer withDrawFlag);
 }

+ 12 - 0
game-business/src/main/java/com/game/business/service/impl/AppUserCountDividendServiceImpl.java

@@ -15,6 +15,7 @@ import java.util.stream.Collectors;
 
 import com.game.business.domain.*;
 import com.game.business.service.*;
+import com.game.business.task.AppUserCountTask;
 import com.game.common.constant.AppSceneType;
 import com.game.common.constant.CacheConstants;
 import com.game.common.constant.finance.FinTranAddedInfo;
@@ -57,6 +58,8 @@ public class AppUserCountDividendServiceImpl extends ServiceImpl<AppUserCountDiv
     private RedisCache redisCache;
     @Autowired
     private IAppUserAgentService appUserAgentService;
+    @Autowired
+    private AppUserCountTask appUserCountTask;
 
     /**
      * 查询用户代理分红
@@ -172,8 +175,11 @@ public class AppUserCountDividendServiceImpl extends ServiceImpl<AppUserCountDiv
         if(curUser.getCoin() < dividendList.stream().mapToDouble(e->e.getCoin()).sum()){
             return HttpRet.fail("发放失败,金币不足");
         }*/
+        List<Long> userIds = new ArrayList<>();
+        userIds.add(sendUserId);
         //开始发放
         List<Long> ids = dividendList.stream().map(AppUserCountDividend::getUserId).collect(Collectors.toList());
+        userIds.addAll(ids);
         List<AppUser> userList = appUserService.selectListByIds(ids);
         if(null != userList && userList.size()>0) {
             Map<String, AppUser> userMap = userList.stream().collect(Collectors.toMap(e -> String.valueOf(e.getUserid()), Function.identity(), (k1, k2) -> k2));
@@ -282,6 +288,7 @@ public class AppUserCountDividendServiceImpl extends ServiceImpl<AppUserCountDiv
                     userCountDividend.setId(countDividend.getId());
                     userCountDividend.setStatus(1);
                     this.updateAppUserCountDividend(userCountDividend);
+
                 }catch (Exception ex){
                     errMsg = "发放失败:" + ex.getMessage();
                     log.info("{}发放失败:{}",errUserId,ex.getMessage());
@@ -291,6 +298,11 @@ public class AppUserCountDividendServiceImpl extends ServiceImpl<AppUserCountDiv
             if(StringUtils.isNotBlank(errMsg)){
                 return HttpRet.fail(errMsg);
             }
+            userIds = userIds.stream().distinct().collect(Collectors.toList());
+            for(Long uid : userIds) {
+                //更新用户可提现余额
+                appUserCountTask.updateWithdrawAble(uid);
+            }
         }
         return HttpRet.success("发放成功",true);
     }

+ 8 - 0
game-business/src/main/java/com/game/business/service/impl/AppUsersChargeServiceImpl.java

@@ -137,4 +137,12 @@ public class AppUsersChargeServiceImpl extends ServiceImpl<AppUsersChargeMapper,
         }
         return money;
     }
+
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public AppUsersCharge selectByOrderNo(String orderNo) {
+        LambdaQueryWrapper<AppUsersCharge> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(AppUsersCharge::getOrderno,orderNo);
+        return appUsersChargeMapper.selectOne(queryWrapper);
+    }
 }

+ 36 - 4
game-business/src/main/java/com/game/business/service/impl/FinTranRecordServiceImpl.java

@@ -7,10 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
 import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import com.game.business.domain.AppUser;
 import com.game.business.domain.CfgCommon;
@@ -21,6 +18,7 @@ import com.game.business.dto.FinTranRecordDTO;
 import com.game.business.service.IAppGameBettingService;
 import com.game.business.service.IAppUserService;
 import com.game.business.service.ICfgCommonService;
+import com.game.business.task.AppUserCountTask;
 import com.game.business.util.Md5Utils;
 import com.game.business.vo.FinTranVo;
 import com.game.common.annotation.DataSource;
@@ -41,6 +39,7 @@ import org.springframework.stereotype.Service;
 import com.game.business.mapper.FinTranRecordMapper;
 import com.game.business.domain.FinTranRecord;
 import com.game.business.service.IFinTranRecordService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 消费记录Service业务层处理
@@ -66,6 +65,9 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
     @Autowired
     private ICfgCommonService cfgCommonService;
 
+    @Autowired
+    private AppUserCountTask appUserCountTask;
+
     /**
      * 查询消费记录
      *
@@ -235,6 +237,8 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         //清除用户缓存
         redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(appUser.getUserid())));
         redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(toAppUser.getUserid())));
+        //更新用户可提现余额
+        appUserCountTask.updateWithdrawAble(appUser.getUserid());
         return HttpRet.success("转账成功",true);
     }
 
@@ -337,4 +341,32 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         }
         return finTranRecordMapper.selectTranList(finTranDto);
     }
+
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public List<FinTranRecord> selectUserTran(Integer type1, String type3s, Long userId, Date beginDate, Date endDate,Integer withDrawFlag) {
+        LambdaQueryWrapper<FinTranRecord> queryWrapper = new LambdaQueryWrapper<>();
+        if(null != userId){
+            queryWrapper.eq(FinTranRecord::getUid,userId);
+        }
+        if(null != withDrawFlag) {
+            queryWrapper.eq(FinTranRecord::getWithdrawFlag, withDrawFlag);//满足提现的充值
+        }
+        if(null != beginDate){
+            queryWrapper.ge(FinTranRecord::getCreateTime,beginDate);
+        }
+        if(null != endDate){
+            queryWrapper.le(FinTranRecord::getCreateTime,endDate);
+        }
+        if(null != type1){
+            queryWrapper.eq(FinTranRecord::getTranType1,type1);
+        }
+        if(StringUtils.isNotBlank(type3s)){
+            String[] typeArr = type3s.split(",");
+            queryWrapper.in(FinTranRecord::getTranType3, Arrays.asList(typeArr));
+        }
+        queryWrapper.orderByAsc(FinTranRecord::getCreateTime);
+        queryWrapper.eq(FinTranRecord::getCurrencyType,4);//余额流水
+        return finTranRecordMapper.selectList(queryWrapper);
+    }
 }

+ 6 - 0
game-business/src/main/java/com/game/business/task/AppAgentGameBettingTask.java

@@ -45,6 +45,9 @@ public class AppAgentGameBettingTask {
     @Autowired
     private IAppUserCountService appUserCountService;
 
+    @Autowired
+    private AppUserCountTask appUserCountTask;
+
     @Async("asyncExecutor")
     public void agentGameBettingTask(AppGameBetting appGameBetting) throws Exception {
 
@@ -82,6 +85,9 @@ public class AppAgentGameBettingTask {
         //统计游戏下注、返佣情况
         appUserCountService.staticsUserBetting(appGameBetting,recordCountList);
 
+        //更新用户充值是否满足流水
+        appUserCountTask.calculationWithdraw(appGameBetting.getUserId());
+
     }
 
     private void getGameRate(Long gameId, Long pid, Long userId, List<AppGameCommission> gameRateList){

+ 7 - 0
game-business/src/main/java/com/game/business/task/AppGameBettingTask.java

@@ -53,6 +53,9 @@ public class AppGameBettingTask {
     @Autowired
     private IAppUserCountService appUserCountService;
 
+    @Autowired
+    private AppUserCountTask appUserCountTask;
+
     public void gameDataTask(String message, String gameCodeFinal) throws Exception {
 
         JSONArray dataArry = JSONArray.parseArray(message);
@@ -265,6 +268,10 @@ public class AppGameBettingTask {
         // 给中奖人发送刷新余额通知
         sendMsg(userIds);
 
+        //更新可提现余额
+        for(String userId : userIds) {
+            appUserCountTask.updateWithdrawAble(Long.parseLong(userId));
+        }
     }
 
     public void updateItme(Long gameId, String gameLotterySucc){

+ 104 - 0
game-business/src/main/java/com/game/business/task/AppUserCountTask.java

@@ -518,4 +518,108 @@ public class AppUserCountTask {
         return money<0?money*-1:money;
     }
 
+
+    /**
+     * 更新用户充值后是否满足流水
+     *
+     * */
+    @DSTransactional
+    public void calculationWithdraw(Long userId){
+        //查询所有未满足提现的充值、转账
+        String chargeType3 = FinTranType3.ON_LINE_CHARGE.getType() + "," + FinTranType3.CHARGE_IN.getType()+ "," + FinTranType3.CHARGE_IN_Back.getType()
+                            + "," + FinTranType3.TRANSFER_TO_TEAM_DiamondCoin.getType();
+        List<FinTranRecord> chargeList = finTranRecordService.selectUserTran(FinTranType1.U_Income_Coin_Balance.getType(),chargeType3,userId,null,null,0);
+        if(null != chargeList && chargeList.size() > 0) {
+            Map<Long, List<FinTranRecord>> chargeMap = chargeList.stream().collect(Collectors.groupingBy(FinTranRecord::getUid));
+            for(Long uid:chargeMap.keySet()){
+                List<FinTranRecord> userChargeList = chargeMap.get(uid);
+                //按时间排序
+                userChargeList.stream().sorted(Comparator.comparing(FinTranRecord::getCreateTime)).collect(Collectors.toList());
+                Date beginDate= null;
+                Double money = 0.00;//需要满足的投注流水
+                Date endDate = new Date();
+                int i = 1;
+                List<FinTranRecord> dealTranList = new ArrayList<>();
+                for (FinTranRecord tranRecord : userChargeList) {
+                    dealTranList.add(tranRecord);
+                    if (null == beginDate){
+                        beginDate = tranRecord.getCreateTime();
+                    }
+                    if(userChargeList.size() > i){
+                        endDate = new Date(userChargeList.get(i).getCreateTime().getTime() - 1);
+                    }
+                    money += tranRecord.getDiamondCoinChange();
+                    //查询赠送金额
+                    AppUsersCharge appUsersCharge = appUsersChargeService.selectByOrderNo(String.valueOf(tranRecord.getTranGroupId()));
+                    if(null != appUsersCharge && null != appUsersCharge.getCoinGive()){
+                        money += appUsersCharge.getCoinGive().doubleValue();
+                    }
+                    dealTran(dealTranList,beginDate,endDate,uid,money);
+                    i++;
+                }
+
+
+            }
+        }
+    }
+
+    private void dealTran(List<FinTranRecord> userChargeList,Date beginDate,Date endDate,Long userId,Double money){
+        //查询用户这段时间流水记录
+        List<FinTranRecord> curTranList = finTranRecordService.selectUserTran(null,String.valueOf(FinTranType3.CONSUM_GAME_ANCHOR_ZHUANPAN.getType()),userId,beginDate,endDate,0);
+        if(null != curTranList && curTranList.size() > 0){
+            //筛选投注流水
+            double bettingAmount = curTranList.stream().filter(e->
+                    e.getTranType3().equals(FinTranType3.CONSUM_GAME_ANCHOR_ZHUANPAN.getType())
+                            &&
+                            e.getCurrencyType().intValue() == 4
+            ).mapToDouble(FinTranRecord::getDiamondCoinChange).sum() * -1;
+            if(bettingAmount >= money * 2){
+                //更新为已满足提现
+                userChargeList.forEach(e->{
+                    FinTranRecord updateTran = new FinTranRecord();
+                    updateTran.setId(e.getId());
+                    updateTran.setWithdrawFlag(1);
+                    finTranRecordService.updateFinTranRecord(updateTran);
+                });
+                //更新可提现余额
+                updateWithdrawAble(userId);
+            }
+        }
+    }
+
+    /**
+     * 更新用户可提现余额
+     * */
+    @DSTransactional
+    public void updateWithdrawAble(Long userId){
+        //查询所有未满足提现的充值、转账
+        String chargeType3 = FinTranType3.ON_LINE_CHARGE.getType() + "," + FinTranType3.CHARGE_IN.getType()+ "," + FinTranType3.CHARGE_IN_Back.getType()
+                + "," + FinTranType3.TRANSFER_TO_TEAM_DiamondCoin.getType();
+        List<FinTranRecord> chargeList = finTranRecordService.selectUserTran(FinTranType1.U_Income_Coin_Balance.getType(),chargeType3,userId,null,null,1);
+        if(null != chargeList && chargeList.size() > 0){
+            Map<Long, List<FinTranRecord>> chargeMap = chargeList.stream().collect(Collectors.groupingBy(FinTranRecord::getUid));
+            for(Long uid : chargeMap.keySet()) {
+                int i = 1;
+                double withdrawAble = 0;
+                List<FinTranRecord> tranRecordList = chargeMap.get(uid);
+                for (FinTranRecord finTranRecord : tranRecordList) {
+                    Date beginDate = finTranRecord.getCreateTime();
+                    Date endDate = new Date();
+                    if (chargeList.size() > i) {
+                        endDate = new Date(chargeList.get(i).getCreateTime().getTime() - 1);
+                    }
+                    //查询用户这段时间流水记录
+                    List<FinTranRecord> curTranList = finTranRecordService.selectUserTran(null, null, uid, beginDate, endDate, null);
+                    withdrawAble += curTranList.stream().mapToDouble(FinTranRecord::getDiamondCoinChange).sum();
+
+                }
+                AppUser updateUser = new AppUser();
+                updateUser.setUserid(uid);
+                updateUser.setWithdrawAble(withdrawAble);
+                appUserService.updateAppUser(updateUser);
+                //清除用户缓存
+                redisCache.deleteObject("U:UserInfo:".concat(String.valueOf(uid)));
+            }
+        }
+    }
 }

+ 50 - 50
game-business/src/main/java/com/game/business/websocket/WebSocketConnent.java

@@ -28,55 +28,55 @@ public class WebSocketConnent {
     }
 
     public void connect() throws Exception{
-//        while (true){
-//            try {
-//                System.out.println("正在" + (this.WS_CONNENT_NUM == 0 ? "" : ("第" + this.WS_CONNENT_NUM + "次")) + "连接WebSocket[" + this.WS_URL_NAME + "]......");
-//
-//                if(StringUtils.isBlank(WS_NOW_URL)){
-//                    WS_NOW_URL = WS_URL;
-//                }else{
-//                    if(WS_NOW_URL.equals(WS_URL)){
-//                        WS_NOW_URL = WS_REMARK_URL;
-//                    }else{
-//                        WS_NOW_URL = WS_URL;
-//                    }
-//                }
-//
-//                if(Common.GANME_ONE_NAME.equals(this.WS_URL_NAME)){
-//                    GameOneClient client = SpringContextSetting.getBean(GameOneClient.class);
-//                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
-//                }
-//
-//                if(Common.GANME_TWO_NAME.equals(this.WS_URL_NAME)){
-//                    GameTwoClient client = SpringContextSetting.getBean(GameTwoClient.class);
-//                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
-//                }
-//
-//                if(Common.GAME_THREES_NAME.equals(this.WS_URL_NAME)){
-//                    GameThreesClient client = SpringContextSetting.getBean(GameThreesClient.class);
-//                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
-//                }
-//
-//                if(Common.GAME_FOUR_NAME.equals(this.WS_URL_NAME)){
-//                    GameFourClient client = SpringContextSetting.getBean(GameFourClient.class);
-//                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
-//                }
-//
-//                if(Common.GAME_FIVE_NAME.equals(this.WS_URL_NAME)){
-//                    GameFiveClient client = SpringContextSetting.getBean(GameFiveClient.class);
-//                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
-//                }
-//
-//                System.out.println(this.WS_URL_NAME + " 已成功连接Websocket[" + this.WS_NOW_URL + "]");
-//                this.WS_CONNENT_NUM = 0;
-//                break;
-//            }catch (Exception e){
-//                if(this.WS_CONNENT_MAX_NUM > this.WS_CONNENT_NUM){
-//                    this.WS_CONNENT_NUM ++;
-//                }
-//                System.out.println("连接[" + this.WS_URL_NAME + "]异常," + this.WS_CONNENT_NUM + "秒后尝试重新连接:" + e.getMessage());
-//                Thread.sleep(this.WS_CONNENT_NUM * 1000);
-//            }
-//        }
+        /*while (true){
+            try {
+                System.out.println("正在" + (this.WS_CONNENT_NUM == 0 ? "" : ("第" + this.WS_CONNENT_NUM + "次")) + "连接WebSocket[" + this.WS_URL_NAME + "]......");
+
+                if(StringUtils.isBlank(WS_NOW_URL)){
+                    WS_NOW_URL = WS_URL;
+                }else{
+                    if(WS_NOW_URL.equals(WS_URL)){
+                        WS_NOW_URL = WS_REMARK_URL;
+                    }else{
+                        WS_NOW_URL = WS_URL;
+                    }
+                }
+
+                if(Common.GANME_ONE_NAME.equals(this.WS_URL_NAME)){
+                    GameOneClient client = SpringContextSetting.getBean(GameOneClient.class);
+                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
+                }
+
+                if(Common.GANME_TWO_NAME.equals(this.WS_URL_NAME)){
+                    GameTwoClient client = SpringContextSetting.getBean(GameTwoClient.class);
+                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
+                }
+
+                if(Common.GAME_THREES_NAME.equals(this.WS_URL_NAME)){
+                    GameThreesClient client = SpringContextSetting.getBean(GameThreesClient.class);
+                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
+                }
+
+                if(Common.GAME_FOUR_NAME.equals(this.WS_URL_NAME)){
+                    GameFourClient client = SpringContextSetting.getBean(GameFourClient.class);
+                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
+                }
+
+                if(Common.GAME_FIVE_NAME.equals(this.WS_URL_NAME)){
+                    GameFiveClient client = SpringContextSetting.getBean(GameFiveClient.class);
+                    ContainerProvider.getWebSocketContainer().connectToServer(client, new URI(this.WS_NOW_URL));
+                }
+
+                System.out.println(this.WS_URL_NAME + " 已成功连接Websocket[" + this.WS_NOW_URL + "]");
+                this.WS_CONNENT_NUM = 0;
+                break;
+            }catch (Exception e){
+                if(this.WS_CONNENT_MAX_NUM > this.WS_CONNENT_NUM){
+                    this.WS_CONNENT_NUM ++;
+                }
+                System.out.println("连接[" + this.WS_URL_NAME + "]异常," + this.WS_CONNENT_NUM + "秒后尝试重新连接:" + e.getMessage());
+                Thread.sleep(this.WS_CONNENT_NUM * 1000);
+            }
+        }*/
     }
 }

File diff suppressed because it is too large
+ 2 - 0
game-business/src/main/resources/mapper/business/AppUserMapper.xml


+ 6 - 1
game-business/src/main/resources/mapper/business/FinTranRecordMapper.xml

@@ -39,10 +39,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="tranType2"    column="tran_type2"    />
         <result property="tranType3"    column="tran_type3"    />
         <result property="uid"    column="uid"    />
+        <result property="withdrawFlag"    column="withdraw_flag"    />
     </resultMap>
 
     <sql id="selectFinTranRecordVo">
-        select id, after_coin, after_money, after_ticket, after_diamond_coin, agent_id, coin_change, diamond_coin_change, commission_related_uid, consumption_coin, consumption_money, create_time, currency_type, from_uid, goods_id, guild_id, manager_co_id, manager_id, money_change, order_id, perc, pro_count, pro_id, remarks, scene_id1, scene_id2, scene_type, ticket_change, to_uid, tran_group_id, tran_type1, tran_type2, tran_type3, uid from fin_tran_record
+        select id, after_coin, after_money, after_ticket, after_diamond_coin, agent_id, coin_change, diamond_coin_change, commission_related_uid, consumption_coin, consumption_money, create_time, currency_type, from_uid, goods_id, guild_id, manager_co_id, manager_id, money_change, order_id, perc, pro_count, pro_id, remarks, scene_id1, scene_id2, scene_type, ticket_change, to_uid, tran_group_id, tran_type1, tran_type2, tran_type3, uid,withdraw_flag from fin_tran_record
     </sql>
 
     <select id="selectFinTranRecordList" parameterType="com.game.business.domain.FinTranRecord" resultMap="FinTranRecordResult">
@@ -80,6 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tranType2 != null "> and tran_type2 = #{tranType2}</if>
             <if test="tranType3 != null "> and tran_type3 = #{tranType3}</if>
             <if test="uid != null "> and uid = #{uid}</if>
+            <if test="withdrawFlag != null "> and withdraw_flag = #{withdrawFlag}</if>
         </where>
     </select>
     
@@ -125,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tranType2 != null">tran_type2,</if>
             <if test="tranType3 != null">tran_type3,</if>
             <if test="uid != null">uid,</if>
+            <if test="withdrawFlag != null">withdraw_flag,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -161,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tranType2 != null">#{tranType2},</if>
             <if test="tranType3 != null">#{tranType3},</if>
             <if test="uid != null">#{uid},</if>
+            <if test="withdrawFlag != null">#{withdrawFlag},</if>
          </trim>
     </insert>
 
@@ -200,6 +204,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tranType2 != null">tran_type2 = #{tranType2},</if>
             <if test="tranType3 != null">tran_type3 = #{tranType3},</if>
             <if test="uid != null">uid = #{uid},</if>
+            <if test="withdrawFlag != null">withdraw_flag = #{withdrawFlag},</if>
         </trim>
         where id = #{id}
     </update>

Some files were not shown because too many files changed in this diff