x1ongzhu 7 سال پیش
والد
کامیت
fae424a755
32فایلهای تغییر یافته به همراه2261 افزوده شده و 505 حذف شده
  1. 96 64
      src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java
  2. 68 120
      src/main/java/com/izouma/awesomeadmin/dao/HouseInfoMapper.xml
  3. 35 0
      src/main/java/com/izouma/awesomeadmin/dao/ParticipatingInfoMapper.java
  4. 419 0
      src/main/java/com/izouma/awesomeadmin/dao/ParticipatingInfoMapper.xml
  5. 6 0
      src/main/java/com/izouma/awesomeadmin/dao/PlayerInfoMapper.java
  6. 40 27
      src/main/java/com/izouma/awesomeadmin/dao/PlayerInfoMapper.xml
  7. 0 2
      src/main/java/com/izouma/awesomeadmin/interceptor/PageInterceptor.java
  8. 95 80
      src/main/java/com/izouma/awesomeadmin/model/BonusRecord.java
  9. 35 26
      src/main/java/com/izouma/awesomeadmin/model/HouseInfo.java
  10. 152 0
      src/main/java/com/izouma/awesomeadmin/model/ParticipatingInfo.java
  11. 5 5
      src/main/java/com/izouma/awesomeadmin/model/PlayerInfo.java
  12. 0 2
      src/main/java/com/izouma/awesomeadmin/service/ImageFileService.java
  13. 28 0
      src/main/java/com/izouma/awesomeadmin/service/ParticipatingInfoService.java
  14. 4 0
      src/main/java/com/izouma/awesomeadmin/service/PlayerInfoService.java
  15. 226 167
      src/main/java/com/izouma/awesomeadmin/service/impl/HouseInfoServiceImpl.java
  16. 117 0
      src/main/java/com/izouma/awesomeadmin/service/impl/ParticipatingInfoServiceImpl.java
  17. 24 2
      src/main/java/com/izouma/awesomeadmin/service/impl/PlayerInfoServiceImpl.java
  18. 2 2
      src/main/java/com/izouma/awesomeadmin/service/impl/VideoNotifyServiceImpl.java
  19. 0 1
      src/main/java/com/izouma/awesomeadmin/util/AlipayClientFactory.java
  20. 0 1
      src/main/java/com/izouma/awesomeadmin/util/MbappUtil.java
  21. 0 1
      src/main/java/com/izouma/awesomeadmin/util/PinYinUtil.java
  22. 4 0
      src/main/java/com/izouma/awesomeadmin/util/PushUtil.java
  23. 0 1
      src/main/java/com/izouma/awesomeadmin/util/WeixinUtil.java
  24. 1 1
      src/main/java/com/izouma/awesomeadmin/web/BonusRecordController.java
  25. 127 0
      src/main/java/com/izouma/awesomeadmin/web/ParticipatingInfoController.java
  26. 1 1
      src/main/java/com/izouma/awesomeadmin/web/PlayerInfoController.java
  27. 0 1
      src/main/java/io/rong/util/HttpUtil.java
  28. 1 1
      src/main/resources/spring/appWebService.xml
  29. 133 0
      src/main/vue/src/components/GenOptionsDialog.vue
  30. 160 0
      src/main/vue/src/pages/ParticipatingInfo.vue
  31. 472 0
      src/main/vue/src/pages/ParticipatingInfos.vue
  32. 10 0
      src/main/vue/src/router/index.js

+ 96 - 64
src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java

@@ -86,17 +86,17 @@ public interface AppConstant {
         /**
          * 支付宝
          */
-        Integer ALIPAY = 0;
+        int ALIPAY = 0;
 
         /**
          * 微信
          */
-        Integer WEI_XIN = 1;
+        int WEI_XIN = 1;
 
         /**
          * 电子币
          */
-        Integer COIN = 2;
+        int COIN = 2;
     }
 
     /**
@@ -107,23 +107,23 @@ public interface AppConstant {
         /**
          * 支付宝
          */
-        Integer ALIPAY = 0;
+        int ALIPAY = 0;
 
         /**
          * 微信
          */
-        Integer WEI_XIN = 1;
+        int WEI_XIN = 1;
 
         /**
          * 后台管理员
          */
-        Integer ADMIN = 2;
+        int ADMIN = 2;
 
 
         /**
          * 其他
          */
-        Integer OTHER = 3;
+        int OTHER = 3;
     }
 
     public interface InergralUpdateType {
@@ -131,17 +131,17 @@ public interface AppConstant {
         /**
          * 产品抵扣
          */
-        Integer DISCOUNT = 0;
+        int DISCOUNT = 0;
 
         /**
          * 任务
          */
-        Integer TASK = 1;
+        int TASK = 1;
 
         /**
          * 充值
          */
-        Integer RECHARGE = 2;
+        int RECHARGE = 2;
     }
 
     public interface OrderStatus {
@@ -149,60 +149,60 @@ public interface AppConstant {
         /**
          * 下单,待付款
          */
-        Integer NO_PAY = 0;
+        int NO_PAY = 0;
 
         /**
          * 支付完成,待上传原图、代发货
          */
-        Integer PAY_OVER = 1;
+        int PAY_OVER = 1;
 
         /**
          * 待修图、已发货
          */
-        Integer WAIT_REPAIR = 2;
+        int WAIT_REPAIR = 2;
 
         /**
          * 修图完成待验收、
          */
-        Integer ACCEPT = 3;
+        int ACCEPT = 3;
 
         /**
          * 验收不通过,待返修
          */
-        Integer REWORK = 4;
+        int REWORK = 4;
 
 
         /**
          * 验收完成待评论、已收货待评论
          */
-        Integer FINISH = 5;
+        int FINISH = 5;
 
         /**
          * 结束
          */
-        Integer END = 6;
+        int END = 6;
 
 
         /**
          * 退款中
          */
-        Integer REFUNDING = 7;
+        int REFUNDING = 7;
 
         /**
          * 已经取消
          */
-        Integer CANCEL = 8;
+        int CANCEL = 8;
 
 
         /**
          * 退款失败
          */
-        Integer REFUND_FAIL = 9;
+        int REFUND_FAIL = 9;
 
         /**
          * 退款成功
          */
-        Integer REFUND_SUCCESS = 10;
+        int REFUND_SUCCESS = 10;
 
 
     }
@@ -220,54 +220,54 @@ public interface AppConstant {
         /**
          * 充值
          */
-        Integer RECHARGE = 0;
+        int RECHARGE = 0;
 
         /**
          * 消费/加入房间
          */
-        Integer CONSUMPTION = 1;
+        int CONSUMPTION = 1;
 
         /**
          * 兑换
          */
-        Integer EXCHANGE = 2;
+        int EXCHANGE = 2;
 
         /**
          * 提现
          */
-        Integer CASH = 3;
+        int CASH = 3;
 
         /**
          * 税收
          */
-        Integer TAXES = 4;
+        int TAXES = 4;
 
 
         /**
          * 销售
          */
-        Integer SALE = 5;
+        int SALE = 5;
 
         /**
          * 返还
          */
-        Integer FAN_HUAN = 6;
+        int FAN_HUAN = 6;
 
 
         /**
          * 退款
          */
-        Integer REFUND = 7;
+        int REFUND = 7;
 
         /**
          * 赠送
          */
-        Integer SONG = 8;
+        int SONG = 8;
 
         /**
          * 奖励
          */
-        Integer BONUS = 9;
+        int BONUS = 9;
 
     }
 
@@ -296,17 +296,17 @@ public interface AppConstant {
         /**
          * typeFlag, 购买,订单付款
          */
-        Integer BUY = 0;
+        int BUY = 0;
 
         /**
          * typeFlag,充值
          */
-        Integer RECHARGE = 1;
+        int RECHARGE = 1;
 
         /**
          * 押金
          */
-        Integer CASH_PLEDGE = 2;
+        int CASH_PLEDGE = 2;
 
     }
 
@@ -318,12 +318,12 @@ public interface AppConstant {
         /**
          * 充值
          */
-        Integer RECHARGE = 0;
+        int RECHARGE = 0;
 
         /**
          * 消费
          */
-        Integer CONSUMPTION = 1;
+        int CONSUMPTION = 1;
     }
 
     /**
@@ -334,37 +334,37 @@ public interface AppConstant {
         /**
          * 等待
          */
-        Integer WAIT = 0;
+        int WAIT = 0;
 
         /**
          * 准备
          */
-        Integer READY = 1;
+        int READY = 1;
 
         /**
          * 开始
          */
-        Integer START = 2;
+        int START = 2;
 
         /**
          * 结束
          */
-        Integer END = 3;
+        int END = 3;
 
         /**
          * 结算
          */
-        Integer SETTLEMENT = 4;
+        int SETTLEMENT = 4;
 
         /**
          * 关闭
          */
-        Integer CLOSE = 5;
+        int CLOSE = 5;
 
         /**
          * 解析完成
          */
-        Integer ANALYSIS = 8;
+        int ANALYSIS = 8;
 
     }
 
@@ -375,52 +375,52 @@ public interface AppConstant {
         /**
          * 加入
          */
-        Integer JOIN = 0;
+        int JOIN = 0;
 
         /**
          * 准备
          */
-        Integer READY = 1;
+        int READY = 1;
 
         /**
          * 开始
          */
-        Integer START = 2;
+        int START = 2;
 
         /**
          * 结束
          */
-        Integer END = 3;
+        int END = 3;
 
         /**
          * 结算
          */
-        Integer SETTLEMENT = 4;
+        int SETTLEMENT = 4;
 
         /**
          * 领取奖励
          */
-        Integer RECEIVE = 5;
+        int RECEIVE = 5;
 
         /**
          * 未比赛
          */
-        Integer NO_MATCH = 6;
+        int NO_MATCH = 6;
 
         /**
          * 比赛超时
          */
-        Integer OVERTIME = 7;
+        int OVERTIME = 7;
 
         /**
          * 解析完成
          */
-        Integer PROCESSED = 8;
+        int PROCESSED = 8;
 
         /**
          * 解析失败
          */
-        Integer PROCESSED_FAIL = 9;
+        int PROCESSED_FAIL = 9;
 
     }
 
@@ -431,17 +431,17 @@ public interface AppConstant {
         /**
          * 未参赛
          */
-        Integer NO_MATCH = 0;
+        int NO_MATCH = 0;
 
         /**
          * 自动审核
          */
-        Integer AUTO = 1;
+        int AUTO = 1;
 
         /**
          * 手动审核
          */
-        Integer MANUAL = 2;
+        int MANUAL = 2;
     }
 
 
@@ -452,22 +452,22 @@ public interface AppConstant {
         /**
          * 未参赛
          */
-        Integer NO_MATCH = 0;
+        int NO_MATCH = 0;
 
         /**
          * 比赛结果
          */
-        Integer RESULT = 1;
+        int RESULT = 1;
 
         /**
          * 奖金领取
          */
-        Integer RECEIVE = 2;
+        int RECEIVE = 2;
 
         /**
          * 赛季奖金
          */
-        Integer SEASON_BONUS = 3;
+        int SEASON_BONUS = 3;
 
     }
 
@@ -478,28 +478,60 @@ public interface AppConstant {
         /**
          * 准备中
          */
-        Integer READY = 0;
+        int READY = 0;
 
         /**
          * 进行中
          */
-        Integer START = 1;
+        int START = 1;
 
         /**
          * 结算中
          */
-        Integer SETTLEMENT = 2;
+        int SETTLEMENT = 2;
         /**
          * 结束
          */
-        Integer END        = 3;
+        int END        = 3;
 
     }
 
+    interface CompetitionState {
+        int READY       = 1;
+        int IN_PROGRESS = 2;
+        int SETTLEMENT  = 3;
+        int END         = 4;
+    }
+
     interface CompetitionType {
         int NORMAL = 1; // 普通
 
         int ADVANCE = 2; // 高级
     }
 
+    interface RewardRules {
+        interface Points {
+            int FIRST          = 40;
+            int LEFT_10PERCENT = 20;
+            int LEFT_20PERCENT = 10;
+            int LEFT_30PERCENT = 0;
+            int LEFT_40PERCENT = 20;
+            int WIN            = 10;
+        }
+
+        interface Bonus {
+            double NO1 = 0.5;
+            double NO2 = 0.25;
+            double NO3 = 0.15;
+            double NO4 = 0.7;
+            double NO5 = 0.3;
+        }
+    }
+
+    interface SysConfig {
+        String DAILY_ROOMS_NORMAL   = "dailyRoomsNormal"; // 每日普通房间数量
+        String DAILY_ROOMS_ADVANCED = "dailyRoomsAdvanced"; // 每日高级房间数量
+        String JOIN_ROOMS_NORMAL    = "joinRoomsNormal"; // 用户每日加入高级房间次数
+        String JOIN_ROOMS_ADVANCED  = "joinRoomsAdvanced"; // 用户每日加入高级房间次数
+    }
 }

+ 68 - 120
src/main/java/com/izouma/awesomeadmin/dao/HouseInfoMapper.xml

@@ -31,67 +31,40 @@
         <result column="video" property="video" jdbcType="VARCHAR"/>
         <result column="max_number" property="maxNumber" jdbcType="INTEGER"/>
         <result column="score_type" property="scoreType" jdbcType="INTEGER"/>
+        <result column="competition_id" property="competitionId" jdbcType="INTEGER"/>
     </resultMap>
     <sql id="Base_Column_List">
         <trim suffixOverrides=",">
             id,
-
             del_flag,
-
             update_time,
-
             update_user,
-
             create_time,
-
             create_user,
-
             house_name,
-
             house_abstract,
-
             icon,
-
             house_code,
-
             user_id,
-
             house_type,
-
             house_level,
-
             game_id,
-
             status_flag,
-
             recommend_flag,
-
-            rank,
-
+            `rank`,
             use_flag,
-
             game_house_id,
-
             game_house_password,
-
             begin_time,
-
             end_time,
-
             match_name,
-
             player_number,
-
             bonus,
-
             season_id,
-
             video,
-
             max_number,
-
             score_type,
-
+            competition_id
         </trim>
     </sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
@@ -107,8 +80,9 @@
         where id = #{id,jdbcType=INTEGER}
     </select>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-        delete from house_info
-        where id = #{id,jdbcType=INTEGER}
+        DELETE
+        FROM house_info
+        WHERE id = #{id,jdbcType=INTEGER}
     </delete>
     <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.HouseInfo" useGeneratedKeys="true"
             keyProperty="id">
@@ -201,6 +175,9 @@
             <if test="scoreType!= null">
                 score_type,
             </if>
+            <if test="competitionId!= null">
+                competition_id,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -290,6 +267,9 @@
             <if test="scoreType != null">
                 #{scoreType,jdbcType=INTEGER},
             </if>
+            <if test="competitionId!= null">
+                #{competitionId,jdbcType=INTEGER},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.HouseInfo">
@@ -382,6 +362,9 @@
             <if test="scoreType != null">
                 score_type= #{scoreType,jdbcType=INTEGER},
             </if>
+            <if test="competitionId != null">
+                competition_id= #{competitionId,jdbcType=INTEGER},
+            </if>
         </set>
         where
         <if test="id != null and !&quot;&quot;.equals(id)">
@@ -500,6 +483,9 @@
             <if test="record.scoreType != null and !&quot;&quot;.equals(record.scoreType)">
                 and score_type = #{record.scoreType}
             </if>
+            <if test="record.competitionId != null and !&quot;&quot;.equals(record.competitionId)">
+                and competition_id = #{record.competitionId}
+            </if>
             <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
                     OR house_name LIKE concat('%',#{record.searchKey},'%')
@@ -521,11 +507,9 @@
                                 <if test="detailIndex == 3">
                                     concat('%',#{itemDetail},'%')
                                 </if>
-
                                 <if test="detailIndex &lt; 3">
                                     ${itemDetail}
                                 </if>
-
                             </foreach>
                         </when>
                         <otherwise>
@@ -533,35 +517,24 @@
                                 <if test="detailIndex == 3">
                                     #{itemDetail}
                                 </if>
-
                                 <if test="detailIndex &lt; 3">
                                     ${itemDetail}
                                 </if>
-
                             </foreach>
                         </otherwise>
                     </choose>
-
-
                 </foreach>
-
-
             </if>
-
         </where>
         order by
-
         <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
-
-
             <trim suffixOverrides=",">
                 <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
                     <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                         ${itemDetail}
                     </foreach>
                 </foreach>
-            </trim>
-            ,
+            </trim>,
         </if>
         id desc
     </select>
@@ -658,11 +631,12 @@
             <if test="video != null and !&quot;&quot;.equals(video)">
                 and video = #{video}
             </if>
-
             <if test="scoreType != null and !&quot;&quot;.equals(scoreType)">
                 and score_type = #{scoreType}
             </if>
-
+            <if test="competitionId != null and !&quot;&quot;.equals(competitionId)">
+                and competition_id = #{competitionId}
+            </if>
             <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
                     OR house_name LIKE concat('%',#{searchKey},'%')
@@ -681,11 +655,9 @@
                                 <if test="detailIndex == 3">
                                     concat('%',#{itemDetail},'%')
                                 </if>
-
                                 <if test="detailIndex &lt; 3">
                                     ${itemDetail}
                                 </if>
-
                             </foreach>
                         </when>
                         <otherwise>
@@ -693,36 +665,25 @@
                                 <if test="detailIndex == 3">
                                     #{itemDetail}
                                 </if>
-
                                 <if test="detailIndex &lt; 3">
                                     ${itemDetail}
                                 </if>
-
                             </foreach>
                         </otherwise>
                     </choose>
-
-
                 </foreach>
-
-
             </if>
         </where>
         order by
-
         <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
-
-
             <trim suffixOverrides=",">
                 <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
                     <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
                         ${itemDetail}
                     </foreach>
                 </foreach>
-            </trim>
-            ,
+            </trim>,
         </if>
-
         id desc
     </select>
     <select id="queryHouseInfo" parameterType="java.util.Map" resultMap="OneHouseInfoResult">
@@ -815,10 +776,12 @@
             <if test="video != null and !&quot;&quot;.equals(video)">
                 and video = #{video}
             </if>
-
             <if test="scoreType != null and !&quot;&quot;.equals(scoreType)">
                 and score_type = #{scoreType}
             </if>
+            <if test="competitionId != null and !&quot;&quot;.equals(competitionId)">
+                and competition_id = #{competitionId}
+            </if>
         </where>
         LIMIT 1
     </select>
@@ -828,7 +791,6 @@
         <if test="id != null and !&quot;&quot;.equals(id)">
             id = #{id,jdbcType=INTEGER}
         </if>
-
         <if test="idStr != null and !&quot;&quot;.equals(idStr)">
             id in (${idStr})
         </if>
@@ -836,19 +798,15 @@
     <update id="updateToAnalysis">
         UPDATE house_info
         SET house_info.status_flag = 8
-        WHERE
-            house_info.del_flag = 'N'
-        AND house_info.status_flag = 3
-        AND (
-            SELECT
-                COUNT(player_info.id)
-            FROM
-                player_info
-            WHERE
-                player_info.del_flag = 'N'
-            AND player_info.house_id = house_info.id
-            AND player_info.status_flag = 3
-        ) = 0
+        WHERE house_info.del_flag = 'N'
+          AND house_info.status_flag = 3
+          AND (
+                  SELECT COUNT(player_info.id)
+                  FROM player_info
+                  WHERE player_info.del_flag = 'N'
+                    AND player_info.house_id = house_info.id
+                    AND player_info.status_flag = 3
+              ) = 0
     </update>
     <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.HouseInfo">
         select
@@ -861,54 +819,44 @@
     </select>
 
     <select id="autoBeginHouseInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.HouseInfo">
-        SELECT
-            *
-        FROM
-            `house_info`
-        WHERE
-            del_flag = 'N'
-        AND use_flag = 'Y'
-        AND status_flag = 0
-        AND (
+        SELECT *
+        FROM `house_info`
+        WHERE del_flag = 'N'
+          AND use_flag = 'Y'
+          AND status_flag = 0
+          AND (
             <![CDATA[ player_number >= max_number ]]>
             OR DATE_SUB(
-                CURRENT_TIMESTAMP(),
-                INTERVAL 9 MINUTE
-            )  <![CDATA[>=]]> create_time
-        )
+                           CURRENT_TIMESTAMP(),
+                           INTERVAL 9 MINUTE
+                       )  <![CDATA[>=]]> create_time
+            )
     </select>
 
     <select id="autoEndHouseInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.HouseInfo">
-        SELECT
-            *
-        FROM
-            `house_info`
-        WHERE
-        del_flag = 'N'
-        AND use_flag = 'Y'
-        AND status_flag = 2
-        AND (DATE_SUB(
-        CURRENT_TIMESTAMP (),
-        INTERVAL 55 MINUTE
-        ) <![CDATA[ >= ]]> begin_time
-
-        OR (
-		(
-			SELECT
-				COUNT(player_info.id)
-			FROM
-				player_info
-			WHERE
-				player_info.del_flag = 'N'
-			AND player_info.house_id = house_info.id
-			AND player_info.status_flag = 2
-		) = 0
-		AND DATE_SUB(
-			CURRENT_TIMESTAMP (),
-			INTERVAL 5 MINUTE
-		) <![CDATA[ >= ]]> begin_time
-	)
-	)
+        SELECT *
+        FROM `house_info`
+        WHERE del_flag = 'N'
+          AND use_flag = 'Y'
+          AND status_flag = 2
+          AND (DATE_SUB(
+                       CURRENT_TIMESTAMP(),
+                       INTERVAL 55 MINUTE
+                   ) <![CDATA[ >= ]]> begin_time
+            OR (
+                           (
+                               SELECT COUNT(player_info.id)
+                               FROM player_info
+                               WHERE player_info.del_flag = 'N'
+                                 AND player_info.house_id = house_info.id
+                                 AND player_info.status_flag = 2
+                           ) = 0
+                       AND DATE_SUB(
+                                   CURRENT_TIMESTAMP(),
+                                   INTERVAL 5 MINUTE
+                               ) <![CDATA[ >= ]]> begin_time
+                   )
+            )
 
     </select>
 

+ 35 - 0
src/main/java/com/izouma/awesomeadmin/dao/ParticipatingInfoMapper.java

@@ -0,0 +1,35 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.ParticipatingInfo;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ParticipatingInfoMapper")
+public interface ParticipatingInfoMapper{
+    /*generatedStart*/
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ParticipatingInfo record);
+
+    ParticipatingInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ParticipatingInfo record);
+
+    List<ParticipatingInfo> queryAllParticipatingInfo(ParticipatingInfo record);
+
+    List<ParticipatingInfo> queryParticipatingInfoByPage(Map<String, Object> parameter);
+
+    int delete(ParticipatingInfo record);
+
+    ParticipatingInfo queryParticipatingInfo(ParticipatingInfo record);
+
+    List<ParticipatingInfo> query(ParticipatingInfo record);
+    /*generatedEnd*/
+
+}
+

+ 419 - 0
src/main/java/com/izouma/awesomeadmin/dao/ParticipatingInfoMapper.xml

@@ -0,0 +1,419 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.izouma.awesomeadmin.dao.ParticipatingInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ParticipatingInfo">
+        <!--generatedStart-->
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="competition_id" property="competitionId" jdbcType="INTEGER"/>
+        <result column="points" property="points" jdbcType="INTEGER"/>
+        <result column="bonus" property="bonus" jdbcType="INTEGER"/>
+        <result column="received" property="received" jdbcType="INTEGER"/>
+        <!--generatedEnd-->
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        <!--generatedStart-->
+        id, del_flag, update_time, update_user, create_time, create_user, user_id, competition_id, points, bonus, received        <!--generatedEnd-->
+    </sql>
+
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM participating_info
+        WHERE id = #{id,jdbcType=INTEGER}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        DELETE
+        FROM participating_info
+        WHERE id = #{id,jdbcType=INTEGER}
+    </delete>
+
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ParticipatingInfo" useGeneratedKeys="true" keyProperty="id">
+        INSERT INTO participating_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="competitionId!= null">
+                competition_id,
+            </if>
+            <if test="points!= null">
+                points,
+            </if>
+            <if test="bonus!= null">
+                bonus,
+            </if>
+            <if test="received!= null">
+                received,
+            </if>
+            <!--generatedEnd-->
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <!--generatedStart-->
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="competitionId != null">
+                #{competitionId,jdbcType=INTEGER},
+            </if>
+            <if test="points != null">
+                #{points,jdbcType=INTEGER},
+            </if>
+            <if test="bonus != null">
+                #{bonus,jdbcType=INTEGER},
+            </if>
+            <if test="received != null">
+                #{received,jdbcType=INTEGER},
+            </if>
+            <!--generatedEnd-->
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ParticipatingInfo">
+        UPDATE participating_info
+        <set>
+            <!--generatedStart-->
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="competitionId != null">
+                competition_id= #{competitionId,jdbcType=INTEGER},
+            </if>
+            <if test="points != null">
+                points= #{points,jdbcType=INTEGER},
+            </if>
+            <if test="bonus != null">
+                bonus= #{bonus,jdbcType=INTEGER},
+            </if>
+            <if test="received != null">
+                received= #{received,jdbcType=INTEGER},
+            </if>
+            <!--generatedEnd-->
+        </set>
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="queryParticipatingInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ParticipatingInfo">
+        SELECT <include refid="Base_Column_List"/> FROM participating_info
+        <where>
+            AND del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                AND id IN (${record.idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                AND id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                AND del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                AND update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                AND update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                AND create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                AND create_user = #{record.createUser}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                AND user_id = #{record.userId}
+            </if>
+            <if test="record.competitionId != null and !&quot;&quot;.equals(record.competitionId)">
+                AND competition_id = #{record.competitionId}
+            </if>
+            <if test="record.points != null and !&quot;&quot;.equals(record.points)">
+                AND points = #{record.points}
+            </if>
+            <if test="record.bonus != null and !&quot;&quot;.equals(record.bonus)">
+                AND bonus = #{record.bonus}
+            </if>
+            <if test="record.received != null and !&quot;&quot;.equals(record.received)">
+                AND received = #{record.received}
+            </if>
+            <!--generatedEnd-->
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                    OR competition_id LIKE concat('%',#{record.searchKey},'%')
+                    OR points LIKE concat('%',#{record.searchKey},'%')
+                    OR bonus LIKE concat('%',#{record.searchKey},'%')
+                    OR received LIKE concat('%',#{record.searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryAllParticipatingInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ParticipatingInfo">
+        SELECT <include refid="Base_Column_List"/> FROM participating_info
+        <where>
+            AND del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                AND id IN (${idStr})
+            </if>
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                AND user_id = #{userId}
+            </if>
+            <if test="competitionId != null and !&quot;&quot;.equals(competitionId)">
+                AND competition_id = #{competitionId}
+            </if>
+            <if test="points != null and !&quot;&quot;.equals(points)">
+                AND points = #{points}
+            </if>
+            <if test="bonus != null and !&quot;&quot;.equals(bonus)">
+                AND bonus = #{bonus}
+            </if>
+            <if test="received != null and !&quot;&quot;.equals(received)">
+                AND received = #{received}
+            </if>
+            <!--generatedEnd-->
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <!--generatedStart-->
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR competition_id LIKE concat('%',#{searchKey},'%')
+                    OR points LIKE concat('%',#{searchKey},'%')
+                    OR bonus LIKE concat('%',#{searchKey},'%')
+                    OR received LIKE concat('%',#{searchKey},'%')
+                    <!--generatedEnd-->
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+                            </foreach>
+                        </otherwise>
+                    </choose>
+                </foreach>
+            </if>
+        </where>
+        ORDER BY
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id DESC
+    </select>
+
+    <select id="queryParticipatingInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ParticipatingInfo">
+        SELECT <include refid="Base_Column_List"/> FROM participating_info
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                AND id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                AND del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                AND update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                AND update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                AND create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                AND create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                AND user_id = #{userId}
+            </if>
+            <if test="competitionId != null and !&quot;&quot;.equals(competitionId)">
+                AND competition_id = #{competitionId}
+            </if>
+            <if test="points != null and !&quot;&quot;.equals(points)">
+                AND points = #{points}
+            </if>
+            <if test="bonus != null and !&quot;&quot;.equals(bonus)">
+                AND bonus = #{bonus}
+            </if>
+            <if test="received != null and !&quot;&quot;.equals(received)">
+                AND received = #{received}
+            </if>
+            <!--generatedEnd-->
+        </where>
+        LIMIT 1
+    </select>
+
+    <update id="delete">
+        UPDATE participating_info SET del_flag = 'Y'
+        WHERE
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id IN (${idStr})
+        </if>
+    </update>
+
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ParticipatingInfo">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM participating_info
+        <where>
+            AND del_flag = 'N'
+            <!--generatedStart-->
+            <!--generatedEnd-->
+        </where>
+        ORDER BY id DESC
+    </select>
+</mapper>
+

+ 6 - 0
src/main/java/com/izouma/awesomeadmin/dao/PlayerInfoMapper.java

@@ -4,6 +4,7 @@ import java.util.*;
 
 import com.izouma.awesomeadmin.datasource.DataSource;
 import com.izouma.awesomeadmin.model.HouseInfo;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import com.izouma.awesomeadmin.model.PlayerInfo;
 
@@ -47,5 +48,10 @@ public interface PlayerInfoMapper {
     int overTimePlayer(PlayerInfo record);
 
     List<PlayerInfo> querySettlementPlayer(PlayerInfo record);
+
+    List<PlayerInfo> queryCompetitionPlayers(@Param("competitionId")int competitionId);
+
+    List<PlayerInfo> queryHouseRank(@Param("houseId")int houseId);
+
 }
 

+ 40 - 27
src/main/java/com/izouma/awesomeadmin/dao/PlayerInfoMapper.xml

@@ -98,8 +98,9 @@
         where id = #{id,jdbcType=INTEGER}
     </select>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-        delete from player_info
-        where id = #{id,jdbcType=INTEGER}
+        DELETE
+        FROM player_info
+        WHERE id = #{id,jdbcType=INTEGER}
     </delete>
     <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.PlayerInfo" useGeneratedKeys="true"
             keyProperty="id">
@@ -1350,28 +1351,22 @@
 
 
     <select id="queryNoStartPlayer" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PlayerInfo">
-        SELECT
-                *
-            FROM
-                player_info
-            WHERE
-                del_flag = 'N'
-            AND status_flag = 0
-            AND house_id IN (
-                SELECT
-                    id
-                FROM
-                    house_info
-                WHERE
-                    del_flag = 'N'
-                AND use_flag = 'Y'
+        SELECT *
+        FROM player_info
+        WHERE del_flag = 'N'
+          AND status_flag = 0
+          AND house_id IN (
+            SELECT id
+            FROM house_info
+            WHERE del_flag = 'N'
+              AND use_flag = 'Y'
                 <![CDATA[ AND status_flag >= 1 ]]>
 
                 AND DATE_SUB(
-                    CURRENT_TIMESTAMP (),
-                    INTERVAL 20 SECOND
-                ) <![CDATA[ >= ]]>  begin_time
-            )
+                          CURRENT_TIMESTAMP(),
+                          INTERVAL 20 SECOND
+                      ) <![CDATA[ >= ]]>  begin_time
+        )
 
     </select>
 
@@ -1421,18 +1416,38 @@
 
     </update>
 
+    <select id="queryCompetitionPlayers" resultType="PlayerInfo">
+        SELECT sum(ifnull(points, 0)) AS points, user_id
+        FROM player_info
+        WHERE del_flag = 'N'
+          AND house_id IN (SELECT id FROM house_info WHERE competition_id = #{competitionId} AND del_flag = 'N')
+        GROUP BY user_id
+        ORDER BY points DESC, id DESC
+    </select>
 
-    <resultMap id="PagePlayerInfoResult" type="com.izouma.awesomeadmin.model.PlayerInfo" extends="BaseResultMap">
+    <select id="queryHouseRank" resultType="PlayerInfo">
+        SELECT (@curRank := @curRank + 1)                   AS `rank`,
+               CAST(IFNULL(live_time, 0) AS DECIMAL(10, 1)) AS live_time,
+               player_info.user_id,
+               player_info.ranking,
+               player_info.score,
+               player_info.house_id,
+               player_info.status_flag
+        FROM player_info,
+             (SELECT @curRank := 0) p
+        WHERE player_info.house_id = #{houseId}
+          AND del_flag = 'N'
+        ORDER BY player_info.score DESC, live_time DESC
+    </select>
 
+    <resultMap id="PagePlayerInfoResult" type="com.izouma.awesomeadmin.model.PlayerInfo" extends="BaseResultMap">
         <association property="userInfo"
                      javaType="com.izouma.awesomeadmin.model.UserInfo"
                      select="com.izouma.awesomeadmin.dao.UserInfoMapper.querySingleUserInfo"
                      column="{ id = user_id }"/>
-
     </resultMap>
-    <resultMap id="PagePlayerInfoAllResult" type="com.izouma.awesomeadmin.model.PlayerInfo" extends="BaseResultMap">
-
 
+    <resultMap id="PagePlayerInfoAllResult" type="com.izouma.awesomeadmin.model.PlayerInfo" extends="BaseResultMap">
         <association property="gameInfo"
                      javaType="com.izouma.awesomeadmin.model.GameInfo"
                      select="com.izouma.awesomeadmin.dao.GameInfoMapper.queryGameInfo"
@@ -1441,8 +1456,6 @@
                      javaType="com.izouma.awesomeadmin.model.HouseInfo"
                      select="com.izouma.awesomeadmin.dao.HouseInfoMapper.queryHouseInfo"
                      column="{ id = house_id }"/>
-
-
     </resultMap>
 
 </mapper>

+ 0 - 2
src/main/java/com/izouma/awesomeadmin/interceptor/PageInterceptor.java

@@ -113,8 +113,6 @@ public class PageInterceptor implements Interceptor {
     @Override
     public void setProperties(Properties properties) {
 
-        // TODO Auto-generated method stub
-
     }
 
 

+ 95 - 80
src/main/java/com/izouma/awesomeadmin/model/BonusRecord.java

@@ -2,180 +2,195 @@ package com.izouma.awesomeadmin.model;
 
 import java.math.BigDecimal;
 import java.util.*;
+
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonInclude;
 
 
 @JsonAutoDetect
 @JsonInclude(JsonInclude.Include.NON_NULL)
-public class BonusRecord{
-    private Integer id;
-    private String delFlag;
-    private Date updateTime;
-    private String updateUser;
-    private Date createTime;
-    private String createUser;
+public class BonusRecord {
+    private Integer    id;
+    private String     delFlag;
+    private Date       updateTime;
+    private String     updateUser;
+    private Date       createTime;
+    private String     createUser;
     private BigDecimal money;
     private BigDecimal bonus;
-    private Integer userId;
-    private Integer seasonId;
-    private Integer gameId;
-    private Integer houseId;
-    private Integer typeFlag;
-    private String remark;
-    private Integer playerId;
+    private Integer    userId;
+    private Integer    seasonId;
+    private Integer    gameId;
+    private Integer    competitionId;
+    private Integer    typeFlag;
+    private String     remark;
+    private Integer    playerId;
 
-private String idStr;
+    private String idStr;
 
-private String searchKey;
+    private String searchKey;
 
-/**
-* and,test_name,like,value;or,remark,=,123
-*/
-private String advancedQuery;
+    /**
+     * and,test_name,like,value;or,remark,=,123
+     */
+    private String advancedQuery;
 
-/**
-* column_name_,desc_;column_name_,asc
-*/
-private String orderByStr;
+    /**
+     * column_name_,desc_;column_name_,asc
+     */
+    private String orderByStr;
 
-    public Integer getId(){
+    public Integer getId() {
         return this.id;
     }
 
-    public void setId(Integer id){
+    public void setId(Integer id) {
         this.id = id;
     }
-    public String getDelFlag(){
+
+    public String getDelFlag() {
         return this.delFlag;
     }
 
-    public void setDelFlag(String delFlag){
+    public void setDelFlag(String delFlag) {
         this.delFlag = delFlag;
     }
-    public Date getUpdateTime(){
+
+    public Date getUpdateTime() {
         return this.updateTime;
     }
 
-    public void setUpdateTime(Date updateTime){
+    public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
-    public String getUpdateUser(){
+
+    public String getUpdateUser() {
         return this.updateUser;
     }
 
-    public void setUpdateUser(String updateUser){
+    public void setUpdateUser(String updateUser) {
         this.updateUser = updateUser;
     }
-    public Date getCreateTime(){
+
+    public Date getCreateTime() {
         return this.createTime;
     }
 
-    public void setCreateTime(Date createTime){
+    public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
-    public String getCreateUser(){
+
+    public String getCreateUser() {
         return this.createUser;
     }
 
-    public void setCreateUser(String createUser){
+    public void setCreateUser(String createUser) {
         this.createUser = createUser;
     }
-    public BigDecimal getMoney(){
+
+    public BigDecimal getMoney() {
         return this.money;
     }
 
-    public void setMoney(BigDecimal money){
+    public void setMoney(BigDecimal money) {
         this.money = money;
     }
-    public BigDecimal getBonus(){
+
+    public BigDecimal getBonus() {
         return this.bonus;
     }
 
-    public void setBonus(BigDecimal bonus){
+    public void setBonus(BigDecimal bonus) {
         this.bonus = bonus;
     }
-    public Integer getUserId(){
+
+    public Integer getUserId() {
         return this.userId;
     }
 
-    public void setUserId(Integer userId){
+    public void setUserId(Integer userId) {
         this.userId = userId;
     }
-    public Integer getSeasonId(){
+
+    public Integer getSeasonId() {
         return this.seasonId;
     }
 
-    public void setSeasonId(Integer seasonId){
+    public void setSeasonId(Integer seasonId) {
         this.seasonId = seasonId;
     }
-    public Integer getGameId(){
+
+    public Integer getGameId() {
         return this.gameId;
     }
 
-    public void setGameId(Integer gameId){
+    public void setGameId(Integer gameId) {
         this.gameId = gameId;
     }
-    public Integer getHouseId(){
-        return this.houseId;
+
+    public Integer getCompetitionId() {
+        return competitionId;
     }
 
-    public void setHouseId(Integer houseId){
-        this.houseId = houseId;
+    public void setCompetitionId(Integer competitionId) {
+        this.competitionId = competitionId;
     }
-    public Integer getTypeFlag(){
+
+    public Integer getTypeFlag() {
         return this.typeFlag;
     }
 
-    public void setTypeFlag(Integer typeFlag){
+    public void setTypeFlag(Integer typeFlag) {
         this.typeFlag = typeFlag;
     }
-    public String getRemark(){
+
+    public String getRemark() {
         return this.remark;
     }
 
-    public void setRemark(String remark){
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-    public Integer getPlayerId(){
+
+    public Integer getPlayerId() {
         return this.playerId;
     }
 
-    public void setPlayerId(Integer playerId){
+    public void setPlayerId(Integer playerId) {
         this.playerId = playerId;
     }
 
-public String getSearchKey() {
-    return searchKey;
-}
+    public String getSearchKey() {
+        return searchKey;
+    }
 
-public void setSearchKey(String searchKey) {
-    this.searchKey = searchKey;
-}
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
 
-public String getAdvancedQuery() {
-    return advancedQuery;
-}
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
 
-public void setAdvancedQuery(String advancedQuery) {
-    this.advancedQuery = advancedQuery;
-}
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
 
-public String getOrderByStr() {
-    return orderByStr;
-}
+    public String getOrderByStr() {
+        return orderByStr;
+    }
 
-public void setOrderByStr(String orderByStr) {
-    this.orderByStr = orderByStr;
-}
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
 
-public String getIdStr() {
-    return idStr;
-}
+    public String getIdStr() {
+        return idStr;
+    }
 
-public void setIdStr(String idStr) {
-    this.idStr = idStr;
-}
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
 
 }
 

+ 35 - 26
src/main/java/com/izouma/awesomeadmin/model/HouseInfo.java

@@ -10,33 +10,34 @@ import com.fasterxml.jackson.annotation.JsonInclude;
 @JsonAutoDetect
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class HouseInfo {
-    private Integer id;
-    private String delFlag;
-    private Date updateTime;
-    private String updateUser;
-    private Date createTime;
-    private String createUser;
-    private String houseName;
-    private String houseAbstract;
-    private String icon;
-    private String houseCode;
-    private Integer userId;
-    private Integer houseType;
-    private String houseLevel;
-    private Integer gameId;
-    private Integer statusFlag;
-    private String recommendFlag;
-    private Integer rank;
-    private String useFlag;
-    private String gameHouseId;
-    private String gameHousePassword;
-    private Date beginTime;
-    private Date endTime;
-    private String matchName;
-    private Integer playerNumber;
+    private Integer    id;
+    private String     delFlag;
+    private Date       updateTime;
+    private String     updateUser;
+    private Date       createTime;
+    private String     createUser;
+    private String     houseName;
+    private String     houseAbstract;
+    private String     icon;
+    private String     houseCode;
+    private Integer    userId;
+    private Integer    houseType;
+    private String     houseLevel;
+    private Integer    gameId;
+    private Integer    statusFlag;
+    private String     recommendFlag;
+    private Integer    rank;
+    private String     useFlag;
+    private String     gameHouseId;
+    private String     gameHousePassword;
+    private Date       beginTime;
+    private Date       endTime;
+    private String     matchName;
+    private Integer    playerNumber;
     private BigDecimal bonus;
-    private Integer seasonId;
-    private String video;
+    private Integer    seasonId;
+    private String     video;
+    private Integer    competitionId;
 
     /**
      * 评分方式,0 为吃鸡,1为 评分
@@ -352,5 +353,13 @@ public class HouseInfo {
     public void setScoreType(Integer scoreType) {
         this.scoreType = scoreType;
     }
+
+    public Integer getCompetitionId() {
+        return competitionId;
+    }
+
+    public void setCompetitionId(Integer competitionId) {
+        this.competitionId = competitionId;
+    }
 }
 

+ 152 - 0
src/main/java/com/izouma/awesomeadmin/model/ParticipatingInfo.java

@@ -0,0 +1,152 @@
+package com.izouma.awesomeadmin.model;
+
+import java.util.*;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+
+@JsonAutoDetect
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class ParticipatingInfo{
+    /*generatedStart*/
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private Integer userId;
+    private Integer competitionId;
+    private Integer points;
+    private Integer bonus;
+    private Integer received;
+
+    private String idStr;
+
+    private String searchKey;
+
+    /**
+    * and,test_name,like,value;or,remark,=,123
+    */
+    private String advancedQuery;
+
+    /**
+    * column_name_,desc_;column_name_,asc
+    */
+    private String orderByStr;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    public Integer getId(){
+        return this.id;
+    }
+
+    public void setId(Integer id){
+        this.id = id;
+    }
+    public String getDelFlag(){
+        return this.delFlag;
+    }
+
+    public void setDelFlag(String delFlag){
+        this.delFlag = delFlag;
+    }
+    public Date getUpdateTime(){
+        return this.updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime){
+        this.updateTime = updateTime;
+    }
+    public String getUpdateUser(){
+        return this.updateUser;
+    }
+
+    public void setUpdateUser(String updateUser){
+        this.updateUser = updateUser;
+    }
+    public Date getCreateTime(){
+        return this.createTime;
+    }
+
+    public void setCreateTime(Date createTime){
+        this.createTime = createTime;
+    }
+    public String getCreateUser(){
+        return this.createUser;
+    }
+
+    public void setCreateUser(String createUser){
+        this.createUser = createUser;
+    }
+    public Integer getUserId(){
+        return this.userId;
+    }
+
+    public void setUserId(Integer userId){
+        this.userId = userId;
+    }
+    public Integer getCompetitionId(){
+        return this.competitionId;
+    }
+
+    public void setCompetitionId(Integer competitionId){
+        this.competitionId = competitionId;
+    }
+    public Integer getPoints(){
+        return this.points;
+    }
+
+    public void setPoints(Integer points){
+        this.points = points;
+    }
+    public Integer getBonus(){
+        return this.bonus;
+    }
+
+    public void setBonus(Integer bonus){
+        this.bonus = bonus;
+    }
+    public Integer getReceived(){
+        return this.received;
+    }
+
+    public void setReceived(Integer received){
+        this.received = received;
+    }
+
+    public String getSearchKey() {
+        return searchKey;
+    }
+
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
+
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
+
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
+
+    public String getOrderByStr() {
+        return orderByStr;
+    }
+
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
+
+    public String getIdStr() {
+        return idStr;
+    }
+
+    public void setIdStr(String idStr) {
+        this.idStr = idStr;
+    }
+    /*generatedEnd*/
+
+}
+

+ 5 - 5
src/main/java/com/izouma/awesomeadmin/model/PlayerInfo.java

@@ -20,7 +20,7 @@ public class PlayerInfo {
     private Integer houseId;
     private Date joinTime;
     private BigDecimal principal;
-    private BigDecimal bonus;
+    private BigDecimal points;
     private Integer userId;
     private String remark;
     private String image;
@@ -146,12 +146,12 @@ public class PlayerInfo {
         this.principal = principal;
     }
 
-    public BigDecimal getBonus() {
-        return this.bonus;
+    public BigDecimal getPoints() {
+        return points;
     }
 
-    public void setBonus(BigDecimal bonus) {
-        this.bonus = bonus;
+    public void setPoints(BigDecimal points) {
+        this.points = points;
     }
 
     public Integer getUserId() {

+ 0 - 2
src/main/java/com/izouma/awesomeadmin/service/ImageFileService.java

@@ -23,7 +23,6 @@ public class ImageFileService {
     public String UpLoadImage(InputStream fin, String path) {
 
         logger.info("UpLoadImage :上传照片 开始  : fin:" + fin + "; phth: " + path);
-        // TODO Auto-generated method stub
         String aliid = PropertiesFileLoader.getDefaultProperties("aliossid", "");
         String alikey = PropertiesFileLoader.getDefaultProperties("aliosskey", "");
         String aliossendpoit = PropertiesFileLoader.getDefaultProperties("aliossendpoit", "");
@@ -54,7 +53,6 @@ public class ImageFileService {
 
     public static String GetRealImagePath(String Path) {
 
-        // TODO Auto-generated method stub
         if (Path == null || "".equals(Path) || Path.startsWith("images")) {
             return Path;
         }

+ 28 - 0
src/main/java/com/izouma/awesomeadmin/service/ParticipatingInfoService.java

@@ -0,0 +1,28 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.ParticipatingInfo;
+
+
+/**
+*  service接口类
+*/
+public interface ParticipatingInfoService{
+    /*generatedStart*/
+    List<ParticipatingInfo> getParticipatingInfoList(ParticipatingInfo record);
+
+    List<ParticipatingInfo> getParticipatingInfoByPage(Page page, ParticipatingInfo record);
+
+    ParticipatingInfo getParticipatingInfoById(String id);
+
+    ParticipatingInfo getParticipatingInfo(ParticipatingInfo record);
+
+    boolean createParticipatingInfo(ParticipatingInfo record);
+
+    boolean deleteParticipatingInfo(ParticipatingInfo record);
+
+    boolean updateParticipatingInfo(ParticipatingInfo record);
+    /*generatedEnd*/
+}
+

+ 4 - 0
src/main/java/com/izouma/awesomeadmin/service/PlayerInfoService.java

@@ -44,5 +44,9 @@ public interface PlayerInfoService {
     Result receiveBonus(PlayerInfo record);
 
     int endNum(PlayerInfo record);
+
+    List<PlayerInfo> getCompetitionPlayers(int competitionId);
+
+    List<PlayerInfo> getHouseRank(int houseId);
 }
 

+ 226 - 167
src/main/java/com/izouma/awesomeadmin/service/impl/HouseInfoServiceImpl.java

@@ -28,25 +28,23 @@ public class HouseInfoServiceImpl implements HouseInfoService {
     private static Logger logger = Logger.getLogger(HouseInfoServiceImpl.class);
 
     @Autowired
-    private HouseInfoMapper houseInfoMapper;
-
+    private HouseInfoMapper          houseInfoMapper;
     @Autowired
-    private CompetitionSeasonMapper competitionSeasonMapper;
-
+    private CompetitionSeasonMapper  competitionSeasonMapper;
     @Autowired
-    private UserInfoService userInfoService;
-
+    private UserInfoService          userInfoService;
     @Autowired
-    private MemberCoinService memberCoinService;
-
+    private MemberCoinService        memberCoinService;
     @Autowired
-    private PlayerInfoService playerInfoService;
-
+    private PlayerInfoService        playerInfoService;
     @Autowired
-    private SystemNoticeService systemNoticeService;
-
+    private SystemNoticeService      systemNoticeService;
+    @Autowired
+    private BonusRecordService       bonusRecordService;
     @Autowired
-    private BonusRecordService bonusRecordService;
+    private CompetitionService       competitionService;
+    @Autowired
+    private ParticipatingInfoService participatingInfoService;
 
     @Override
     public List<HouseInfo> getHouseInfoList(HouseInfo record) {
@@ -193,213 +191,282 @@ public class HouseInfoServiceImpl implements HouseInfoService {
      */
     @Override
     public boolean settlementHouse(HouseInfo record) {
-
         logger.info("settlementHouse");
-
-
         try {
-
             HouseInfo houseInfo = new HouseInfo();
             houseInfo.setId(record.getId());
             houseInfo = houseInfoMapper.queryHouseInfo(houseInfo);
 
-            if (houseInfo != null) {
+            if (houseInfo == null || !houseInfo.getStatusFlag().equals(AppConstant.HouseStatus.ANALYSIS)) {
+                //只有结束比赛的才能结算
+                return false;
+            }
 
-                if (houseInfo.getStatusFlag() == AppConstant.HouseStatus.ANALYSIS) {//只有结束比赛的才能结算
+            List<PlayerInfo> playerInfos = playerInfoService.getHouseRank(record.getId());
+            if (CollectionUtils.isEmpty(playerInfos)) {
+                return false;
+            }
 
-                    HouseLevel houseLevel = houseInfo.getHouseLevelInfo();
+            // Competition competition = competitionService.getCompetitionById(record.getCompetitionId().toString());
+
+            for (PlayerInfo playerInfo : playerInfos) {
+                double rankRate = playerInfo.getRank() * 100 / (double) playerInfos.size();
+                double points = 0;
+                if (playerInfo.getRank() == 1) {
+                    points = 40;
+                } else if (rankRate <= 10) {
+                    points = 20;
+                } else if (rankRate <= 20) {
+                    points = 10;
+                } else if (rankRate <= 30) {
+                    points = 0;
+                } else {
+                    points = -10;
+                }
+                if (playerInfo.getRanking() != null && playerInfo.getRanking() == 1) {
+                    points += 10;
+                }
+                playerInfo.setPoints(new BigDecimal(points));
+                playerInfo.setHouseRank(playerInfo.getRank());
 
-                    BigDecimal firstRatio = houseLevel.getFirstRatio();
-                    BigDecimal secondRatio = houseLevel.getSecondRatio();
-                    BigDecimal thirdRatio = houseLevel.getThirdRatio();
-                    BigDecimal poolRatio = houseLevel.getPoolRatio();
-                    BigDecimal avgRatio = houseLevel.getAvgRatio();
+                String content = "你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
+                        + "开始的比赛\"" + houseInfo.getHouseName() + "\"中获得了第" + playerInfo.getHouseRank()
+                        + "名," + (points >= 0 ? "获得" : "扣除") + points + "积分。";
+                SystemNotice systemNotice = new SystemNotice();
+                systemNotice.setGameId(playerInfo.getGameId());
+                systemNotice.setHouseId(playerInfo.getHouseId());
+                systemNotice.setUserId(playerInfo.getUserId());
+                systemNotice.setSeasonId(playerInfo.getSeasonId());
+                systemNotice.setPlayerId(playerInfo.getId());
+                systemNotice.setRemark("定时任务");
 
-                    int winNum = 0;//吃鸡人数
+                systemNotice.setContent(content);
+                systemNotice.setTypeFlag(AppConstant.NoticeType.RESULT);
 
+                systemNoticeService.createSystemNotice(systemNotice);
 
-                    PlayerInfo param = new PlayerInfo();
-                    if (houseInfo.getScoreType() > 0) {
-                        param.setScoreType(1);
+                //推送
+                try {
+                    UserInfo userInfo = new UserInfo();
+                    userInfo.setId(playerInfo.getUserId());
+                    userInfo = userInfoService.getSingleUserInfo(userInfo);
+                    if (userInfo != null) {
+                        if ("Y".equals(userInfo.getNoticeFlag())) {
+                            PushUtil.pushMsg(userInfo.getId().toString(), content);
+                        }
                     }
-                    param.setHouseId(record.getId());
+                } catch (Exception e) {
+                    logger.error("结算推送消息异常。", e);
+                }
 
-                    List<PlayerInfo> playerInfoList = playerInfoService.getSettlementPlayer(param);
+                if (AppConstant.PlayerStatus.PROCESSED == playerInfo.getStatusFlag()) {//如果正常结束的则更新状态
+                    playerInfo.setStatusFlag(AppConstant.PlayerStatus.SETTLEMENT);
 
-                    if (CollectionUtils.isNotEmpty(playerInfoList)) {
+                }
+                playerInfoService.updatePlayerInfo(playerInfo);
+            }
 
-                        if (houseInfo.getScoreType() > 0) {//如果是平分模式,获取吃鸡人数。
-                            param.setRanking(1);
-                            List<PlayerInfo> winList = playerInfoService.getSettlementPlayer(param);
-                            winNum = winList.size();
-                        }
+            //更新为结算完成状态。
+            houseInfo.setStatusFlag(AppConstant.HouseStatus.SETTLEMENT);
+            houseInfoMapper.updateByPrimaryKeySelective(houseInfo);
+        } catch (Exception e) {
+            logger.error(e);
+        }
+        return false;
+    }
 
-                        for (int i = 0; i < playerInfoList.size(); i++) {
-                            PlayerInfo playerInfo = playerInfoList.get(i);
-                            playerInfo.setHouseRank(i + 1);
-                            BigDecimal bonus = BigDecimal.ZERO;
-                            String content = "";
-                            int typeFlag = AppConstant.NoticeType.RECEIVE;
+    public boolean settlementHouse_bak(HouseInfo record) {
 
-                            if (AppConstant.PlayerStatus.PROCESSED_FAIL == playerInfo.getStatusFlag()) {
+        logger.info("settlementHouse");
+        try {
 
-                                content = "很遗憾,你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                        + "开始的游戏竞赛 " + houseInfo.getHouseName()
-                                        + ",未解析到结果,无法获得奖励。";
-                                typeFlag = AppConstant.NoticeType.RESULT;
-                            } else if (AppConstant.PlayerStatus.OVERTIME == playerInfo.getStatusFlag()) {
-                                content = "很遗憾,你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                        + "开始的游戏竞赛 " + houseInfo.getHouseName()
-                                        + ",比赛超时,无法获得奖励。";
-                                typeFlag = AppConstant.NoticeType.RESULT;
-                            } else {
-                                if (houseInfo.getScoreType() == 0) {//吃鸡模式
-                                    if (playerInfo.getRanking() != null && 1 == playerInfo.getRanking()) {//只有吃鸡才能获得奖励
-
-                                        if (i == 0) {//第一名
-                                            bonus = BigDecimal.valueOf((firstRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue());
-
-
-                                        }
-                                        if (i == 1) {//第二名
-                                            bonus = BigDecimal.valueOf((secondRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue());
-                                        }
-                                        if (i == 2) {//第三名
-                                            bonus = BigDecimal.valueOf((thirdRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue());
-                                        }
-
-                                        content = "恭喜你,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                                + "开始的游戏竞赛 " + houseInfo.getHouseName() + "(吃鸡模式)获得了第" + playerInfo.getHouseRank()
-                                                + "名,获得" + bonus + "积分,赶快领取你的奖励吧。";
-                                    } else {
-
-                                        content = "很遗憾,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                                + "开始的游戏竞赛 " + houseInfo.getHouseName() + "(吃鸡模式)获得了第" + playerInfo.getHouseRank()
-                                                + "名,但未能吃鸡,因此无法获得奖励。";
-                                        typeFlag = AppConstant.NoticeType.RESULT;
-                                    }
-                                } else {
-                                    if (playerInfo.getRanking() != null && 1 == playerInfo.getRanking()) {//只有评分大于0才能获得奖励
-
-                                        if (winNum > 0) {//吃鸡人数大于0
-                                            bonus = BigDecimal.valueOf(((avgRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue()) / winNum);
-
-
-                                        }
-
-                                        content = "恭喜你,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                                + "开始的游戏竞赛 " + houseInfo.getHouseName() + "(平分模式)获得了第" + playerInfo.getHouseRank()
-                                                + "名,获得" + bonus + "积分,赶快领取你的奖励吧。";
-                                    } else {
-                                        content = "很遗憾,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                                + "开始的游戏竞赛 " + houseInfo.getHouseName() + "(平分模式)获得了第" + playerInfo.getHouseRank()
-                                                + "名,但未吃鸡,因此无法获得奖励。";
-                                        typeFlag = AppConstant.NoticeType.RESULT;
-                                    }
-                                }
-                            }
+            HouseInfo houseInfo = new HouseInfo();
+            houseInfo.setId(record.getId());
+            houseInfo = houseInfoMapper.queryHouseInfo(houseInfo);
 
+            if (houseInfo == null || !houseInfo.getStatusFlag().equals(AppConstant.HouseStatus.ANALYSIS)) {
+                //只有结束比赛的才能结算
+                return false;
+            }
 
-                            playerInfo.setBonus(bonus);
+            HouseLevel houseLevel = houseInfo.getHouseLevelInfo();
 
+            BigDecimal firstRatio = houseLevel.getFirstRatio();
+            BigDecimal secondRatio = houseLevel.getSecondRatio();
+            BigDecimal thirdRatio = houseLevel.getThirdRatio();
+            BigDecimal poolRatio = houseLevel.getPoolRatio();
+            BigDecimal avgRatio = houseLevel.getAvgRatio();
 
-                            SystemNotice systemNotice = new SystemNotice();
-                            systemNotice.setGameId(playerInfo.getGameId());
-                            systemNotice.setHouseId(playerInfo.getHouseId());
-                            systemNotice.setUserId(playerInfo.getUserId());
-                            systemNotice.setSeasonId(playerInfo.getSeasonId());
-                            systemNotice.setPlayerId(playerInfo.getId());
-                            systemNotice.setRemark("定时任务");
+            int winNum = 0;//吃鸡人数
 
-                            systemNotice.setContent(content);
-                            systemNotice.setTypeFlag(typeFlag);
+            PlayerInfo param = new PlayerInfo();
+            if (houseInfo.getScoreType() > 0) {
+                param.setScoreType(1);
+            }
+            param.setHouseId(record.getId());
 
-                            systemNoticeService.createSystemNotice(systemNotice);
+            List<PlayerInfo> playerInfoList = playerInfoService.getSettlementPlayer(param);
 
-                            //推送
-                            try {
-                                UserInfo userInfo = new UserInfo();
-                                userInfo.setId(playerInfo.getUserId());
-                                userInfo = userInfoService.getSingleUserInfo(userInfo);
-                                if (userInfo != null) {
-                                    if ("Y".equals(userInfo.getNoticeFlag())) {
-                                        String[] ids = new String[]{userInfo.getId().toString()};
+            if (CollectionUtils.isNotEmpty(playerInfoList)) {
 
-                                        PushUtil.pushMsg(ids, content);
-                                    }
+                if (houseInfo.getScoreType() > 0) {//如果是平分模式,获取吃鸡人数。
+                    param.setRanking(1);
+                    List<PlayerInfo> winList = playerInfoService.getSettlementPlayer(param);
+                    winNum = winList.size();
+                }
 
-                                }
+                for (int i = 0; i < playerInfoList.size(); i++) {
+                    PlayerInfo playerInfo = playerInfoList.get(i);
+                    playerInfo.setHouseRank(i + 1);
+                    BigDecimal bonus = BigDecimal.ZERO;
+                    String content = "";
+                    int typeFlag = AppConstant.NoticeType.RECEIVE;
 
+                    if (AppConstant.PlayerStatus.PROCESSED_FAIL == playerInfo.getStatusFlag()) {
 
-                            } catch (Exception e) {
-                                logger.error("结算推送消息异常。", e);
-                            }
+                        content = "很遗憾,你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
+                                + "开始的游戏竞赛 " + houseInfo.getHouseName()
+                                + ",未解析到结果,无法获得奖励。";
+                        typeFlag = AppConstant.NoticeType.RESULT;
+                    } else if (AppConstant.PlayerStatus.OVERTIME == playerInfo.getStatusFlag()) {
+                        content = "很遗憾,你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
+                                + "开始的游戏竞赛 " + houseInfo.getHouseName()
+                                + ",比赛超时,无法获得奖励。";
+                        typeFlag = AppConstant.NoticeType.RESULT;
+                    } else {
+                        if (houseInfo.getScoreType() == 0) {//吃鸡模式
+                            if (playerInfo.getRanking() != null && 1 == playerInfo.getRanking()) {//只有吃鸡才能获得奖励
+
+                                if (i == 0) {//第一名
+                                    bonus = BigDecimal.valueOf((firstRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue());
 
-                            if (AppConstant.PlayerStatus.PROCESSED == playerInfo.getStatusFlag()) {//如果正常结束的则更新状态
-                                playerInfo.setStatusFlag(AppConstant.PlayerStatus.SETTLEMENT);
 
+                                }
+                                if (i == 1) {//第二名
+                                    bonus = BigDecimal.valueOf((secondRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue());
+                                }
+                                if (i == 2) {//第三名
+                                    bonus = BigDecimal.valueOf((thirdRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue());
+                                }
+
+                                content = "恭喜你,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
+                                        + "开始的游戏竞赛 " + houseInfo.getHouseName() + "(吃鸡模式)获得了第" + playerInfo.getHouseRank()
+                                        + "名,获得" + bonus + "积分,赶快领取你的奖励吧。";
+                            } else {
+
+                                content = "很遗憾,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
+                                        + "开始的游戏竞赛 " + houseInfo.getHouseName() + "(吃鸡模式)获得了第" + playerInfo.getHouseRank()
+                                        + "名,但未能吃鸡,因此无法获得奖励。";
+                                typeFlag = AppConstant.NoticeType.RESULT;
                             }
-                            playerInfoService.updatePlayerInfo(playerInfo);
+                        } else {
+                            if (playerInfo.getRanking() != null && 1 == playerInfo.getRanking()) {//只有评分大于0才能获得奖励
 
+                                if (winNum > 0) {//吃鸡人数大于0
+                                    bonus = BigDecimal.valueOf(((avgRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue()) / winNum);
+                                }
 
+                                content = "恭喜你,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
+                                        + "开始的游戏竞赛 " + houseInfo.getHouseName() + "(平分模式)获得了第" + playerInfo.getHouseRank()
+                                        + "名,获得" + bonus + "积分,赶快领取你的奖励吧。";
+                            } else {
+                                content = "很遗憾,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
+                                        + "开始的游戏竞赛 " + houseInfo.getHouseName() + "(平分模式)获得了第" + playerInfo.getHouseRank()
+                                        + "名,但未吃鸡,因此无法获得奖励。";
+                                typeFlag = AppConstant.NoticeType.RESULT;
+                            }
                         }
                     }
 
-                    if (poolRatio.doubleValue() > 0) {
-                        //加入到赛季奖金池中
-                        try {
+                    //todo: 这里临时改成了积分
+                    playerInfo.setPoints(bonus);
 
-                            BigDecimal pool = BigDecimal.valueOf((poolRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue());
+                    SystemNotice systemNotice = new SystemNotice();
+                    systemNotice.setGameId(playerInfo.getGameId());
+                    systemNotice.setHouseId(playerInfo.getHouseId());
+                    systemNotice.setUserId(playerInfo.getUserId());
+                    systemNotice.setSeasonId(playerInfo.getSeasonId());
+                    systemNotice.setPlayerId(playerInfo.getId());
+                    systemNotice.setRemark("定时任务");
 
-                            CompetitionSeason competitionSeason = competitionSeasonMapper.selectByPrimaryKey(houseInfo.getSeasonId());
+                    systemNotice.setContent(content);
+                    systemNotice.setTypeFlag(typeFlag);
 
-                            if (competitionSeason != null) {
+                    systemNoticeService.createSystemNotice(systemNotice);
 
+                    //推送
+                    try {
+                        UserInfo userInfo = new UserInfo();
+                        userInfo.setId(playerInfo.getUserId());
+                        userInfo = userInfoService.getSingleUserInfo(userInfo);
+                        if (userInfo != null) {
+                            if ("Y".equals(userInfo.getNoticeFlag())) {
+                                String[] ids = new String[]{userInfo.getId().toString()};
 
-                                double balance = competitionSeason.getBonus().doubleValue();
-                                double moneyCoin = balance + pool.doubleValue();
+                                PushUtil.pushMsg(ids, content);
+                            }
+                        }
 
-                                BonusRecord bonusRecord = new BonusRecord();
-                                bonusRecord.setMoney(pool);
-                                bonusRecord.setBonus(BigDecimal.valueOf(moneyCoin));
-                                bonusRecord.setSeasonId(houseInfo.getSeasonId());
-                                bonusRecord.setGameId(houseInfo.getGameId());
-                                bonusRecord.setHouseId(houseInfo.getId());
-                                bonusRecord.setTypeFlag(0);
-                                bonusRecord.setRemark(houseInfo.getHouseName() + "比赛结算," + pool.doubleValue() + " 积分");
-                                bonusRecordService.createBonusRecord(bonusRecord);
+                    } catch (Exception e) {
+                        logger.error("结算推送消息异常。", e);
+                    }
 
-                                CompetitionSeason addBonus = new CompetitionSeason();
-                                addBonus.setId(competitionSeason.getId());
-                                addBonus.setBonus(pool);
+                    if (AppConstant.PlayerStatus.PROCESSED == playerInfo.getStatusFlag()) {//如果正常结束的则更新状态
+                        playerInfo.setStatusFlag(AppConstant.PlayerStatus.SETTLEMENT);
 
-                                competitionSeasonMapper.addBonus(addBonus);
+                    }
+                    playerInfoService.updatePlayerInfo(playerInfo);
 
+                }
+            }
 
-                            }
+            if (poolRatio.doubleValue() > 0) {
+                //加入到赛季奖金池中
+                try {
 
-                        } catch (Exception e) {
-                            logger.error("赛季奖金池添加奖金异常!", e);
-                        }
+                    BigDecimal pool = BigDecimal.valueOf((poolRatio.doubleValue() / 100) * houseInfo.getBonus().doubleValue());
 
-                    }
+                    CompetitionSeason competitionSeason = competitionSeasonMapper.selectByPrimaryKey(houseInfo.getSeasonId());
 
+                    if (competitionSeason != null) {
 
-                    //更新为结算完成状态。
-                    houseInfo.setStatusFlag(AppConstant.HouseStatus.SETTLEMENT);
-                    houseInfoMapper.updateByPrimaryKeySelective(houseInfo);
 
-                    return true;
-                }
+                        double balance = competitionSeason.getBonus().doubleValue();
+                        double moneyCoin = balance + pool.doubleValue();
+
+                        BonusRecord bonusRecord = new BonusRecord();
+                        bonusRecord.setMoney(pool);
+                        bonusRecord.setBonus(BigDecimal.valueOf(moneyCoin));
+                        bonusRecord.setSeasonId(houseInfo.getSeasonId());
+                        bonusRecord.setGameId(houseInfo.getGameId());
+                        //todo: 这里临时改成了比赛id
+                        bonusRecord.setCompetitionId(houseInfo.getId());
+                        bonusRecord.setTypeFlag(0);
+                        bonusRecord.setRemark(houseInfo.getHouseName() + "比赛结算," + pool.doubleValue() + " 积分");
+                        bonusRecordService.createBonusRecord(bonusRecord);
+
+                        CompetitionSeason addBonus = new CompetitionSeason();
+                        addBonus.setId(competitionSeason.getId());
+                        addBonus.setBonus(pool);
+
+                        competitionSeasonMapper.addBonus(addBonus);
+
 
+                    }
 
+                } catch (Exception e) {
+                    logger.error("赛季奖金池添加奖金异常!", e);
+                }
             }
 
+            //更新为结算完成状态。
+            houseInfo.setStatusFlag(AppConstant.HouseStatus.SETTLEMENT);
+            houseInfoMapper.updateByPrimaryKeySelective(houseInfo);
 
+            return true;
         } catch (Exception e) {
             logger.error("settlementHouse", e);
         }
-
         return false;
     }
 
@@ -423,7 +490,6 @@ public class HouseInfoServiceImpl implements HouseInfoService {
                 return new Result(false, "加入失败,房间不存在!");
             }
 
-
             UserInfo userInfo = new UserInfo();
             userInfo.setId(record.getUserId());
             userInfo = userInfoService.getSingleUserInfo(userInfo);
@@ -466,7 +532,6 @@ public class HouseInfoServiceImpl implements HouseInfoService {
                 return new Result(false, "加入失败,余额不足");
             }
 
-
             record.setGameId(houseInfo.getGameId());
             record.setHouseId(houseInfo.getId());
             record.setJoinTime(new Date());
@@ -617,18 +682,12 @@ public class HouseInfoServiceImpl implements HouseInfoService {
             List<HouseInfo> houseInfoList = houseInfoMapper.queryAllHouseInfo(record);
 
             for (HouseInfo houseInfo : houseInfoList) {
-
-
                 settlementHouse(houseInfo);//比赛结果结算。
             }
-
             return new Result(true, "结束成功");
-
-
         } catch (Exception e) {
             logger.error("autoSettlement", e);
         }
-
         return new Result(false, "结束失败");
     }
 

+ 117 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/ParticipatingInfoServiceImpl.java

@@ -0,0 +1,117 @@
+package com.izouma.awesomeadmin.service.impl;
+
+import java.util.*;
+import org.apache.log4j.Logger;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.ParticipatingInfo;
+import com.izouma.awesomeadmin.service.ParticipatingInfoService;
+import com.izouma.awesomeadmin.dao.ParticipatingInfoMapper;
+
+/**
+*  service接口实现类
+*/
+@Service
+public class ParticipatingInfoServiceImpl implements ParticipatingInfoService{
+    /*generatedStart*/
+    private static Logger logger = Logger.getLogger(ParticipatingInfoServiceImpl.class);
+
+    @Autowired
+    private ParticipatingInfoMapper participatingInfoMapper;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @Override
+    public List<ParticipatingInfo> getParticipatingInfoList(ParticipatingInfo record) {
+        logger.info("getParticipatingInfoList");
+        try {
+            return participatingInfoMapper.queryAllParticipatingInfo(record);
+        } catch (Exception e) {
+            logger.error("getParticipatingInfoList", e);
+        }
+        return null;
+    }
+
+    @Override
+    public List<ParticipatingInfo> getParticipatingInfoByPage(Page page, ParticipatingInfo record) {
+        logger.info("getParticipatingInfoByPage");
+        try {
+            Map<String, Object> parameter = new HashMap<String, Object>();
+            parameter.put("record", record);
+            parameter.put(AppConstant.PAGE, page);
+
+            return participatingInfoMapper.queryParticipatingInfoByPage(parameter);
+        } catch (Exception e) {
+            logger.error("getParticipatingInfoByPage", e);
+        }
+        return null;
+    }
+
+    @Override
+    public ParticipatingInfo getParticipatingInfoById(String id) {
+        logger.info("getParticipatingInfoyId");
+        try {
+            return participatingInfoMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+            logger.error("getParticipatingInfoById", e);
+        }
+        return null;
+    }
+
+    @Override
+    public ParticipatingInfo getParticipatingInfo(ParticipatingInfo record) {
+        logger.info("getParticipatingInfo");
+        try {
+            return participatingInfoMapper.queryParticipatingInfo(record);
+        } catch (Exception e) {
+            logger.error("getParticipatingInfo", e);
+        }
+        return null;
+    }
+
+    @Override
+    public boolean createParticipatingInfo(ParticipatingInfo record) {
+        logger.info("createParticipatingInfo");
+        try {
+            int updates = participatingInfoMapper.insertSelective(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+            logger.error("createParticipatingInfo", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean deleteParticipatingInfo(ParticipatingInfo record) {
+        logger.info("deleteParticipatingInfo");
+        try {
+            int updates = participatingInfoMapper.delete(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("deleteParticipatingInfo", e);
+        }
+        return false;
+    }
+
+    @Override
+    public boolean updateParticipatingInfo(ParticipatingInfo record) {
+        logger.info("updateParticipatingInfo");
+        try {
+            int updates = participatingInfoMapper.updateByPrimaryKeySelective(record);
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("updateParticipatingInfo", e);
+        }
+        return false;
+    }
+    /*generatedEnd*/
+}
+

+ 24 - 2
src/main/java/com/izouma/awesomeadmin/service/impl/PlayerInfoServiceImpl.java

@@ -181,7 +181,6 @@ public class PlayerInfoServiceImpl implements PlayerInfoService {
 
         logger.info("endNum");
         try {
-
             return playerInfoMapper.endNum(record);
 
         } catch (Exception e) {
@@ -191,6 +190,28 @@ public class PlayerInfoServiceImpl implements PlayerInfoService {
         return 0;
     }
 
+    @Override
+    public List<PlayerInfo> getCompetitionPlayers(int competitionId) {
+        logger.info("getCompetitionPlayers");
+        try {
+            return playerInfoMapper.queryCompetitionPlayers(competitionId);
+        } catch (Exception e) {
+            logger.error(e);
+        }
+        return null;
+    }
+
+    @Override
+    public List<PlayerInfo> getHouseRank(int houseId) {
+        logger.info("getHouseRank");
+        try {
+            return playerInfoMapper.queryHouseRank(houseId);
+        } catch (Exception e) {
+            logger.error(e);
+        }
+        return null;
+    }
+
     @Override
     public PlayerInfo seasonUserRank(PlayerInfo record) {
 
@@ -301,7 +322,8 @@ public class PlayerInfoServiceImpl implements PlayerInfoService {
                     return new Result(false, "玩家处于非结算状态,不能领取!");
                 }
 
-                double money = playerInfo.getBonus().doubleValue();
+                //todo: 这里领取积分改成领取金币
+                double money = playerInfo.getPoints().doubleValue();
                 if (money > 0) {
                     int userId = Integer.valueOf(playerInfo.getUserId());
 

+ 2 - 2
src/main/java/com/izouma/awesomeadmin/service/impl/VideoNotifyServiceImpl.java

@@ -31,7 +31,7 @@ public class VideoNotifyServiceImpl implements VideoNotifyService {
         try {
             PlayerInfo playerInfo = playerInfoService.getPlayerInfoById(param.getPlayerInfoId().toString());
             HouseInfo houseInfo = houseInfoService.getHouseInfoById(playerInfo.getHouseId().toString());
-            if (AppConstant.HouseStatus.START.equals(houseInfo.getStatusFlag())) {
+            if (AppConstant.HouseStatus.START == houseInfo.getStatusFlag()) {
                 response.setStatus(200);
                 return;
             }
@@ -51,7 +51,7 @@ public class VideoNotifyServiceImpl implements VideoNotifyService {
         try {
             PlayerInfo playerInfo = playerInfoService.getPlayerInfoById(param.getPlayerInfoId().toString());
             HouseInfo houseInfo = houseInfoService.getHouseInfoById(playerInfo.getHouseId().toString());
-            if (AppConstant.HouseStatus.START.equals(houseInfo.getStatusFlag())) {
+            if (AppConstant.HouseStatus.START == houseInfo.getStatusFlag()) {
                 response.setStatus(200);
                 return;
             }

+ 0 - 1
src/main/java/com/izouma/awesomeadmin/util/AlipayClientFactory.java

@@ -148,7 +148,6 @@ public class AlipayClientFactory {
 
             }
         } catch (AlipayApiException e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
         return false;

+ 0 - 1
src/main/java/com/izouma/awesomeadmin/util/MbappUtil.java

@@ -230,7 +230,6 @@ public class MbappUtil {
             System.out.println("本机的ip是 :" + localip);
             return localip;
         } catch (Exception e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
         return null;

+ 0 - 1
src/main/java/com/izouma/awesomeadmin/util/PinYinUtil.java

@@ -49,7 +49,6 @@ public class PinYinUtil {
             pinyin = PinyinHelper.toHanyuPinyinStringArray(pinYinStr, format);
 
         } catch (BadHanyuPinyinOutputFormatCombination e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
 

+ 4 - 0
src/main/java/com/izouma/awesomeadmin/util/PushUtil.java

@@ -10,6 +10,10 @@ import cn.jpush.api.push.model.audience.Audience;
 import cn.jpush.api.push.model.notification.Notification;
 
 public class PushUtil {
+    public static boolean pushMsg(String id, String msg) {
+        return pushMsg(new String[]{id}, msg);
+    }
+
     public static boolean pushMsg(String[] ids, String msg) {
         try {
             JPushClient jpushClient = new JPushClient("8c4d468288c59f9af8ba90c4", "868cc9036e14c71e2b698f46", null, ClientConfig.getInstance());

+ 0 - 1
src/main/java/com/izouma/awesomeadmin/util/WeixinUtil.java

@@ -222,7 +222,6 @@ public class WeixinUtil {
             System.out.println("本机的ip是 :" + localip);
             return localip;
         } catch (Exception e) {
-            // TODO Auto-generated catch block
             e.printStackTrace();
         }
         return null;

+ 1 - 1
src/main/java/com/izouma/awesomeadmin/web/BonusRecordController.java

@@ -150,7 +150,7 @@ public class BonusRecordController {
                         dataList[i][8] = String.valueOf(bonusRecords.get(i).getUserId());
                         dataList[i][9] = String.valueOf(bonusRecords.get(i).getSeasonId());
                         dataList[i][10] = String.valueOf(bonusRecords.get(i).getGameId());
-                        dataList[i][11] = String.valueOf(bonusRecords.get(i).getHouseId());
+                        dataList[i][11] = String.valueOf(bonusRecords.get(i).getCompetitionId());
                         dataList[i][12] = String.valueOf(bonusRecords.get(i).getTypeFlag());
                         dataList[i][13] = String.valueOf(bonusRecords.get(i).getRemark());
                         dataList[i][14] = String.valueOf(bonusRecords.get(i).getPlayerId());

+ 127 - 0
src/main/java/com/izouma/awesomeadmin/web/ParticipatingInfoController.java

@@ -0,0 +1,127 @@
+package com.izouma.awesomeadmin.web;
+
+import java.util.*;
+
+import com.izouma.awesomeadmin.util.ExportExcelUtil;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import com.izouma.awesomeadmin.constant.AppConstant;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.dto.Result;
+import com.izouma.awesomeadmin.model.ParticipatingInfo;
+import com.izouma.awesomeadmin.service.ParticipatingInfoService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Controller
+@RequestMapping("/participatingInfo")
+public class ParticipatingInfoController {
+    /*generatedStart*/
+    @Autowired
+    private ParticipatingInfoService participatingInfoService;
+    /*generatedEnd*/
+
+    /*generatedStart*/
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(ParticipatingInfo record) {
+        List<ParticipatingInfo> pp = participatingInfoService.getParticipatingInfoList(record);
+        return new Result(true, pp);
+    }
+
+    @RequestMapping(value = "/getParticipatingInfo", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getParticipatingInfo(@RequestParam(required = false, value = "id") String id) {
+        ParticipatingInfo data = participatingInfoService.getParticipatingInfoById(id);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(ParticipatingInfo record) {
+        ParticipatingInfo data = participatingInfoService.getParticipatingInfo(record);
+        return new Result(true, data);
+    }
+
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, ParticipatingInfo record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<ParticipatingInfo> pp =participatingInfoService.getParticipatingInfoByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(ParticipatingInfo record) {
+        boolean num = participatingInfoService.createParticipatingInfo(record);
+        if (num) {
+        return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updateParticipatingInfo(ParticipatingInfo record) {
+        boolean num = participatingInfoService.updateParticipatingInfo(record);
+        if (num) {
+        return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deleteParticipatingInfo(ParticipatingInfo record) {
+
+        boolean num = participatingInfoService.deleteParticipatingInfo(record);
+        if (num) {
+        return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, ParticipatingInfo record) throws Exception {
+
+        List<ParticipatingInfo> participatingInfos = participatingInfoService.getParticipatingInfoList(record);
+
+        String sheetName = "participating_info";
+        String titleName = "参赛信息数据表";
+        String fileName = "参赛信息表";
+        int columnNumber = 11;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "用户" ,   "比赛" ,   "积分" ,   "奖金" ,   "已领取"  };
+        String[][] dataList = new String[participatingInfos.size()][11];
+
+        for (int i = 0; i < participatingInfos.size(); i++) {
+                        dataList[i][0] = String.valueOf(participatingInfos.get(i).getId());
+                        dataList[i][1] = String.valueOf(participatingInfos.get(i).getDelFlag());
+                        dataList[i][2] = String.valueOf(participatingInfos.get(i).getUpdateTime());
+                        dataList[i][3] = String.valueOf(participatingInfos.get(i).getUpdateUser());
+                        dataList[i][4] = String.valueOf(participatingInfos.get(i).getCreateTime());
+                        dataList[i][5] = String.valueOf(participatingInfos.get(i).getCreateUser());
+                        dataList[i][6] = String.valueOf(participatingInfos.get(i).getUserId());
+                        dataList[i][7] = String.valueOf(participatingInfos.get(i).getCompetitionId());
+                        dataList[i][8] = String.valueOf(participatingInfos.get(i).getPoints());
+                        dataList[i][9] = String.valueOf(participatingInfos.get(i).getBonus());
+                        dataList[i][10] = String.valueOf(participatingInfos.get(i).getReceived());
+                    }
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+                columnNumber, columnWidth, columnName, dataList, response);
+    }
+    /*generatedEnd*/
+}
+

+ 1 - 1
src/main/java/com/izouma/awesomeadmin/web/PlayerInfoController.java

@@ -251,7 +251,7 @@ public class PlayerInfoController {
             dataList[i][7] = String.valueOf(playerInfos.get(i).getHouseId());
             dataList[i][8] = String.valueOf(playerInfos.get(i).getJoinTime());
             dataList[i][9] = String.valueOf(playerInfos.get(i).getPrincipal());
-            dataList[i][10] = String.valueOf(playerInfos.get(i).getBonus());
+            dataList[i][10] = String.valueOf(playerInfos.get(i).getPoints());
             dataList[i][11] = String.valueOf(playerInfos.get(i).getUserId());
             dataList[i][12] = String.valueOf(playerInfos.get(i).getRemark());
             dataList[i][13] = String.valueOf(playerInfos.get(i).getImage());

+ 0 - 1
src/main/java/io/rong/util/HttpUtil.java

@@ -50,7 +50,6 @@ public class HttpUtil {
 
 			@Override
 			public boolean verify(String arg0, SSLSession arg1) {
-				// TODO Auto-generated method stub
 				return true;
 			}
 

+ 1 - 1
src/main/resources/spring/appWebService.xml

@@ -27,7 +27,7 @@
 	<task:annotation-driven/> <!-- 定时器开关-->
 
 	<!--自动开始房间定时任务-->
-	<bean id="houseInfoTask" class="com.izouma.awesomeadmin.web.HouseInfoController"></bean>
+	<bean id="houseInfoTask" class="com.izouma.awesomeadmin.web.HouseInfoController"/>
 
 	<task:scheduled-tasks>
 		<task:scheduled ref="houseInfoTask" method="autoBegin" cron="0 0/1 * * * ? "/>

+ 133 - 0
src/main/vue/src/components/GenOptionsDialog.vue

@@ -0,0 +1,133 @@
+<template>
+    <el-dialog
+        title="编辑选项"
+        :visible.sync="show"
+        width="500px">
+        <el-table :data="options" size="small">
+            <el-table-column label="名称" prop="label">
+                <template slot-scope="{row}">
+                    <el-input v-model="row.label" size="small"></el-input>
+                </template>
+            </el-table-column>
+            <el-table-column label="值" prop="value">
+                <template slot-scope="{row}">
+                    <el-input v-model="row.value" size="small"></el-input>
+                </template>
+            </el-table-column>
+            <el-table-column label="类型">
+                <template slot-scope="{row}">
+                    <el-select v-model="row.type" size="small">
+                        <el-option label="字符串" value="string"></el-option>
+                        <el-option label="数字" value="number"></el-option>
+                        <el-option label="布尔" value="boolean"></el-option>
+                    </el-select>
+                </template>
+            </el-table-column>
+            <el-table-column>
+                <template slot-scope="{$index}">
+                    <el-button @click="del($index)" size="small" type="text">删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <el-button @click="add" type="text" icon="el-icon-plus" size="small">添加</el-button>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="show = false" size="small">取 消</el-button>
+            <el-button type="primary" @click="confirm" size="small">确 定</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+    export default {
+        name: "GenOptionsDialog",
+        props: {
+            visible: {
+                required: true,
+                type: Boolean
+            },
+            value: {}
+        },
+        created() {
+            this.show = this.visible;
+            this.update();
+        },
+        data() {
+            return {
+                show: false,
+                options: [{
+                    label: '',
+                    value: '',
+                    type: 'string'
+                }]
+            }
+        },
+        methods: {
+            update() {
+                if (this.value) {
+                    let arr = [];
+                    JSON.parse(this.value).forEach(item => {
+                        let value = (item.value).toString(), type = typeof item.value, label = item.label;
+                        arr.push({
+                            label,
+                            value,
+                            type
+                        })
+                    });
+                    this.options = arr;
+                }
+            },
+            confirm() {
+                let arr = [];
+                for (let i = 0; i < this.options.length; i++) {
+                    if (!this.options[i].label || !this.options[i].value) {
+                        return;
+                    }
+                    let label = this.options[i].label;
+                    let value;
+                    switch (this.options[i].type) {
+                        case 'string':
+                            value = (this.options[i].value).toString();
+                            break;
+                        case 'number':
+                            value = Number(this.options[i].value);
+                            break;
+                        case 'boolean':
+                            value = 'false' !== this.options[i].value;
+                            break;
+                    }
+                    arr.push({
+                        label: label,
+                        value: value
+                    });
+                }
+                this.$emit('input', JSON.stringify(arr));
+                this.$emit('update:visible', false);
+            },
+            add() {
+                this.options.push({
+                    label: '',
+                    value: '',
+                    type: 'string'
+                });
+            },
+            del(index) {
+                this.options.splice(index, 1);
+            }
+        },
+        watch: {
+            visible(val) {
+                this.show = val;
+            },
+            show(val) {
+                this.$emit('update:visible', val);
+            },
+            value() {
+                this.update();
+            }
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 160 - 0
src/main/vue/src/pages/ParticipatingInfo.vue

@@ -0,0 +1,160 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="120px" label-position="right" size="small"
+                 style="max-width: 500px;">
+            <el-form-item prop="userId" label="用户">
+                <el-input v-model="formData.userId" :disabled="'userId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="competitionId" label="比赛">
+                <el-input v-model="formData.competitionId" :disabled="'competitionId'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="points" label="积分">
+                <el-input v-model="formData.points" :disabled="'points'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="bonus" label="奖金">
+                <el-input v-model="formData.bonus" :disabled="'bonus'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item prop="received" label="已领取">
+                <el-input v-model="formData.received" :disabled="'received'==subColumn"></el-input>
+            </el-form-item>
+            <el-form-item>
+                <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
+                <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
+                <el-button @click="$router.go(-1)">取消</el-button>
+            </el-form-item>
+        </el-form>
+    </div>
+</template>
+<script>
+    import formValidator from '../formValidator'
+    import { mapState } from 'vuex'
+    import { format } from 'date-fns'
+    import zh from 'date-fns/locale/zh_cn'
+
+    export default {
+        name: 'ParticipatingInfo',
+        created() {
+
+            if (this.$route.query.column) {
+                this.subColumn = this.$route.query.column.split(',')[1];
+                this.subValue = this.$route.query.column.split(',')[0];
+            }
+
+            if (this.$route.query.id) {
+                this.$http.get({
+                    url: '/participatingInfo/getOne',
+                    data: {
+                        id: this.$route.query.id
+                    }
+                }).then(res => {
+                    if (res.success) {
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    this.formData = res.data;
+                        if (this.$route.query.column) {
+                            this.formData[this.subColumn] = this.subValue;
+                        }
+                    }
+                })
+            } else {
+                if (this.$route.query.column) {
+                    this.formData[this.subColumn] = this.subValue;
+                }
+            }
+
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        },
+        data() {
+            return {
+                saving: false,
+                formData: {
+                },
+                rules: {
+                },
+                subColumn: '',
+                subValue: '',
+            }
+        },
+        computed: {
+            ...mapState(['userInfo']),
+        },
+        methods: {
+            onSave() {
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        this.logicalValidate();
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            logicalValidate() {
+                let logicalData = {
+                };
+
+                if (JSON.stringify(logicalData) == '{}') {
+                    this.submit();
+                } else {
+                    this.$http.get({
+                        url: '/participatingInfo/getOne',
+                        data: logicalData
+                    }).then(res => {
+                        if (res.success) {
+                            let logicalFlag = true;
+                            if (res.data) {
+                                if (this.formData.id) {
+                                    if (res.data.id != this.formData.id) {
+                                        logicalFlag = false;
+                                    }
+                                } else {
+                                    logicalFlag = false;
+                                }
+                            }
+
+                            if (logicalFlag) {
+                                this.submit();
+                            } else {
+                                this.$message.warning('逻辑关键字:'+''+'验证失败')
+                            }
+
+                        } else {
+                            this.$message.warning('逻辑关键字:'+''+'验证失败')
+                        }
+                    });
+                }
+            },
+            submit() {
+                let data = {...this.formData};
+
+                                                                                                                                                                                                
+                this.$http.post({
+                    url: this.formData.id ? '/participatingInfo/update' : '/participatingInfo/save',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    } else {
+                        this.$message.warning('失败')
+                    }
+                });
+            },
+            onDelete() {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
+                    return this.$http.post({
+                        url: '/participatingInfo/del',
+                        data: { id: this.formData.id }
+                    })
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                }).catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+            },
+        }
+    }
+</script>
+<style lang="less" scoped>
+</style>

+ 472 - 0
src/main/vue/src/pages/ParticipatingInfos.vue

@@ -0,0 +1,472 @@
+<template>
+    <div>
+        <div class="filters-container">
+        
+            <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
+            <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
+            </el-button>
+            <el-button @click="showAdvancedQueryDialog = !showAdvancedQueryDialog" type="primary" size="small"
+                       icon="el-icon-search" class="filter-item">高级查询
+            </el-button>
+            <el-button @click="showTableSortDialog = !showTableSortDialog" type="primary" size="small"
+                       icon="el-icon-sort" class="filter-item">排序
+            </el-button>
+            <el-button @click="$router.push({path:'/participatingInfo',query:{column:$route.query.column}})" type="primary"
+                       size="small" icon="el-icon-edit"
+                       class="filter-item">添加
+            </el-button>
+            <el-button @click="exportExcel" type="primary" size="small" icon="el-icon-share" class="filter-item">导出EXCEL
+            </el-button>
+            <el-dropdown trigger="click" size="medium" class="table-column-filter">
+                <span>
+                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                </span>
+                <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
+                    <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
+                    </el-checkbox>
+                </el-dropdown-menu>
+            </el-dropdown>
+        </div>
+        <el-table
+                :data="tableData"
+                :height="tableHeight"
+                row-key="id"
+                ref="table">
+            <el-table-column
+                    v-if="multipleMode"
+                    align="center"
+                    type="selection"
+                    width="50">
+            </el-table-column>
+            <el-table-column
+                    type="index"
+                    min-width="50"
+                    align="center">
+            </el-table-column>
+                                                                                                                                                                                                    
+                                            <el-table-column
+                                v-if="isColumnShow('userId')"
+                                prop="userId"
+                                label="用户"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('competitionId')"
+                                prop="competitionId"
+                                label="比赛"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('points')"
+                                prop="points"
+                                label="积分"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('bonus')"
+                                prop="bonus"
+                                label="奖金"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('received')"
+                                prop="received"
+                                label="已领取"
+                                min-width="100">
+                        </el-table-column>
+                                                            <el-table-column
+                    label="操作"
+                    align="center"
+                    fixed="right"
+                    min-width="150"
+            >
+                <template slot-scope="scope">
+                                        <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <div class="multiple-mode-wrapper" v-if="0">
+                <el-button size="small" v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button size="small" @click="operation1">批量操作1</el-button>
+                    <el-button size="small" @click="operation2">批量操作2</el-button>
+                    <el-button size="small" @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div>
+            <el-pagination
+                    background
+                    @size-change="pageSizeChange"
+                    @current-change="currentPageChange"
+                    :current-page="currentPage"
+                    :page-sizes="[10, 20, 30, 40, 50]"
+                    :page-size="pageSize"
+                    layout="total, sizes, prev, pager, next, jumper"
+                    :total="totalNumber">
+            </el-pagination>
+        </div>
+        <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
+            <el-button @click="addField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="advancedQueryFields">
+
+                <el-table-column prop="link" label="链接符" align="center">
+                    <template slot-scope="{row}">
+                        <el-select placeholder="链接" size="small" v-model="row.link" class="filter-item">
+                            <el-option label="AND" value="AND">
+                            </el-option>
+                            <el-option label="OR" value="OR">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="searchMethod" label="搜索方式" width="150" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.searchMethod">
+                            <el-option v-for="item in searchMethods" :label="item" :value="item"
+                                       :key="item"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="value" label="参数" align="center">
+                    <template slot-scope="{row}">
+                        <el-input v-model="row.value"></el-input>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="advancedQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="排序" :visible.sync="showTableSortDialog">
+            <el-button @click="addSortField" type="text" icon="el-icon-plus">添加</el-button>
+            <el-table :data="tableSortFields">
+
+                <el-table-column prop="name" label="字段" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.name">
+
+                            <el-option v-for="item in advancedQueryColumns" :label="item.label" :value="item.value"
+                                       :key="item.value"></el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="order" label="排序" align="center">
+                    <template slot-scope="{row}">
+                        <el-select v-model="row.order">
+                            <el-option label="降序" value="desc">
+                            </el-option>
+                            <el-option label="升序" value="asc">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column width="60" align="center">
+                    <template slot-scope="{ row, column, $index }">
+                        <el-button @click="removeSortField($index)" size="small" type="text">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <span slot="footer" class="dialog-footer">
+
+                <el-button @click="tableSortQuery" :loading="$store.state.fetchingData">确定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog title="查看图片" :visible.sync="imageDialogVisible" size="small">
+            <img width="100%" :src="imgSrc" alt="">
+        </el-dialog>
+
+    </div>
+</template>
+<script>
+    import {mapState} from 'vuex'
+    import {format} from 'date-fns'
+    import zh from 'date-fns/locale/zh_cn'
+
+    export default {
+        name: 'ParticipatingInfos',
+        created() {
+            this.getData();
+        },
+        data() {
+            return {
+                totalNumber: 0,
+                totalPage: 10,
+                currentPage: 1,
+                pageSize: 20,
+                tableData: [],
+                filter1: '',
+                filter2: '',
+                tableColumns: [
+                                                                                                                                                                                                                                                                                                                                                {
+                                label: '用户',
+                                value: 'userId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '比赛',
+                                value: 'competitionId',
+                                show: true
+                            },
+                                                                                                {
+                                label: '积分',
+                                value: 'points',
+                                show: true
+                            },
+                                                                                                {
+                                label: '奖金',
+                                value: 'bonus',
+                                show: true
+                            },
+                                                                                                {
+                                label: '已领取',
+                                value: 'received',
+                                show: true
+                            },
+                                                            ],
+                multipleMode: false,
+                showAdvancedQueryDialog: false,
+                advancedQueryFields: [],
+                showTableSortDialog: false,
+                tableSortFields: [],
+                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+                advancedQueryColumns: [
+                                                                                                                                                                                                                                                                                                                                                {
+                                label: '用户',
+                                value: 'user_id'
+                            },
+                                                                                                {
+                                label: '比赛',
+                                value: 'competition_id'
+                            },
+                                                                                                {
+                                label: '积分',
+                                value: 'points'
+                            },
+                                                                                                {
+                                label: '奖金',
+                                value: 'bonus'
+                            },
+                                                                                                {
+                                label: '已领取',
+                                value: 'received'
+                            },
+                                                            ],
+                advancedQuerySearchKey: '',
+                orderByStr: '',
+                imgSrc: '',
+                imageDialogVisible: false,
+            }
+        },
+        computed: {
+            ...mapState(['tableHeight']),
+            selection() {
+                return this.$refs.table.selection.map(i => i.id);
+            }
+        },
+        methods: {
+            pageSizeChange(size) {
+                this.currentPage = 1;
+                this.pageSize = size;
+                this.getData();
+            },
+            currentPageChange(page) {
+                this.currentPage = page;
+                this.getData();
+            },
+            getData() {
+
+                var data = {
+                    currentPage: this.currentPage,
+                    pageNumber: this.pageSize,
+                    searchKey: this.filter1,
+                    advancedQuery: this.advancedQuerySearchKey,
+                    orderByStr: this.orderByStr,
+                }
+
+                if (this.$route.query.column) {
+                    var tempColumn = this.$route.query.column;
+                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
+                }
+
+                this.$http.get({
+                    url: '/participatingInfo/page',
+                    data: data
+                }).then(res => {
+                    if (res.success) {
+                        this.totalNumber = res.data.page.totalNumber;
+                        this.tableData = res.data.pp;
+                    }
+                })
+            },
+            isColumnShow(column) {
+                var row = this.tableColumns.find(i => i.value === column);
+                return row ? row.show : false;
+            },
+            toggleMultipleMode(multipleMode) {
+                this.multipleMode = multipleMode;
+                if (!multipleMode) {
+                    this.$refs.table.clearSelection();
+                }
+            },
+            editRow(row) {
+                this.$router.push({
+                    path: '/participatingInfo',
+                    query: {
+                        id: row.id,
+                        column: this.$route.query.column,
+                    }
+                })
+            },
+            operation1() {
+                this.$notify({
+                    title: '提示',
+                    message: this.selection
+                });
+            },
+            operation2() {
+                this.$message('操作2');
+            },
+            addField() {
+                this.advancedQueryFields.push({
+                    link: 'AND',
+                    name: '',
+                    searchMethod: '=',
+                    value: '',
+                });
+            },
+            removeField(i) {
+                if (this.advancedQueryFields.length > 0) {
+                    this.advancedQueryFields.splice(i, 1);
+                }
+            },
+            advancedQuery() {
+
+                this.advancedQuerySearchKey = '';
+
+                if (this.advancedQueryFields.length > 0) {
+
+                    var templist = [];
+
+                    this.advancedQueryFields.forEach(item => {
+                        if (item.link && item.name && item.searchMethod && item.value) {
+                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                            templist.push(tempItem);
+                        }
+                    })
+
+                    if (templist.length > 0) {
+
+                        this.advancedQuerySearchKey = templist.join('_;');
+                    }
+                }
+
+                this.getData();
+                this.showAdvancedQueryDialog = false;
+            },
+            addSortField() {
+                this.tableSortFields.push({
+                    name: '',
+                    order: 'asc',
+                });
+            },
+            removeSortField(i) {
+                if (this.tableSortFields.length > 0) {
+                    this.tableSortFields.splice(i, 1);
+                }
+            },
+            tableSortQuery() {
+
+                this.orderByStr = '';
+
+                if (this.tableSortFields.length > 0) {
+
+                    var templist = [];
+
+                    this.tableSortFields.forEach(item => {
+                        if (item.name && item.order) {
+                            var tempItem = item.name + '_,' + item.order;
+                            templist.push(tempItem);
+                        }
+                    })
+
+                    if (templist.length > 0) {
+
+                        this.orderByStr = templist.join('_;');
+                    }
+                }
+
+                this.getData();
+                this.showTableSortDialog = false;
+            },
+            exportExcel() {
+                window.location.href = this.$baseUrl + "/participatingInfo/exportExcel?searchKey="
+                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
+            },
+            searchData() {
+                this.currentPage = 1;
+                this.getData();
+            },
+            deleteRow(row) {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+                    return this.$http.post({
+                        url: '/participatingInfo/del',
+                        data: {id: row.id}
+                    })
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                }).catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                })
+            },
+            DateTimeFormatter(row, column, cellValue) {
+                if (cellValue) {
+                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
+                }
+
+            },
+            DateFormatter(row, column, cellValue) {
+                if (cellValue) {
+                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
+                }
+
+            },
+            showImg(img) {
+                this.imgSrc = img;
+                this.imageDialogVisible = true;
+            },
+
+        }
+    }
+</script>
+<style lang="less" scoped>
+
+</style>

+ 10 - 0
src/main/vue/src/router/index.js

@@ -391,6 +391,16 @@ const router = new Router({
                     path: '/competitions',
                     name: 'Competitions',
                     component: () => import('../pages/Competitions')
+                },
+                {
+                    path: '/participatingInfo',
+                    name: 'ParticipatingInfo',
+                    component: () => import('../pages/ParticipatingInfo')
+                },
+                {
+                    path: '/participatingInfos',
+                    name: 'ParticipatingInfos',
+                    component: () => import('../pages/ParticipatingInfos')
                 }
                 /**INSERT_LOCATION**/
         ]