dos il y a 2 mois
Parent
commit
fe0002e95c

+ 0 - 1
game-admin/src/main/java/com/game/web/core/config/SwaggerConfig.java

@@ -114,7 +114,6 @@ public class SwaggerConfig
         return new ApiInfoBuilder()
                 // 设置标题
                 .title("标题:若依管理系统_接口文档")
-                .title("标题:客服管理系统_接口文档")
                 // 描述
                 .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
                 // 作者信息

+ 3 - 0
game-business/src/main/java/com/game/business/controller/FinTranRecordController.java

@@ -92,6 +92,9 @@ public class FinTranRecordController extends BaseController
         Map<String, BigDecimal> userCount = appUserService.getUserCount(finTranRecord.getUserId());
         jsonObject.put("userCount", userCount);
 
+        //金币兑换余额
+        Map<String,Double> exchange = finTranRecordService.selectExChangeSum(finTranRecord);
+        jsonObject.put("exchange", exchange);
         return R.ok(jsonObject);
     }
 

+ 4 - 0
game-business/src/main/java/com/game/business/mapper/FinTranRecordMapper.java

@@ -77,9 +77,13 @@ public interface FinTranRecordMapper extends BaseMapper<FinTranRecord> {
 
     List<Map<String, Object>> getWithdrawByDateSum(FinTranRecordDTO finTranRecordDTO);
 
+    List<Map<String, Object>> getCoinTypeByDateSum(FinTranRecordDTO finTranRecordDTO);
+
     List<Map<String, Object>> getRechargeByDateSum(FinTranRecordDTO finTranRecordDTO);
 
     List<FinTranVo> selectTranList(FinTranDto finTranDto);
 
     Double sumUserTran(@Param("type1") Integer type1, @Param("type3s") String type3s, @Param("userId") Long userId, @Param("beginDate") Date beginDate, @Param("endDate") Date endDate, @Param("withdrawFlag") Integer withDrawFlag);
+
+    Map<String,Double> selectExChangeSum(FinTranRecordDTO recordDTO);
 }

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

@@ -2,6 +2,7 @@ package com.game.business.service;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 import com.alibaba.fastjson2.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -108,4 +109,6 @@ public interface IFinTranRecordService extends IService<FinTranRecord> {
     List<FinTranRecord> selectUserTran(Integer type1, String type3s, Long userId, Date beginDate,Date endDate,Integer withDrawFlag);
 
     Double sumUserTran(Integer type1, String type3s, Long userId, Date beginDate,Date endDate,Integer withDrawFlag);
+
+    Map<String,Double> selectExChangeSum(FinTranRecordDTO recordDTO);
 }

+ 9 - 0
game-business/src/main/java/com/game/business/service/impl/FinTranRecordServiceImpl.java

@@ -366,6 +366,9 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
         }
         jsonObject.put("withdrawByDateSum", withdrawByDateSum);
 
+        //金币分类统计
+        List<Map<String, Object>> coinTypeSum =  finTranRecordMapper.getCoinTypeByDateSum(finTranRecordDTO);
+        jsonObject.put("coinTypeSum", withdrawByDateSum);
         return jsonObject;
     }
 
@@ -435,4 +438,10 @@ public class FinTranRecordServiceImpl extends ServiceImpl<FinTranRecordMapper, F
     public Double sumUserTran(Integer type1, String type3s, Long userId, Date beginDate, Date endDate, Integer withDrawFlag) {
         return finTranRecordMapper.sumUserTran(type1,type3s,userId,beginDate,endDate,withDrawFlag);
     }
+
+    @Override
+    @DataSource(DataSourceType.SLAVE)
+    public Map<String, Double> selectExChangeSum(FinTranRecordDTO recordDTO) {
+        return finTranRecordMapper.selectExChangeSum(recordDTO);
+    }
 }

+ 31 - 0
game-business/src/main/resources/mapper/business/FinTranRecordMapper.xml

@@ -282,6 +282,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         group by type
     </select>
 
+    <select id="getCoinTypeByDateSum" resultType="java.util.Map"  parameterType="com.game.business.dto.FinTranRecordDTO">
+        select tran_type3 as type,ifnull(sum(coin_change),0) as coin from fin_tran_record where currency_type = 2
+
+        <if test="userId != null">
+            and uid = #{userId}
+        </if>
+        <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
+            and (date_format(create_time, '%Y-%m-%d') &gt;= #{beginTime} and date_format(create_time, '%Y-%m-%d') &lt;= #{endTime})
+        </if>
+        group by tran_type3
+    </select>
+
     <select id="getRechargeByDateSum" resultType="java.util.Map" parameterType="com.game.business.dto.FinTranRecordDTO">
         select
 
@@ -385,4 +397,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
 
+    <select id="selectExChangeSum" parameterType="com.game.business.dto.FinTranRecordDTO" resultType="java.util.Map">
+        SELECT
+            ifnull( sum( CASE WHEN tran_type1 = '12' THEN coin_change ELSE 0 END ), 0 ) AS coin,
+            ifnull( sum( CASE WHEN tran_type1 = '17' THEN diamond_coin_change ELSE 0 END ), 0 ) AS diamondCoin
+        FROM
+            fin_tran_record
+        WHERE
+            tran_type3 = '1304'
+            <if test="beginTime != null and beginTime != ''">
+                AND  create_time &gt;= concat(#{beginTime},' 00:00:00')
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND  create_time &lt;= concat(#{endTime},' 23:59:59')
+            </if>
+            <if test="userId != null">
+                AND  uid = #{userId}
+            </if>
+    </select>
+
 </mapper>

+ 1 - 1
game-common/src/main/java/com/game/common/constant/finance/FinTranType3.java

@@ -99,7 +99,7 @@ public enum FinTranType3 {
      */
     DiamondCoin_TO_COIN(FinTranType2.EXCHANGE_COIN, 1303, ProjConfig.getD_ticketName() + MessageUtils.message("11214") + ProjConfig.getCoinName(),0),
     /**
-     * 兑换 - 余额兑换金币
+     * 兑换 - 金币兑换余额
      */
     COIN_TO_DiamondCoin(FinTranType2.EXCHANGE_COIN, 1304, ProjConfig.getCoinName() + MessageUtils.message("11214") + ProjConfig.getD_ticketName(),0),
 

+ 352 - 88
game-ui/src/views/index.vue

@@ -78,93 +78,224 @@
       </span>
     </div>
     <div style="padding-top: 1rem">
-      <el-row>
-        <el-col :span="25" class="card-box">
-          <el-card>
-            <div slot="header"><span></span></div>
-            <div class="el-table el-table--enable-row-hover el-table--medium">
-              <table cellspacing="0" style="width: 70rem;border-bottom: 1px solid black">
-                <thead>
-                <tr>
-                  <th class="el-table__cell is-leaf"><div class="cell"></div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">线上充值总额</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">人工充值</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">充值总额</div></th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr>
-                  <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">充值总额</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">支付宝:{{getVal(getCharge('8085'),0)}}</div></td>
-                  <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">充值:{{getVal(getCharge('4'),1)}}</div></td>
-                  <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">总额:{{getTotal()}}</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell" >微信:{{getVal(getCharge('8086'),0)}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell" >OKPAY:{{getVal(getCharge('8084'),0)}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell" >cbpay:{{getVal(getCharge('8088'),0)}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell" >银行卡:{{getVal(getCharge('8087'),0)}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell" >其他:{{getVal(getCharge('-1'),0)}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf" rowspan="5"><div class="cell">提现总额</div></td>
-                  <td class="el-table__cell is-leaf" colspan="2"><div class="cell">支付宝:{{getCash("1")}}</div></td>
-                  <td class="el-table__cell is-leaf" rowspan="5"><div class="cell">总额:{{getCash(null)}}</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >微信:{{getCash("2")}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >银行卡:{{getCash("3")}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >银行卡</div></td>-->
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >OKPAY:{{getCash("4")}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >银行卡</div></td>-->
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >cbpay:{{getCash("5")}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" >银行卡</div></td>-->
-                </tr>
-                </tbody>
-              </table>
-
-              <table cellspacing="0" style="width: 70rem;border-bottom: 1px solid black">
-                <thead>
-                <tr>
-<!--                  <th class="el-table__cell is-leaf" rowspan="2"><div class="cell">游戏投注</div></th>-->
-                  <th class="el-table__cell is-leaf"><div class="cell">金币投注</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">余额投注</div></th>
-<!--                  <th class="el-table__cell is-leaf"><div class="cell"></div></th>-->
-                </tr>
-                </thead>
-                <tbody>
-                <tr>
-<!--                  <td class="el-table__cell is-leaf" rowspan="2"><div class="cell">游戏投注</div></td>-->
-                  <td class="el-table__cell is-leaf"><div class="cell">{{ undefined!=dataMap["bettingAmountDateSum"]?dataMap["bettingAmountDateSum"]["coinSum"]:0.00 }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">{{undefined!=dataMap["bettingAmountDateSum"]?dataMap["bettingAmountDateSum"]["diamondCoinSum"]:0.00}}</div></td>
-<!--                  <td class="el-table__cell is-leaf"><div class="cell" ></div></td>-->
-                </tr>
-                </tbody>
-              </table>
-            </div>
-          </el-card>
-        </el-col>
-      </el-row>
+      <el-tabs v-model="activeName">
+        <el-tab-pane label="余额统计" name="first">
+          <el-row>
+            <el-col :span="25" class="card-box">
+              <el-card>
+                <div slot="header"><span></span></div>
+                <div class="el-table el-table--enable-row-hover el-table--medium">
+                  <table cellspacing="0" style="width: 70rem;border-bottom: 1px solid black">
+                    <thead>
+                    <tr>
+                      <th class="el-table__cell is-leaf"><div class="cell"></div></th>
+                      <th class="el-table__cell is-leaf"><div class="cell">线上充值总额</div></th>
+                      <th class="el-table__cell is-leaf"><div class="cell">人工充值</div></th>
+                      <th class="el-table__cell is-leaf"><div class="cell">充值总额</div></th>
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr>
+                      <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">充值总额</div></td>
+                      <td class="el-table__cell is-leaf"><div class="cell">支付宝:{{getVal(getCharge('8085'),0)}}</div></td>
+                      <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">充值:{{getVal(getCharge('4'),1)}}</div></td>
+                      <td class="el-table__cell is-leaf" rowspan="6"><div class="cell">总额:{{getTotal()}}</div></td>
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf"><div class="cell" >微信:{{getVal(getCharge('8086'),0)}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf"><div class="cell" >OKPAY:{{getVal(getCharge('8084'),0)}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf"><div class="cell" >cbpay:{{getVal(getCharge('8088'),0)}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf"><div class="cell" >银行卡:{{getVal(getCharge('8087'),0)}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf"><div class="cell" >其他:{{getVal(getCharge('-1'),0)}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf" rowspan="5"><div class="cell">提现总额</div></td>
+                      <td class="el-table__cell is-leaf" colspan="2"><div class="cell">支付宝:{{getCash("1")}}</div></td>
+                      <td class="el-table__cell is-leaf" rowspan="5"><div class="cell">总额:{{getCash(null)}}</div></td>
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >微信:{{getCash("2")}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >银行卡:{{getCash("3")}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >银行卡</div></td>-->
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >OKPAY:{{getCash("4")}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >银行卡</div></td>-->
+                    </tr>
+                    <tr>
+                      <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >cbpay:{{getCash("5")}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" >银行卡</div></td>-->
+                    </tr>
+                    </tbody>
+                  </table>
+                  <h3>下注</h3>
+                  <table cellspacing="0" style="width: 70rem;border-bottom: 1px solid black">
+                    <thead>
+                    <tr>
+    <!--                  <th class="el-table__cell is-leaf" rowspan="2"><div class="cell">游戏投注</div></th>-->
+                      <th class="el-table__cell is-leaf"><div class="cell">金币投注</div></th>
+                      <th class="el-table__cell is-leaf"><div class="cell">余额投注</div></th>
+    <!--                  <th class="el-table__cell is-leaf"><div class="cell"></div></th>-->
+                    </tr>
+                    </thead>
+                    <tbody>
+                    <tr>
+    <!--                  <td class="el-table__cell is-leaf" rowspan="2"><div class="cell">游戏投注</div></td>-->
+                      <td class="el-table__cell is-leaf"><div class="cell">{{ undefined!=dataMap["bettingAmountDateSum"]?dataMap["bettingAmountDateSum"]["coinSum"]:0.00 }}</div></td>
+                      <td class="el-table__cell is-leaf"><div class="cell">{{undefined!=dataMap["bettingAmountDateSum"]?dataMap["bettingAmountDateSum"]["diamondCoinSum"]:0.00}}</div></td>
+    <!--                  <td class="el-table__cell is-leaf"><div class="cell" ></div></td>-->
+                    </tr>
+                    </tbody>
+                  </table>
+                </div>
+              </el-card>
+            </el-col>
+          </el-row>
+        </el-tab-pane>
+        <el-tab-pane label="金币统计" name="second">
+          <div slot="header"><span></span></div>
+          <div class="el-table el-table--enable-row-hover el-table--medium">
+            <table cellspacing="0" style="width: 70rem;border-bottom: 1px solid black">
+              <tbody>
+              <tr>
+                <td class="el-table__cell is-leaf" rowspan="10"><div class="cell">收入</div></td>
+                <td class="el-table__cell is-leaf" rowspan="10"><div class="cell">总额:{{getCoinTotal()}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >连续登录:{{getCoinVal(getCoin("1205",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >签到:{{getCoinVal(getCoin("1206",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >转账:{{getCoinVal(getCoin("1602",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >余额兑换金币:{{getCoinVal(getCoin("1303",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >游戏奖励:{{getCoinVal(getCoin("1103",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >直播收益:{{getCoinVal(getCoin("5005",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >收红包:{{getCoinVal(getCoin("20102",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >邀请奖励:{{getCoinVal(getCoin("1208",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+<!--              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >游戏中奖:{{getVal(getCharge('-1'),0)}}</div></td>
+                &lt;!&ndash;                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>&ndash;&gt;
+              </tr>-->
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell" >开通贵族赠送金币:{{getCoinVal(getCoin("1203",0))}}</div></td>
+                <!--                  <td class="el-table__cell is-leaf"><div class="cell" >微信</div></td>-->
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" rowspan="19"><div class="cell">支出</div></td>
+                <td class="el-table__cell is-leaf" rowspan="19"><div class="cell">总额:{{getExCoinTotal()}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >后台扣除:{{getCoinVal(getCoin("1108",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >转账:{{getCoinVal(getCoin("1602",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >开通贵族:{{getCoinVal(getCoin("2701",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >购买坐骑:{{getCoinVal(getCoin("2901",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >购买门票:{{getCoinVal(getCoin("1203",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >金币兑换余额:{{getCoinVal(getCoin("1203",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >游戏下注:{{getCoinVal(getCoin("20001",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >直播间打赏礼物:{{getCoinVal(getCoin("2001",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >短视频打赏礼物:{{getCoinVal(getCoin("2002",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >聊天打赏:{{getCoinVal(getCoin("2003",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >个人主页打赏:{{getCoinVal(getCoin("2005",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >发红包:{{getCoinVal(getCoin("20101",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >宝箱抽奖:{{getCoinVal(getCoin("1203",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >开通守护:{{getCoinVal(getCoin("2401",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >开通粉丝团:{{getCoinVal(getCoin("2501",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >付费弹幕:{{getCoinVal(getCoin("2601",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >兑换实物:{{getCoinVal(getCoin("1305",1))}}</div></td>
+              </tr>
+              <tr>
+                <td class="el-table__cell is-leaf" colspan="2"><div class="cell" >购买贵族席:{{getCoinVal(getCoin("20702",1))}}</div></td>
+              </tr>
+              </tbody>
+            </table>
+            <h3>金币兑换余额</h3>
+            <table cellspacing="0" style="width: 70rem;border-bottom: 1px solid black">
+              <thead>
+              <tr>
+                <!--                  <th class="el-table__cell is-leaf" rowspan="2"><div class="cell">游戏投注</div></th>-->
+                <th class="el-table__cell is-leaf"><div class="cell">消耗金币</div></th>
+                <th class="el-table__cell is-leaf"><div class="cell">获得余额</div></th>
+              </tr>
+              </thead>
+              <tbody>
+              <tr>
+                <td class="el-table__cell is-leaf"><div class="cell">{{ undefined!=dataMap["exchange"]?dataMap["exchange"]["coin"]:0.00 }}</div></td>
+                <td class="el-table__cell is-leaf"><div class="cell">{{undefined!=dataMap["exchange"]?dataMap["exchange"]["diamondCoin"]:0.00}}</div></td>
+              </tr>
+              </tbody>
+            </table>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
     </div>
   </div>
 </template>
@@ -181,7 +312,8 @@ export default {
       queryParams:{},
       daterange:[],
       daterange2:[],
-      dataMap:{}
+      dataMap:{},
+      activeName:"first"
     };
   },
   created() {
@@ -287,6 +419,24 @@ export default {
       }
       return res;
     },
+    getCoin(type,sumType){
+      let dataMap = this.dataMap;
+      let res = null;
+      for(var i in dataMap["coinTypeSum"]){
+        var item = dataMap["coinTypeSum"][i];
+        if(item["type"] == type){
+          if(sumType == 0 && item["coin"] != undefined && item["coin"]*1 > 0){
+            res = item;
+            break;
+          }else if(sumType == 1 && item["coin"] != undefined && item["coin"]*1 <= 0){
+            res = item;
+            break;
+          }
+
+        }
+      }
+      return res;
+    },
     getOtherCharge(types){
       let arr = types.split(",");
       let dataMap = this.dataMap;
@@ -383,6 +533,114 @@ export default {
 
       return total + " (包含手续费:"+totalService+")"
 
+    },
+    getCoinTotal(){
+      let coin = 0;
+      //游戏奖励
+      let game = this.getCoin("1103",0);
+      if(undefined != game && null != game){
+        coin += this.getCoinVal(game);
+      }
+      //后台充值
+      let recharge = this.getCoin("1108",0);
+      if(undefined != recharge && null != recharge){
+        coin += this.getCoinVal(recharge);
+      }
+      //购买贵族赠送金币
+      let buySend = this.getCoin("1203",0);
+      if(undefined != buySend && null != buySend){
+        coin += this.getCoinVal(buySend);
+      }
+      //连续登录
+      let login = this.getCoin("1205",0);
+      if(undefined != login && null != login){
+        coin += this.getCoinVal(login);
+      }
+      //签到奖励
+      let reward = this.getCoin("1206",0);
+      if(undefined != reward && null != reward){
+        coin += this.getCoinVal(reward);
+      }
+      //邀请奖励
+      let invite = this.getCoin("1208",0);
+      if(undefined != invite && null != invite){
+        coin += this.getCoinVal(invite);
+      }
+      //余额兑换金币
+      let exchange = this.getCoin("1303",0);
+      if(undefined != exchange && null != exchange){
+        coin += this.getCoinVal(exchange);
+      }
+      //金币转账
+      let turn = this.getCoin("1602",0);
+      if(undefined != turn && null != turn){
+        coin += this.getCoinVal(turn);
+      }
+      //直播间赠送礼物
+      // let giveGift = this.getCoin("2001",0);
+      //直播收益
+      let live = this.getCoin("5005",0);
+      if(undefined != live && null != live){
+        coin += this.getCoinVal(live);
+      }
+      //领红包
+      let red = this.getCoin("20102",0);
+      if(undefined != red && null != red){
+        coin += this.getCoinVal(red);
+      }
+      //红包退回20103
+
+      return coin;
+    },
+    getExCoinTotal(){
+      let coin = 0;
+      //后台充值(扣减)
+      let recharge = this.getCoin("1108",1);
+      coin += this.getCoinVal(recharge);
+      //金币兑换商品
+      let exchange = this.getCoin("1305",1);
+      coin += this.getCoinVal(exchange);
+      //金币转账
+      let turn = this.getCoin("1602",1);
+      coin += this.getCoinVal(turn);
+      //直播礼物打赏
+      let give = this.getCoin("2001",1);
+      coin += this.getCoinVal(give);
+      //短视频打赏
+      let short = this.getCoin("2002",1);
+      coin += this.getCoinVal(short);
+      //聊天打赏
+      let chat = this.getCoin("2003",1);
+      coin += this.getCoinVal(chat);
+      //个人主页打赏
+      let people = this.getCoin("2005",1);
+      coin += this.getCoinVal(people);
+      //开通守护
+      let sh = this.getCoin("2401",1);
+      coin += this.getCoinVal(sh);
+      //粉丝团
+      let team = this.getCoin("2501",1);
+      coin += this.getCoinVal(team);
+      //付费弹幕
+      let ffdm = this.getCoin("2601",1);
+      coin += this.getCoinVal(ffdm);
+      //购买贵族
+      let gz = this.getCoin("2701",1);
+      coin += this.getCoinVal(gz);
+      //购买坐骑
+      let zq = this.getCoin("2901",1);
+      coin += this.getCoinVal(zq);
+      //游戏下注
+      let game = this.getCoin("20001",1);
+      coin += this.getCoinVal(game);
+      //发红包
+      let red = this.getCoin("20101",1);
+      coin += this.getCoinVal(red);
+      //购买贵族席
+      let gzx = this.getCoin("20702",1);
+      coin += this.getCoinVal(gzx);
+      return coin;
+
     },
     getCash(type){
       let amount = 0;
@@ -400,6 +658,12 @@ export default {
         }
       }
       return amount + " (包含手续费"+serviceAmount+")";
+    },
+    getCoinVal(item){
+      if(undefined == item || null == item){
+        return 0;
+      }
+      return parseInt(item["coin"]);
     }
   }
 };