Browse Source

优化下注记录

dos 1 tháng trước cách đây
mục cha
commit
09ba61a033

+ 2 - 2
game-business/src/main/java/com/game/business/controller/AppAgentController.java

@@ -387,9 +387,9 @@ public class AppAgentController extends BaseController {
                 DateUtil.format(endDate,"yyyy-MM-dd").concat(" 23:59:59"),
                 null,null,null,null);
         //用户总投注流水
-        appUserDetailVo.setTotalBetting(appGameBettingService.sumBettingAmount(userId,0));
+        appUserDetailVo.setTotalBetting(appGameBettingService.sumBettingAmount(userId,0,null,null));
         //用户金币总投注流水
-        appUserDetailVo.setTotalCoinBetting(appGameBettingService.sumBettingAmount(userId,1));
+        appUserDetailVo.setTotalCoinBetting(appGameBettingService.sumBettingAmount(userId,1,null,null));
 
         //当日游戏投注
         appUserDetailVo.setTodayBetting(gameBettingList.stream().filter(e->{

+ 30 - 4
game-business/src/main/java/com/game/business/controller/AppGameBettingController.java

@@ -1,5 +1,6 @@
 package com.game.business.controller;
 
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.IdUtil;
 import com.alibaba.fastjson.JSON;
 import com.baomidou.dynamic.datasource.annotation.DSTransactional;
@@ -641,18 +642,43 @@ public class AppGameBettingController extends BaseController{
         return HttpRetPageArr.success("查询成功",getDataTable(list));
     }
 
+    /**
+     * 游戏投注记录(后台)
+     */
+    @PostMapping(value = "/staticsWeb")
+    @ApiOperation(value = "游戏投注记录统计", notes = "游戏投注记录统计")
+    public R<AppUserGameBettingStaticsVo> staticsWeb(@RequestParam(name = "gameId" , required = false) Long gameId ,
+                                                                      @RequestParam(name = "userId" , required = false) Long userId,
+                                                                      @RequestParam(name = "beginTime" , required = false) String beginTime,
+                                                                      @RequestParam(name = "endTime" , required = false) String endTime
+    )
+    {
+        AppUserGameBettingStaticsVo appUserGameBettingStaticsVo = new AppUserGameBettingStaticsVo();
+        String date = DateUtil.format(DateUtil.date(),"yyyy-MM-dd");
+        appUserGameBettingStaticsVo.setTotalAmount(appGameBettingService.sumBettingAmount(userId,0,null,null));
+        appUserGameBettingStaticsVo.setTotalCoinAmount(appGameBettingService.sumBettingAmount(userId,1,null,null));
+        appUserGameBettingStaticsVo.setToDayAmount(appGameBettingService.sumBettingAmount(userId,0,date.concat(" 00:00:00"),date.concat(" 23:59:59")));
+        appUserGameBettingStaticsVo.setToDayCoinAmount(appGameBettingService.sumBettingAmount(userId,1,date.concat(" 00:00:00"),date.concat(" 23:59:59")));
+        return R.ok(appUserGameBettingStaticsVo);
+    }
+
     /**
      * 游戏投注记录(后台)
      */
     @PostMapping(value = "/listHistoryWeb")
     @ApiOperation(value = "游戏投注记录", notes = "游戏投注记录")
-    public HttpRetPageArr<AppUserGameBettingWebCountVO> listHistoryWeb(@RequestParam(name = "gameId" , required = false) Long gameId ,
+    public TableDataInfo<AppUserGameBettingWebCountVO> listHistoryWeb(@RequestParam(name = "gameId" , required = false) Long gameId ,
                                                                        @RequestParam(name = "userId" , required = false) Long userId ,
-                                                                       @RequestParam(name = "bettingType", required = false) Integer bettingType)
+                                                                       @RequestParam(name = "bettingType", required = false) Integer bettingType,
+                                                                      @RequestParam(name = "beginTime" , required = false) String beginTime,
+                                                                      @RequestParam(name = "endTime" , required = false) String endTime
+    )
     {
 
         startPage();
-        List<AppUserGameBettingWebCountVO> list = appGameBettingService.getUserWebCount(gameId, userId, bettingType);
+        beginTime = StringUtils.isNotBlank(beginTime)?beginTime.concat(" 00:00:00"):beginTime;
+        endTime = StringUtils.isNotBlank(endTime)?endTime.concat(" 23:59:59"):endTime;
+        List<AppUserGameBettingWebCountVO> list = appGameBettingService.getUserWebCount(gameId, userId, bettingType,beginTime,endTime);
 
         if(list != null && !list.isEmpty()){
 
@@ -721,7 +747,7 @@ public class AppGameBettingController extends BaseController{
                 }
             }
         }
-        return HttpRetPageArr.success("查询成功",getDataTable(list));
+        return getDataTable(list);
     }
 
     private double getMultiple(int size){

+ 19 - 3
game-business/src/main/java/com/game/business/mapper/AppGameBettingMapper.java

@@ -19,7 +19,7 @@ public interface AppGameBettingMapper extends BaseMapper<AppGameBetting> {
 
     List<AppGameBettingDetailsCountVO> getCount(@Param(value = "strDate") String strDate, @Param(value = "userId") Long userId,  @Param(value = "bettingType") Integer bettingType);
     List<AppUserGameBettingCountVO> getUserCount(@Param(value = "gameId") Long gameId, @Param(value = "userId") Long userId, @Param(value = "bettingType") Integer bettingType);
-    List<AppUserGameBettingWebCountVO> getUserWebCount(@Param(value = "gameId") Long gameId, @Param(value = "userId") Long userId, @Param(value = "bettingType") Integer bettingType);
+    List<AppUserGameBettingWebCountVO> getUserWebCount(@Param(value = "gameId") Long gameId, @Param(value = "userId") Long userId, @Param(value = "bettingType") Integer bettingType,@Param("beginTime") String beginTime,@Param("endTime") String endTime);
     List<AppUserGameBettingDetailsCountVO> getUserBettingItemCount(@Param(value = "gameId") Long gameId, @Param(value = "gameDate") String gameDate, @Param(value = "userId") Long userId, @Param(value = "bettingType") Integer bettingType);
     Map<String, BigDecimal> getBettingAmountSum(Long userId);
     Map<String, BigDecimal> getBettingAmountByDateSum(FinTranRecordDTO finTranRecordDTO);
@@ -76,7 +76,23 @@ public interface AppGameBettingMapper extends BaseMapper<AppGameBetting> {
      */
     public int deleteAppGameBettingByIds(Long[] ids);
 
-    @Select("select ifNull(sum(betting_amount),0) from app_game_betting where user_id = #{userId} and betting_type = #{bettingType}")
-    public Double sumBettingAmount(@Param("userId") Long userId, @Param("bettingType") Integer bettingType);
+    /*@Select(" <script>" +
+            " select ifNull(sum(betting_amount),0) from app_game_betting " +
+            "  <where>" +
+            "   <if test=\"userId != null \"> " +
+            "       user_id = #{userId} " +
+            "   </if> " +
+            "   <if test=\"bettingType != null \"> " +
+            "      and betting_type = #{bettingType} " +
+            "   </if>" +
+            "   <if test=\"beginTime != null and beginTime != '' \"> " +
+            "      and create_time >= #{beginTime} " +
+            "   </if>" +
+            "   <if test=\"endTime != null and endTime != '' \"> " +
+            "      and create_time <= #{endTime} " +
+            "   </if>" +
+            "  </where>" +
+            " </script>")*/
+    public Double sumBettingAmount(@Param("userId") Long userId, @Param("bettingType") Integer bettingType, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
 
 }

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

@@ -24,7 +24,7 @@ public interface IAppGameBettingService extends IService<AppGameBetting> {
 
     List<AppUserGameBettingCountVO> getUserCount(Long gameId, Long userId, Integer bettingType);
 
-    List<AppUserGameBettingWebCountVO> getUserWebCount(Long gameId, Long userId, Integer bettingType);
+    List<AppUserGameBettingWebCountVO> getUserWebCount(Long gameId, Long userId, Integer bettingType,String beginTime,String endTime);
 
     List<AppUserGameBettingDetailsCountVO> getUserBettingItemCount(Long gameId, String gameDate, Long userId, Integer bettingType);
 
@@ -104,5 +104,5 @@ public interface IAppGameBettingService extends IService<AppGameBetting> {
      */
     public int deleteAppGameBettingById(Long id);
 
-    public Double sumBettingAmount(Long userId,Integer bettingType);
+    public Double sumBettingAmount(Long userId,Integer bettingType,String beginTime,String endTime);
 }

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

@@ -60,8 +60,8 @@ public class AppGameBettingServiceImpl extends ServiceImpl<AppGameBettingMapper,
     }
 
     @Override
-    public List<AppUserGameBettingWebCountVO> getUserWebCount(Long gameId, Long userId, Integer bettingType) {
-        return appGameBettingMapper.getUserWebCount(gameId, userId, bettingType);
+    public List<AppUserGameBettingWebCountVO> getUserWebCount(Long gameId, Long userId, Integer bettingType,String beginTime,String endTime) {
+        return appGameBettingMapper.getUserWebCount(gameId, userId, bettingType,beginTime,endTime);
     }
 
     @Override
@@ -255,8 +255,8 @@ public class AppGameBettingServiceImpl extends ServiceImpl<AppGameBettingMapper,
     }
 
     @Override
-    public Double sumBettingAmount(Long userId,Integer bettingType) {
-        return appGameBettingMapper.sumBettingAmount(userId,bettingType);
+    public Double sumBettingAmount(Long userId,Integer bettingType,String beginTime,String endTime) {
+        return appGameBettingMapper.sumBettingAmount(userId,bettingType,beginTime,endTime);
     }
 
 

+ 21 - 0
game-business/src/main/java/com/game/business/vo/AppUserGameBettingStaticsVo.java

@@ -0,0 +1,21 @@
+package com.game.business.vo;
+
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@ApiModel("后台-用户下注总统计")
+@Data
+public class AppUserGameBettingStaticsVo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    private Double totalAmount;
+
+    private Double toDayAmount;
+
+    private Double totalCoinAmount;
+
+    private Double toDayCoinAmount;
+
+}

+ 2 - 0
game-business/src/main/java/com/game/business/vo/AppUserGameBettingWebCountVO.java

@@ -1,5 +1,6 @@
 package com.game.business.vo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -51,6 +52,7 @@ public class AppUserGameBettingWebCountVO {
     private Integer isLottery;
 
     @ApiModelProperty(value = "当前开奖时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date gameRecordDate;
 
     @ApiModelProperty(value = "投注选项统计")

+ 25 - 1
game-business/src/main/resources/mapper/business/AppGameBettingMapper.xml

@@ -81,10 +81,16 @@
                      <if test="bettingType != null">
                          and betting_type = #{bettingType}
                      </if>
+                     <if test="beginTime != null and beginTime != ''">
+                         and create_time &gt;= #{beginTime}
+                     </if>
+                     <if test="endTime != null and endTime != ''">
+                         and create_time &lt;= #{endTime}
+                     </if>
                  </where>
                  group by user_id, game_id, game_date, betting_game_type
              ) tmp
-            left join app_game ag on ag.id = tmp.gameId
+            left join mugozbg_live.app_game ag on ag.id = tmp.gameId
             left join app_game_lottery agl on agl.game_date = tmp.gameDate and agl.game_id = tmp.gameId
         order by tmp.bettingDate desc
     </select>
@@ -270,4 +276,22 @@
             #{id}
         </foreach>
     </delete>
+
+    <select id="sumBettingAmount" resultType="java.lang.Double">
+        select ifNull(sum(betting_amount),0) from app_game_betting
+        <where>
+            <if test="userId != null ">
+                and user_id = #{userId}
+            </if>
+            <if test="bettingType != null ">
+                and betting_type = #{bettingType}
+            </if>
+            <if test="beginTime != null and beginTime != '' ">
+                and create_time &gt;= #{beginTime}
+            </if>
+             <if test="endTime != null and endTime != '' ">
+                and create_time &lt;= #{endTime}
+             </if>
+        </where>
+    </select>
 </mapper>

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

@@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="perc != null "> and perc = #{perc}</if>
             <if test="proCount != null "> and pro_count = #{proCount}</if>
             <if test="proId != null "> and pro_id = #{proId}</if>
-            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks like concat('%', #{remarks}, '%')</if>
             <if test="sceneId1 != null "> and scene_id1 = #{sceneId1}</if>
             <if test="sceneId2 != null  and sceneId2 != ''"> and scene_id2 = #{sceneId2}</if>
             <if test="sceneType != null "> and scene_type = #{sceneType}</if>

+ 18 - 0
game-ui/src/api/business/betting.js

@@ -9,6 +9,24 @@ export function listBetting(query) {
   })
 }
 
+// 查询用户下注记录列表
+export function listHistoryWeb(query) {
+  return request({
+    url: '/business/betting/listHistoryWeb',
+    method: 'post',
+    params: query
+  })
+}
+
+// 查询用户下注记录列表
+export function staticsWeb(query) {
+  return request({
+    url: '/business/betting/staticsWeb',
+    method: 'post',
+    params: query
+  })
+}
+
 // 查询用户下注记录详细
 export function getBetting(id) {
   return request({

+ 129 - 21
game-ui/src/views/business/betting/index.vue

@@ -19,7 +19,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="游戏期号" prop="gameDate">
+<!--      <el-form-item label="游戏期号" prop="gameDate">
         <el-input
           v-model="queryParams.gameDate"
           placeholder="请输入游戏期号"
@@ -72,7 +72,7 @@
             :value="dict.value"
           />
         </el-select>
-      </el-form-item>
+      </el-form-item>-->
       <el-form-item label="投注时间" prop="daterange">
         <el-date-picker
           v-model="daterange"
@@ -90,8 +90,16 @@
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
+    <el-row :gutter="10" class="mb8" style="padding-left: 2rem;font-size: 15px">
+      <el-col :span="1.5">
+        <div>今日余额投注: {{staticsWeb.toDayAmount}}</div>
+        <div>今日金币投注: {{staticsWeb.toDayCoinAmount}}</div>
+        <div>余额总投注: {{staticsWeb.totalAmount}}</div>
+        <div>金币总投注: {{staticsWeb.totalCoinAmount}}</div>
+      </el-col>
+    </el-row>
 
-    <el-row :gutter="10" class="mb8">
+<!--    <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -135,22 +143,57 @@
         >导出</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+    </el-row>-->
 
-    <el-table v-loading="loading" :data="bettingList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="主键ID" align="center" prop="id" />
-      <el-table-column label="游戏" align="center" prop="gameId">
+<!--    <el-table v-loading="loading" :data="bettingList" @selection-change="handleSelectionChange">-->
+    <el-table v-loading="loading" :data="bettingList" >
+<!--      <el-table-column type="selection" width="55" align="center" />-->
+<!--      <el-table-column label="主键ID" align="center" prop="id" />-->
+      <el-table-column label="用户ID" align="center" prop="userId" width="100"/>
+      <el-table-column label="游戏" align="center" prop="gameId" width="100">
         <template slot-scope="scope">
           <span>{{ getTypeName(scope.row.gameId) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="用户ID" align="center" prop="userId" />
-      <el-table-column label="投注时间" align="center" prop="createTime" width="100"/>
+      <el-table-column label="投注详情(选项:金额)" align="center"  width="200">
+        <template slot-scope="scope">
+            {{getBettingInfo(scope.row)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="本期总投注金额" align="center"  width="120">
+        <template slot-scope="scope">
+            {{getBettingAmount(scope.row)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="开奖获得" align="center"  width="120">
+        <template slot-scope="scope">
+            {{getBettingWinAmount(scope.row)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="本局盈亏" align="center"  width="120">
+        <template slot-scope="scope">
+            {{getBettingWinLoseAmount(scope.row)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="是否开奖" align="center"  width="120">
+        <template slot-scope="scope">
+            {{scope.row.isLottery==0?'否':'是'}}
+        </template>
+      </el-table-column>
       <el-table-column label="游戏期号" align="center" prop="gameDate" width="130"/>
-      <el-table-column label="主播ID" align="center" prop="liveUserId" />
-      <el-table-column label="直播房间号" align="center" prop="liveRoomId" />
-      <el-table-column label="是否直播间投注 " align="center" prop="isLive">
+      <el-table-column label="开奖项" align="center" prop="gameLotterySucc" width="130">
+        <template slot-scope="scope">
+          {{getItemName(scope.row)}}
+        </template>
+      </el-table-column>
+      <el-table-column label="投注类型" align="center" prop="bettingType">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.app_game_betting_type" :value="scope.row.bettingType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="开奖时间" align="center" prop="gameRecordDate" width="130"/>
+      <el-table-column label="投注时间" align="center" prop="bettingDate" width="100"/>
+<!--      <el-table-column label="是否直播间投注 " align="center" prop="isLive">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.app_betting_is_live" :value="scope.row.isLive"/>
         </template>
@@ -172,8 +215,8 @@
         <template slot-scope="scope">
           <dict-tag :options="dict.type.app_game_betting_winning" :value="scope.row.isWinning"/>
         </template>
-      </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      </el-table-column>-->
+<!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -190,7 +233,7 @@
             v-hasPermi="['business:betting:remove']"
           >删除</el-button>
         </template>
-      </el-table-column>
+      </el-table-column>-->
     </el-table>
 
     <pagination
@@ -274,9 +317,10 @@
 </template>
 
 <script>
-import { listBetting, getBetting, delBetting, addBetting, updateBetting } from "@/api/business/betting";
+import { listBetting, getBetting, delBetting, addBetting, updateBetting,staticsWeb } from "@/api/business/betting";
 import {allGameList } from "@/api/business/game_item";
 import {allList} from "@/api/business/lottery";
+import {listHistoryWeb} from "../../../api/business/betting";
 
 export default {
   name: "Betting",
@@ -297,6 +341,7 @@ export default {
       total: 0,
       // 用户下注记录表格数据
       bettingList: [],
+      staticsWeb:{},
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -376,6 +421,66 @@ export default {
     });
   },
   methods: {
+    getBettingInfo(row){
+      let detailsCountVOList = row.detailsCountVOList;
+      if(!detailsCountVOList){
+        return "-";
+      }
+      let res = "";
+      let map = {};
+      for(var i in detailsCountVOList){
+        let item = detailsCountVOList[i];
+        let amount = map[item.bettingTtem];
+        if(!amount){
+          amount = 0;
+        }
+        amount += item.orderAmount;
+        map[item.bettingTtem] = amount;
+      }
+      for(var i in map){
+        if(res.length > 0){
+          res += " | "
+        }
+        res += this.gameItemMap[i+"_"+row.gameId] + ":" + map[i];
+      }
+      return res;
+    },
+    getBettingAmount(row){
+      let detailsCountVOList = row.detailsCountVOList;
+      if(!detailsCountVOList){
+        return "-";
+      }
+      let amount = 0;
+      for(var i in detailsCountVOList){
+        let item = detailsCountVOList[i];
+        amount += parseInt(item.orderAmount);
+      }
+      return amount;
+    },
+    getBettingWinAmount(row){
+      let detailsCountVOList = row.detailsCountVOList;
+      if(!detailsCountVOList){
+        return "-";
+      }
+      let amount = 0;
+      for(var i in detailsCountVOList){
+        let item = detailsCountVOList[i];
+        amount += parseInt(item.winAmount);
+      }
+      return amount;
+    },
+    getBettingWinLoseAmount(row){
+      let detailsCountVOList = row.detailsCountVOList;
+      if(!detailsCountVOList){
+        return "-";
+      }
+      let amount = 0;
+      for(var i in detailsCountVOList){
+        let item = detailsCountVOList[i];
+        amount += parseInt(item.winAmount) - parseInt(item.loseAmount);
+      }
+      return amount;
+    },
     dateChage(val){
       if(undefined != val && null != val && val.length > 1){
         this.queryParams.beginTime = val[0];
@@ -388,19 +493,19 @@ export default {
     getItemName(row){
       let that = this;
       let bettingGameType = row.bettingGameType;
-      let bettingItem = row.bettingItem;
+      let bettingItem = row.gameLotterySucc;
       let gameId = row.gameId;
       if("0" == bettingGameType){
         return that.gameItemMap[bettingItem+"_"+gameId];
       }else{
         let name = "";
-        let arr = JSON.parse(bettingItem);
+        let arr = bettingItem.split(",")
         for(var i in arr){
           let item = arr[i];
           if("" != name){
             name = name + ",";
           }
-          name = name + that.gameItemMap[item["bettingItem"]+"_"+gameId];
+          name = name + that.gameItemMap[item+"_"+gameId];
         }
         return name;
       }
@@ -411,11 +516,14 @@ export default {
     /** 查询用户下注记录列表 */
     getList() {
       this.loading = true;
-      listBetting(this.queryParams).then(response => {
+      listHistoryWeb(this.queryParams).then(response => {
         this.bettingList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
+      staticsWeb(this.queryParams).then(response => {
+        this.staticsWeb = response.data;
+      })
     },
     // 取消按钮
     cancel() {

+ 13 - 1
game-ui/src/views/business/user/index.vue

@@ -569,10 +569,13 @@
               游戏下注(余额):{{userInfo.infoDetail.todayBetting}}
             </span>
                 <span style="margin-left: 1rem;">
-              下注赢(余额):{{userInfo.infoDetail.todayWin}}
+              下注赢(余额):{{userInfo.infoDetail.todayWin - (userInfo.infoDetail.todayBetting - userInfo.infoDetail.todayLose)}}
             </span>
                 <span style="margin-left: 1rem;">
               下注输 (余额):{{userInfo.infoDetail.todayLose}}
+            </span>
+                <span style="margin-left: 1rem;">
+              盈亏 (余额):{{userInfo.infoDetail.todayWin - userInfo.infoDetail.todayLose}}
             </span>
               </el-form-item>
               <el-form-item>
@@ -584,6 +587,9 @@
             </span>
                 <span style="margin-left: 1rem;">
               下注输(金币):{{userInfo.infoDetail.todayCoinLose}}
+            </span>
+                <span style="margin-left: 1rem;">
+              盈亏 (金币):{{userInfo.infoDetail.todayCoinWin - userInfo.infoDetail.todayCoinLose}}
             </span>
             </el-form-item>
           </el-tab-pane>
@@ -605,6 +611,9 @@
           </span>
               <span style="margin-left: 1rem;">
             下注输(余额):{{userInfo.infoDetail.weekLose}}
+          </span>
+              <span style="margin-left: 1rem;">
+            盈亏(余额):{{userInfo.infoDetail.weekWin - userInfo.infoDetail.weekLose}}
           </span>
             </el-form-item>
             <el-form-item>
@@ -616,6 +625,9 @@
           </span>
               <span style="margin-left: 1rem;">
             下注输(金币):{{userInfo.infoDetail.weekCoinLose}}
+          </span>
+              <span style="margin-left: 1rem;">
+            盈亏(金币):{{userInfo.infoDetail.weekCoinWin - userInfo.infoDetail.weekCoinLose}}
           </span>
             </el-form-item>
           </el-tab-pane>