suochencheng 6 лет назад
Родитель
Сommit
a547132417

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/AlertMessageMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.AlertMessage;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.AlertMessageMapper")
+public interface AlertMessageMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(AlertMessage record);
+
+    AlertMessage selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(AlertMessage record);
+
+    List<AlertMessage> queryAllAlertMessage(AlertMessage record);
+
+    List<AlertMessage> queryAlertMessageByPage(Map<String, Object> parameter);
+
+    int delete(AlertMessage record);
+
+    AlertMessage queryAlertMessage(AlertMessage record);
+
+    List<AlertMessage> query(AlertMessage record);
+}
+

+ 367 - 0
src/main/java/com/izouma/awesomeadmin/dao/AlertMessageMapper.xml

@@ -0,0 +1,367 @@
+<?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.AlertMessageMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.AlertMessage" >
+                <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="name" property="name" jdbcType="VARCHAR" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            name,
+
+            remark,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from alert_message
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from alert_message
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.AlertMessage" useGeneratedKeys="true" keyProperty="id">
+        insert into alert_message
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <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="name!= null" >
+                name,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <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="name != null" >
+                #{name,jdbcType=VARCHAR},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.AlertMessage" >
+        update alert_message
+        <set >
+                    <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="name != null" >
+               name= #{name,jdbcType=VARCHAR},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                 </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="queryAlertMessageByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.AlertMessage">
+        select <include refid="Base_Column_List"/> from alert_message
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+                    <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.name != null and !&quot;&quot;.equals(record.name)">
+                and  name = #{record.name}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  name LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                             </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="queryAllAlertMessage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.AlertMessage">
+        select <include refid="Base_Column_List"/> from alert_message
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+                    <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="name != null and !&quot;&quot;.equals(name)">
+                and  name = #{name}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  name LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                        </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="queryAlertMessage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.AlertMessage">
+        select <include refid="Base_Column_List"/> from alert_message
+        <where>
+            and del_flag = 'N'
+                    <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="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE alert_message 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.AlertMessage">
+        select <include refid="Base_Column_List"/> from alert_message
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 22 - 0
src/main/java/com/izouma/awesomeadmin/dao/HouseInfoMapper.xml

@@ -30,6 +30,7 @@
         <result column="season_id" property="seasonId" jdbcType="INTEGER"/>
         <result column="video" property="video" jdbcType="VARCHAR"/>
         <result column="max_number" property="maxNumber" jdbcType="INTEGER"/>
+        <result column="score_type" property="scoreType" jdbcType="INTEGER"/>
     </resultMap>
     <sql id="Base_Column_List">
         <trim suffixOverrides=",">
@@ -89,6 +90,8 @@
 
             max_number,
 
+            score_type,
+
         </trim>
     </sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
@@ -195,6 +198,9 @@
             <if test="maxNumber!= null">
                 max_number,
             </if>
+            <if test="scoreType!= null">
+                score_type,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -281,6 +287,9 @@
             <if test="maxNumber != null">
                 #{maxNumber,jdbcType=INTEGER},
             </if>
+            <if test="scoreType != null">
+                #{scoreType,jdbcType=INTEGER},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.HouseInfo">
@@ -370,6 +379,9 @@
             <if test="maxNumber != null">
                 max_number= #{maxNumber,jdbcType=INTEGER},
             </if>
+            <if test="scoreType != null">
+                score_type= #{scoreType,jdbcType=INTEGER},
+            </if>
         </set>
         where
         <if test="id != null and !&quot;&quot;.equals(id)">
@@ -485,6 +497,9 @@
             <if test="record.video != null and !&quot;&quot;.equals(record.video)">
                 and video = #{record.video}
             </if>
+            <if test="record.scoreType != null and !&quot;&quot;.equals(record.scoreType)">
+                and score_type = #{record.scoreType}
+            </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},'%')
@@ -644,6 +659,10 @@
                 and video = #{video}
             </if>
 
+            <if test="scoreType != null and !&quot;&quot;.equals(scoreType)">
+                and score_type = #{scoreType}
+            </if>
+
             <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
                     OR house_name LIKE concat('%',#{searchKey},'%')
@@ -797,6 +816,9 @@
                 and video = #{video}
             </if>
 
+            <if test="scoreType != null and !&quot;&quot;.equals(scoreType)">
+                and score_type = #{scoreType}
+            </if>
         </where>
         LIMIT 1
     </select>

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

@@ -29,6 +29,7 @@
         <result column="game_type" property="gameType" jdbcType="VARCHAR"/>
         <result column="season_id" property="seasonId" jdbcType="INTEGER"/>
         <result column="house_rank" property="houseRank" jdbcType="INTEGER"/>
+        <result column="score" property="score" jdbcType="INTEGER"/>
     </resultMap>
     <sql id="Base_Column_List">
         <trim suffixOverrides=",">
@@ -86,6 +87,8 @@
 
             house_rank,
 
+            score,
+
         </trim>
     </sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
@@ -183,6 +186,9 @@
             <if test="houseRank!= null">
                 house_rank,
             </if>
+            <if test="score!= null">
+                score,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -266,6 +272,9 @@
             <if test="houseRank != null">
                 #{houseRank,jdbcType=INTEGER},
             </if>
+            <if test="score != null">
+                #{score,jdbcType=INTEGER},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.PlayerInfo">
@@ -352,6 +361,9 @@
             <if test="houseRank != null">
                 house_rank= #{houseRank,jdbcType=INTEGER},
             </if>
+            <if test="score != null">
+                score= #{score,jdbcType=INTEGER},
+            </if>
         </set>
         where
         <if test="id != null and !&quot;&quot;.equals(id)">
@@ -678,6 +690,9 @@
 
         </where>
         order by
+        <if test="record.scoreType != null and !&quot;&quot;.equals(record.scoreType)">
+            IFNULL(score,0) desc,
+        </if>
         IFNULL(ranking,999) ,
         IFNULL(live_time,999) ,
         id desc
@@ -1145,15 +1160,24 @@
         player_info AS user_rank
         <where>
             AND player_info.del_flag = 'N'
-            <![CDATA[
+
             AND (
-                IFNULL(player_info.ranking, 999) < IFNULL(user_rank.ranking, 999)
+            <if test="scoreType != null and !&quot;&quot;.equals(scoreType)">
+                (IFNULL(player_info.score, 0) > IFNULL(user_rank.score, 0))
+                OR ( (IFNULL(player_info.score, 0) = IFNULL(user_rank.score, 0)) AND
+            </if>
+            <![CDATA[
+               ( IFNULL(player_info.ranking, 999) < IFNULL(user_rank.ranking, 999)
                 OR (
                     IFNULL(player_info.ranking, 999) = IFNULL(user_rank.ranking, 999)
                     AND IFNULL(player_info.live_time, 999) < IFNULL(user_rank.live_time, 999)
+                ))
+
+            ]]>
+            <if test="scoreType != null and !&quot;&quot;.equals(scoreType)">
                 )
+            </if>
             )
-            ]]>
             AND user_rank.house_id = player_info.house_id
             AND user_rank.game_id = player_info.game_id
             AND user_rank.house_id = player_info.house_id
@@ -1360,15 +1384,19 @@
     <select id="querySettlementPlayer" parameterType="java.util.Map"
             resultType="com.izouma.awesomeadmin.model.PlayerInfo">
         SELECT
-            *
+        *
         FROM
-            player_info
+        player_info
         WHERE
-            del_flag = 'N'
+        del_flag = 'N'
         AND status_flag IN (3, 7 , 8, 9)
         AND house_id = #{houseId}
 
         order by
+        <if test="scoreType != null and !&quot;&quot;.equals(scoreType)">
+            IFNULL(score,0) desc,
+        </if>
+
         IFNULL(ranking,999) ,
         IFNULL(live_time,999) ,
         id desc

+ 25 - 1
src/main/java/com/izouma/awesomeadmin/dao/UserInfoMapper.xml

@@ -33,6 +33,7 @@
         <result column="approve_step" property="approveStep" jdbcType="INTEGER"/>
         <result column="notice_flag" property="noticeFlag" jdbcType="CHAR"/>
         <result column="remind_flag" property="remindFlag" jdbcType="CHAR"/>
+        <result column="create_flag" property="createFlag" jdbcType="CHAR"/>
         <association property="departId" javaType="string" column="id"
                      select="com.izouma.awesomeadmin.dao.DepartInfoMapper.getUserDepartId"/>
         <association property="roleId" javaType="string" column="id"
@@ -42,7 +43,8 @@
         id, username, nickname, icon, birthday, sex, open_id, union_id, phone, mail,
         country, province, city, district, create_time, del_flag, money_coin, money_point,
         contacter, contact_phone, company_name, company_type, admin_flag, cash_pledge,
-        approve_flag, store_flag, company_flag, approve_step, notice_flag, remind_flag
+        approve_flag, store_flag, company_flag, approve_step, notice_flag, remind_flag,
+        create_flag
     </sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
         select
@@ -155,6 +157,9 @@
             <if test="remindFlag != null">
                 remind_flag,
             </if>
+            <if test="createFlag != null">
+                create_flag,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -253,6 +258,9 @@
             <if test="remindFlag != null">
                 #{remindFlag},
             </if>
+            <if test="createFlag != null">
+                #{createFlag},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.UserInfo">
@@ -351,6 +359,9 @@
             <if test="remindFlag != null">
                 remind_flag = #{remindFlag},
             </if>
+            <if test="createFlag != null">
+                create_flag = #{createFlag},
+            </if>
         </set>
         where id = #{id,jdbcType=INTEGER}
     </update>
@@ -445,6 +456,9 @@
             <if test="record.approveStep != null and !&quot;&quot;.equals(record.approveStep)">
                 and approve_step = #{record.approveStep}
             </if>
+            <if test="record.createFlag != null and !&quot;&quot;.equals(record.createFlag)">
+                and create_flag = #{record.createFlag}
+            </if>
 
             <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
@@ -550,6 +564,10 @@
                 and approve_step = #{approveStep}
             </if>
 
+            <if test="createFlag != null and !&quot;&quot;.equals(createFlag)">
+                and create_flag = #{createFlag}
+            </if>
+
             <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
                     OR nickname LIKE concat('%',#{searchKey},'%')
@@ -622,6 +640,9 @@
             <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                 and del_flag = #{delFlag}
             </if>
+            <if test="createFlag != null and !&quot;&quot;.equals(createFlag)">
+                and create_flag = #{createFlag}
+            </if>
         </where>
         LIMIT 1
     </select>
@@ -685,6 +706,9 @@
             <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
                 and del_flag = #{delFlag}
             </if>
+            <if test="createFlag != null and !&quot;&quot;.equals(createFlag)">
+                and create_flag = #{createFlag}
+            </if>
         </where>
         LIMIT 1
     </select>

+ 124 - 0
src/main/java/com/izouma/awesomeadmin/model/AlertMessage.java

@@ -0,0 +1,124 @@
+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 AlertMessage{
+    private Integer id;
+    private String delFlag;
+    private Date updateTime;
+    private String updateUser;
+    private Date createTime;
+    private String createUser;
+    private String name;
+    private String remark;
+
+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;
+
+    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 String getName(){
+        return this.name;
+    }
+
+    public void setName(String name){
+        this.name = name;
+    }
+    public String getRemark(){
+        return this.remark;
+    }
+
+    public void setRemark(String remark){
+        this.remark = remark;
+    }
+
+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;
+}
+
+}
+

+ 13 - 0
src/main/java/com/izouma/awesomeadmin/model/HouseInfo.java

@@ -38,6 +38,11 @@ public class HouseInfo {
     private Integer seasonId;
     private String video;
 
+    /**
+     * 评分方式,0 为吃鸡,1为 评分
+     */
+    private Integer scoreType;
+
     private String idStr;
 
     private String statusStr;
@@ -339,5 +344,13 @@ public class HouseInfo {
     public void setStatusStr(String statusStr) {
         this.statusStr = statusStr;
     }
+
+    public Integer getScoreType() {
+        return scoreType;
+    }
+
+    public void setScoreType(Integer scoreType) {
+        this.scoreType = scoreType;
+    }
 }
 

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

@@ -41,6 +41,9 @@ public class PlayerInfo {
 
     private Integer rank;
 
+    private Integer score;
+
+    private Integer scoreType;
 
     private UserInfo userInfo;
 
@@ -62,6 +65,7 @@ public class PlayerInfo {
      */
     private String orderByStr;
 
+
     public Integer getId() {
         return this.id;
     }
@@ -341,5 +345,21 @@ public class PlayerInfo {
     public void setGameInfo(GameInfo gameInfo) {
         this.gameInfo = gameInfo;
     }
+
+    public Integer getScore() {
+        return score;
+    }
+
+    public void setScore(Integer score) {
+        this.score = score;
+    }
+
+    public Integer getScoreType() {
+        return scoreType;
+    }
+
+    public void setScoreType(Integer scoreType) {
+        this.scoreType = scoreType;
+    }
 }
 

+ 11 - 0
src/main/java/com/izouma/awesomeadmin/model/UserInfo.java

@@ -81,6 +81,8 @@ public class UserInfo {
 
     private String searchKey;
 
+    private String createFlag;
+
 
     public String getDepartId() {
         return departId;
@@ -353,5 +355,14 @@ public class UserInfo {
     public void setSearchKey(String searchKey) {
         this.searchKey = searchKey;
     }
+
+
+    public String getCreateFlag() {
+        return createFlag;
+    }
+
+    public void setCreateFlag(String createFlag) {
+        this.createFlag = createFlag;
+    }
 }
 

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/service/AlertMessageService.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.service;
+
+import java.util.*;
+import com.izouma.awesomeadmin.dto.Page;
+import com.izouma.awesomeadmin.model.AlertMessage;
+
+
+/**
+*  service接口类
+*/
+public interface AlertMessageService{
+
+    List<AlertMessage> getAlertMessageList(AlertMessage record);
+
+    List<AlertMessage> getAlertMessageByPage(Page page, AlertMessage record);
+
+    AlertMessage getAlertMessageById(String id);
+
+    AlertMessage getAlertMessage(AlertMessage record);
+
+    boolean createAlertMessage(AlertMessage record);
+
+    boolean deleteAlertMessage(AlertMessage record);
+
+    boolean updateAlertMessage(AlertMessage record);
+}
+

+ 137 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/AlertMessageServiceImpl.java

@@ -0,0 +1,137 @@
+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.AlertMessage;
+import com.izouma.awesomeadmin.service.AlertMessageService;
+import com.izouma.awesomeadmin.dao.AlertMessageMapper;
+
+/**
+*  service接口实现类
+*/
+@Service
+public class AlertMessageServiceImpl implements AlertMessageService{
+
+    private static Logger logger = Logger.getLogger(AlertMessageServiceImpl.class);
+
+    @Autowired
+    private AlertMessageMapper alertMessageMapper;
+
+    @Override
+    public List<AlertMessage> getAlertMessageList(AlertMessage record) {
+
+        logger.info("getAlertMessageList");
+        try {
+
+        return alertMessageMapper.queryAllAlertMessage(record);
+        } catch (Exception e) {
+        logger.error("getAlertMessageList", e);
+        }
+
+        return null;
+    }
+    @Override
+    public List<AlertMessage> getAlertMessageByPage(Page page, AlertMessage record) {
+
+        logger.info("getAlertMessageByPage");
+        try {
+
+        Map<String, Object> parameter = new HashMap<String, Object>();
+        parameter.put("record", record);
+        parameter.put(AppConstant.PAGE, page);
+
+        return alertMessageMapper.queryAlertMessageByPage(parameter);
+        } catch (Exception e) {
+        logger.error("getAlertMessageByPage", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public AlertMessage getAlertMessageById(String id) {
+
+        logger.info("getAlertMessageyId");
+        try {
+
+            return alertMessageMapper.selectByPrimaryKey(Integer.valueOf(id));
+        } catch (Exception e) {
+        logger.error("getAlertMessageById", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public AlertMessage getAlertMessage(AlertMessage record) {
+
+        logger.info("getAlertMessage");
+        try {
+
+            return alertMessageMapper.queryAlertMessage(record);
+        } catch (Exception e) {
+        logger.error("getAlertMessage", e);
+        }
+
+        return null;
+    }
+
+    @Override
+    public boolean createAlertMessage(AlertMessage record) {
+
+        logger.info("createAlertMessage");
+        try {
+
+            int updates = alertMessageMapper.insertSelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+            logger.error("createAlertMessage", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean deleteAlertMessage(AlertMessage record) {
+
+        logger.info("deleteAlertMessage");
+        try {
+
+             int updates = alertMessageMapper.delete(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("deleteAlertMessage", e);
+        }
+
+        return false;
+    }
+
+    @Override
+    public boolean updateAlertMessage(AlertMessage record) {
+
+        logger.info("updateAlertMessage");
+        try {
+
+            int updates = alertMessageMapper.updateByPrimaryKeySelective(record);
+
+            if (updates > 0) {
+                 return true;
+            }
+        } catch (Exception e) {
+             logger.error("updateAlertMessage", e);
+        }
+
+        return false;
+    }
+}
+

+ 64 - 28
src/main/java/com/izouma/awesomeadmin/service/impl/HouseInfoServiceImpl.java

@@ -216,7 +216,11 @@ public class HouseInfoServiceImpl implements HouseInfoService {
 
 
                     PlayerInfo param = new PlayerInfo();
+                    if (houseInfo.getScoreType() > 0) {
+                        param.setScoreType(1);
+                    }
                     param.setHouseId(record.getId());
+
                     List<PlayerInfo> playerInfoList = playerInfoService.getSettlementPlayer(param);
 
                     if (CollectionUtils.isNotEmpty(playerInfoList)) {
@@ -226,40 +230,72 @@ public class HouseInfoServiceImpl implements HouseInfoService {
                             BigDecimal bonus = BigDecimal.ZERO;
                             String content = "";
                             int typeFlag = AppConstant.NoticeType.RECEIVE;
-                            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());
-                                }
+                            if (AppConstant.PlayerStatus.PROCESSED_FAIL == playerInfo.getStatusFlag()) {
 
-                                content = "恭喜你,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                        + "开始的游戏竞赛 " + houseInfo.getHouseName() + "获得了第" + playerInfo.getHouseRank()
-                                        + "名,获得" + bonus + "积分,赶快领取你的奖励吧。";
+                                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 (AppConstant.PlayerStatus.PROCESSED_FAIL == playerInfo.getStatusFlag()) {
-
-                                    content = "很遗憾,你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                            + "开始的游戏竞赛 " + houseInfo.getHouseName()
-                                            + ",未解析到结果,无法获得奖励。";
-                                } else if (AppConstant.PlayerStatus.OVERTIME == playerInfo.getStatusFlag()) {
-                                    content = "很遗憾,你在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                            + "开始的游戏竞赛 " + houseInfo.getHouseName()
-                                            + ",比赛超时,无法获得奖励。";
+                                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 {
-                                    content = "恭喜你,在" + DateTimeTool.dateTimeToTimeYYYYHHmmStr(houseInfo.getBeginTime())
-                                            + "开始的游戏竞赛 " + houseInfo.getHouseName() + "获得了第" + playerInfo.getHouseRank()
-                                            + "名,但未能吃鸡,因此无法获得奖励。";
+                                    if (playerInfo.getScore() != null && playerInfo.getScore() > 0) {//只有评分大于0才能获得奖励
+
+                                        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;
+                                    }
                                 }
-                                typeFlag = AppConstant.NoticeType.RESULT;
                             }
+
+
                             playerInfo.setBonus(bonus);
 
 

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

@@ -197,11 +197,11 @@ public class UserInfoServiceImpl implements UserInfoService {
 
     private boolean updateUserRolesAndDeparts(UserInfo record, int updates) {
         if (updates > 0) {
-            if (record.getDepartId() != null) {
+            if (StringUtils.isNotEmpty(record.getDepartId())) {
                 departInfoMapper.clearUserDeparts(record.getId());
                 departInfoMapper.setUserDeparts(record.getId(), Arrays.asList(record.getDepartId().split(",")));
             }
-            if (record.getRoleId() != null) {
+            if (StringUtils.isNotEmpty(record.getRoleId())) {
                 sysRoleMapper.clearUserRoles(record.getId());
                 sysRoleMapper.setUserRoles(record.getId(), Arrays.asList(record.getRoleId().split(",")));
             }

+ 159 - 0
src/main/java/com/izouma/awesomeadmin/web/AlertMessageController.java

@@ -0,0 +1,159 @@
+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.AlertMessage;
+import com.izouma.awesomeadmin.service.AlertMessageService;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+*  controller类
+*/
+@Controller
+@RequestMapping("/alertMessage")
+public class AlertMessageController {
+
+    @Autowired
+    private AlertMessageService alertMessageService;
+
+    /**
+    * <p>获取全部记录。</p>
+    */
+    @RequiresAuthentication
+    @RequestMapping(value = "/all", method = RequestMethod.GET)
+    @ResponseBody
+    public Result all(AlertMessage record) {
+        List<AlertMessage> pp = alertMessageService.getAlertMessageList(record);
+        return new Result(true, pp);
+    }
+
+    /**
+    * <p>根据Id。</p>
+    */
+    @RequestMapping(value = "/getAlertMessage", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getAlertMessage(@RequestParam(required = false, value = "id") String id) {
+        AlertMessage data = alertMessageService.getAlertMessageById(id);
+        return new Result(true, data);
+    }
+
+    /**
+    * <p>根据条件获取。</p>
+    */
+    @RequestMapping(value = "/getOne", method = RequestMethod.GET)
+    @ResponseBody
+    public Result getOne(AlertMessage record) {
+        AlertMessage data = alertMessageService.getAlertMessage(record);
+        return new Result(true, data);
+    }
+
+
+    /**
+    * <p>分页查询。</p>
+    */
+    @RequestMapping(value = "/page", method = RequestMethod.GET)
+    @ResponseBody
+    public Result page(Page page, AlertMessage record) {
+        Map<String, Object> result = new HashMap<>();
+
+        List<AlertMessage> pp =alertMessageService.getAlertMessageByPage(page, record);
+
+        result.put(AppConstant.PAGE, page);
+        result.put("pp", pp);
+        return new Result(true, result);
+    }
+
+
+    /**
+    * <p>保存。</p>
+    */
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @ResponseBody
+    public Result save(AlertMessage record) {
+        boolean num = alertMessageService.createAlertMessage(record);
+        if (num) {
+        return new Result(true, record.getId());
+        }
+        return new Result(false, "保存异常");
+    }
+
+    /**
+    * <p>更新信息。</p>
+    */
+    @RequestMapping(value = "/update", method = RequestMethod.POST)
+    @ResponseBody
+    public Result updateAlertMessage(AlertMessage record) {
+        boolean num = alertMessageService.updateAlertMessage(record);
+        if (num) {
+        return new Result(true, "保存成功");
+        }
+        return new Result(false, "保存异常");
+    }
+
+    /**
+    * <p>删除。</p>
+    */
+    @RequestMapping(value = "/del", method = RequestMethod.POST)
+    @ResponseBody
+    public Result deleteAlertMessage(AlertMessage record) {
+
+        boolean num = alertMessageService.deleteAlertMessage(record);
+        if (num) {
+        return new Result(true, "删除成功");
+        }
+        return new Result(false, "删除异常");
+    }
+
+    /**
+    * 导出Excel
+    * @param request
+    * @param response
+    * @param record
+    * @throws Exception
+    */
+    @RequestMapping(value = "/exportExcel", method = RequestMethod.GET)
+    @ResponseBody
+    public void exportExcel(HttpServletRequest request, HttpServletResponse response, AlertMessage record) throws Exception {
+
+    List<AlertMessage> alertMessages = alertMessageService.getAlertMessageList(record);
+
+
+        String sheetName = "alert_message";
+        String titleName = "弹出窗口数据表";
+        String fileName = "弹出窗口表";
+        int columnNumber = 8;
+        int[] columnWidth = { 20,  20,  20,  20,  20,  20,  20,  20 };
+        String[] columnName = {  "ID" ,   "删除标识" ,   "更新时间" ,   "更新人" ,   "创建时间" ,   "创建人" ,   "名称" ,   "内容"  };
+        String[][] dataList = new String[alertMessages.size()][8];
+
+        for (int i = 0; i < alertMessages.size(); i++) {
+
+                        dataList[i][0] = String.valueOf(alertMessages.get(i).getId());
+                        dataList[i][1] = String.valueOf(alertMessages.get(i).getDelFlag());
+                        dataList[i][2] = String.valueOf(alertMessages.get(i).getUpdateTime());
+                        dataList[i][3] = String.valueOf(alertMessages.get(i).getUpdateUser());
+                        dataList[i][4] = String.valueOf(alertMessages.get(i).getCreateTime());
+                        dataList[i][5] = String.valueOf(alertMessages.get(i).getCreateUser());
+                        dataList[i][6] = String.valueOf(alertMessages.get(i).getName());
+                        dataList[i][7] = String.valueOf(alertMessages.get(i).getRemark());
+                    }
+
+
+        ExportExcelUtil.ExportWithResponse(sheetName, titleName, fileName,
+        columnNumber, columnWidth, columnName, dataList, response);
+
+
+        }
+    }
+

+ 108 - 0
src/main/vue/src/pages/AlertMessage.vue

@@ -0,0 +1,108 @@
+<template>
+    <div>
+        <el-form :model="formData" :rules="rules" ref="form" label-width="80px" label-position="right" size="small"
+                 style="max-width: 500px;">
+                                                                                                                                                                                                                                    <el-form-item prop="name" label="名称">
+                <el-input v-model="formData.name" :disabled="'name'==subColumn"></el-input>
+            </el-form-item>
+                                                                                                                                                                                                                                                                                                                            <el-form-item prop="remark" label="内容">
+                <el-input v-model="formData.remark" :disabled="'remark'==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'
+
+    export default {
+        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: '/alertMessage/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: '',
+        }
+        },
+        methods: {
+            onSave() {
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        this.submit();
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            submit() {
+                var data = JSON.parse(JSON.stringify(this.formData));
+                this.$http.post({
+                    url: this.formData.id ? '/alertMessage/update' : '/alertMessage/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: '/alertMessage/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>

+ 439 - 0
src/main/vue/src/pages/AlertMessages.vue

@@ -0,0 +1,439 @@
+<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:'/alertMessage',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('id')"
+                                prop="id"
+                                label="ID"
+                                min-width="100">
+                        </el-table-column>
+                                                                                                                                                                                                            
+                                            <el-table-column
+                                v-if="isColumnShow('name')"
+                                prop="name"
+                                label="名称"
+                                min-width="100">
+                        </el-table-column>
+                                                                
+                                            <el-table-column
+                                v-if="isColumnShow('remark')"
+                                prop="remark"
+                                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 {
+        created() {
+            this.getData();
+        },
+        data() {
+            return {
+                totalNumber: 0,
+                totalPage: 10,
+                currentPage: 1,
+                pageSize: 20,
+                tableData: [],
+                filter1: '',
+                filter2: '',
+                tableColumns: [
+                                                                        {
+                                label: 'ID',
+                                value: 'id',
+                                show: true
+                            },
+                                                                                                                                                                                                                                                                                                                            {
+                                label: '名称',
+                                value: 'name',
+                                show: true
+                            },
+                                                                                                {
+                                label: '内容',
+                                value: 'remark',
+                                show: true
+                            },
+                                                            ],
+                multipleMode: false,
+                showAdvancedQueryDialog: false,
+                advancedQueryFields: [],
+                showTableSortDialog: false,
+                tableSortFields: [],
+                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+                advancedQueryColumns: [
+                                                                        {
+                                label: 'ID',
+                                value: 'id'
+                            },
+                                                                                                                                                                                                                                                                                                                            {
+                                label: '名称',
+                                value: 'name'
+                            },
+                                                                                                {
+                                label: '内容',
+                                value: 'remark'
+                            },
+                                                            ],
+                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: '/alertMessage/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: '/alertMessage',
+                    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 + "/alertMessage/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: '/alertMessage/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>

+ 8 - 0
src/main/vue/src/pages/HouseInfos.vue

@@ -15,6 +15,13 @@
             </el-button>
             <el-button @click="updateToAnalysis" type="primary" size="small" icon="el-icon-share" class="filter-item">检测解析完成
             </el-button>
+            <el-select placeholder="评分方式" size="small" v-model="filter2" clearable @change="searchData" class="filter-item">
+                <el-option label="吃鸡奖励" value="0">
+                </el-option>
+                <el-option label="评分排名" value="1">
+                </el-option>
+            </el-select>
+
             <el-dropdown trigger="click" size="medium" class="table-column-filter">
                 <span>
                     筛选数据
@@ -474,6 +481,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                scoreType: this.filter2,
             }
 
             if (this.$route.query.column) {

+ 12 - 0
src/main/vue/src/pages/User.vue

@@ -42,6 +42,12 @@
                     value-format="timestamp">
                 </el-date-picker>
             </el-form-item>
+
+            <el-form-item prop="createFlag" label="可创建房间">
+                <el-switch v-model="formData.createFlag" active-color="#13ce66" inactive-color="#ff4949">
+                </el-switch>
+            </el-form-item>
+
             <el-form-item>
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
                 <el-button @click="$router.go(-1)">取消</el-button>
@@ -65,6 +71,8 @@
                         res.data.roleId = res.data.roleId ? res.data.roleId.split(',').map(i => Number(i)) : [];
                         res.data.departId = res.data.departId ? res.data.departId.split(',') : [];
                         this.formData = res.data;
+
+                        this.formData.createFlag = this.formData.createFlag == 'Y' ? true : false;
                     }
                 })
             }
@@ -104,6 +112,7 @@
             return {
                 saving: false,
                 formData: {
+                    createFlag: false,
                     departId: []
                 },
                 rules: {
@@ -147,6 +156,9 @@
             },
             submit() {
                 var data = JSON.parse(JSON.stringify(this.formData));
+
+                data.createFlag = this.formData.createFlag ? 'Y' : 'N';
+
                 this.$http.post({
                     url: this.formData.id ? '/userInfo/update' : '/userInfo/save',
                     data: data

+ 8 - 0
src/main/vue/src/pages/Users.vue

@@ -15,6 +15,12 @@
                 <el-option label="管理员" value="Y">
                 </el-option>
             </el-select>
+            <el-select placeholder="创建房间" size="small" v-model="filter3" clearable @change="searchData" class="filter-item">
+                <el-option label="不可" value="N">
+                </el-option>
+                <el-option label="可以" value="Y">
+                </el-option>
+            </el-select>
             <el-dropdown trigger="click" size="medium" class="table-column-filter">
                 <span>
                     筛选数据
@@ -82,6 +88,7 @@ export default {
             tableData: [],
             filter1: '',
             filter2: 'N',
+            filter3: '',
             tableColumns: [{
                 label: '用户名',
                 value: 'username',
@@ -129,6 +136,7 @@ export default {
                     pageNumber: this.pageSize,
                     adminFlag: this.filter2,
                     searchKey: this.filter1,
+                    createFlag: this.filter3,
                 }
             }).then(res => {
                 if (res.success) {

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

@@ -262,6 +262,16 @@ const router = new Router({
                 name: 'PlayerInfos',
                 component: () => import('../pages/PlayerInfos')
             },
+            {
+                path: '/productInfos',
+                name: 'ProductInfos',
+                component: () => import('../pages/ProductInfos')
+            },
+            {
+                path: '/productInfo',
+                name: 'ProductInfo',
+                component: () => import('../pages/ProductInfo')
+            },
             {
                 path: '/memberCoin',
                 name: 'MemberCoin',
@@ -361,6 +371,16 @@ const router = new Router({
                     path: '/systemVariables',
                     name: 'SystemVariables',
                     component: () => import('../pages/SystemVariables')
+                },
+                {
+                    path: '/alertMessage',
+                    name: 'AlertMessage',
+                    component: () => import('../pages/AlertMessage')
+                },
+                {
+                    path: '/alertMessages',
+                    name: 'AlertMessages',
+                    component: () => import('../pages/AlertMessages')
                 }
                 /**INSERT_LOCATION**/
         ]