|
@@ -1,22 +1,24 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<?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" >
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
-<mapper namespace="com.izouma.awesomeadmin.dao.GameInfoMapper" >
|
|
|
|
|
- <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.GameInfo" >
|
|
|
|
|
- <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="game_name" property="gameName" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="type_flag" property="typeFlag" jdbcType="INTEGER" />
|
|
|
|
|
- <result column="icon" property="icon" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="rank" property="rank" jdbcType="INTEGER" />
|
|
|
|
|
- <result column="remark" property="remark" jdbcType="VARCHAR" />
|
|
|
|
|
- <result column="use_flag" property="useFlag" jdbcType="CHAR" />
|
|
|
|
|
- </resultMap>
|
|
|
|
|
- <sql id="Base_Column_List" >
|
|
|
|
|
- <trim suffixOverrides="," >
|
|
|
|
|
|
|
+<mapper namespace="com.izouma.awesomeadmin.dao.GameInfoMapper">
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.GameInfo">
|
|
|
|
|
+ <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="game_name" property="gameName" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="icon" property="icon" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="rank" property="rank" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="remark" property="remark" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="use_flag" property="useFlag" jdbcType="CHAR"/>
|
|
|
|
|
+ <result column="short_name" property="shortName" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="profile" property="profile" jdbcType="VARCHAR"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ <trim suffixOverrides=",">
|
|
|
id,
|
|
id,
|
|
|
|
|
|
|
|
del_flag,
|
|
del_flag,
|
|
@@ -40,138 +42,159 @@
|
|
|
remark,
|
|
remark,
|
|
|
|
|
|
|
|
use_flag,
|
|
use_flag,
|
|
|
|
|
+ short_name,
|
|
|
|
|
+ profile,
|
|
|
|
|
|
|
|
- </trim>
|
|
|
|
|
|
|
+ </trim>
|
|
|
</sql>
|
|
</sql>
|
|
|
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
|
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
select
|
|
select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
from game_info
|
|
from game_info
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
</select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from game_info
|
|
delete from game_info
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
</delete>
|
|
|
- <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GameInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GameInfo" useGeneratedKeys="true"
|
|
|
|
|
+ keyProperty="id">
|
|
|
insert into game_info
|
|
insert into game_info
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
|
|
- <if test="id!= null" >
|
|
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id!= null">
|
|
|
id,
|
|
id,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag!= null" >
|
|
|
|
|
|
|
+ <if test="delFlag!= null">
|
|
|
del_flag,
|
|
del_flag,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime!= null" >
|
|
|
|
|
|
|
+ <if test="updateTime!= null">
|
|
|
update_time,
|
|
update_time,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser!= null" >
|
|
|
|
|
|
|
+ <if test="updateUser!= null">
|
|
|
update_user,
|
|
update_user,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime!= null" >
|
|
|
|
|
|
|
+ <if test="createTime!= null">
|
|
|
create_time,
|
|
create_time,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser!= null" >
|
|
|
|
|
|
|
+ <if test="createUser!= null">
|
|
|
create_user,
|
|
create_user,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="gameName!= null" >
|
|
|
|
|
|
|
+ <if test="gameName!= null">
|
|
|
game_name,
|
|
game_name,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="typeFlag!= null" >
|
|
|
|
|
|
|
+ <if test="typeFlag!= null">
|
|
|
type_flag,
|
|
type_flag,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="icon!= null" >
|
|
|
|
|
|
|
+ <if test="icon!= null">
|
|
|
icon,
|
|
icon,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank!= null" >
|
|
|
|
|
|
|
+ <if test="rank!= null">
|
|
|
rank,
|
|
rank,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="remark!= null" >
|
|
|
|
|
|
|
+ <if test="remark!= null">
|
|
|
remark,
|
|
remark,
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="useFlag!= null" >
|
|
|
|
|
|
|
+ <if test="useFlag!= null">
|
|
|
use_flag,
|
|
use_flag,
|
|
|
</if>
|
|
</if>
|
|
|
- </trim>
|
|
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
|
|
- <if test="id != null" >
|
|
|
|
|
|
|
+ <if test="shortName!= null">
|
|
|
|
|
+ short_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="profile!= null">
|
|
|
|
|
+ profile,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id != null">
|
|
|
#{id,jdbcType=INTEGER},
|
|
#{id,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag != null" >
|
|
|
|
|
|
|
+ <if test="delFlag != null">
|
|
|
#{delFlag,jdbcType=CHAR},
|
|
#{delFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser != null" >
|
|
|
|
|
|
|
+ <if test="updateUser != null">
|
|
|
#{updateUser,jdbcType=VARCHAR},
|
|
#{updateUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime != null" >
|
|
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser != null" >
|
|
|
|
|
|
|
+ <if test="createUser != null">
|
|
|
#{createUser,jdbcType=VARCHAR},
|
|
#{createUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="gameName != null" >
|
|
|
|
|
|
|
+ <if test="gameName != null">
|
|
|
#{gameName,jdbcType=VARCHAR},
|
|
#{gameName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="typeFlag != null" >
|
|
|
|
|
|
|
+ <if test="typeFlag != null">
|
|
|
#{typeFlag,jdbcType=INTEGER},
|
|
#{typeFlag,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="icon != null" >
|
|
|
|
|
|
|
+ <if test="icon != null">
|
|
|
#{icon,jdbcType=VARCHAR},
|
|
#{icon,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank != null" >
|
|
|
|
|
|
|
+ <if test="rank != null">
|
|
|
#{rank,jdbcType=INTEGER},
|
|
#{rank,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="remark != null" >
|
|
|
|
|
|
|
+ <if test="remark != null">
|
|
|
#{remark,jdbcType=VARCHAR},
|
|
#{remark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="useFlag != null" >
|
|
|
|
|
|
|
+ <if test="useFlag != null">
|
|
|
#{useFlag,jdbcType=CHAR},
|
|
#{useFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- </trim>
|
|
|
|
|
|
|
+ <if test="shortName != null">
|
|
|
|
|
+ #{shortName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="profile != null">
|
|
|
|
|
+ #{profile,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GameInfo" >
|
|
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GameInfo">
|
|
|
update game_info
|
|
update game_info
|
|
|
- <set >
|
|
|
|
|
- <if test="id != null" >
|
|
|
|
|
- id= #{id,jdbcType=INTEGER},
|
|
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="id != null">
|
|
|
|
|
+ id= #{id,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag != null">
|
|
|
|
|
+ del_flag= #{delFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag != null" >
|
|
|
|
|
- del_flag= #{delFlag,jdbcType=CHAR},
|
|
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ update_time= #{updateTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime != null" >
|
|
|
|
|
- update_time= #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
+ <if test="updateUser != null">
|
|
|
|
|
+ update_user= #{updateUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser != null" >
|
|
|
|
|
- update_user= #{updateUser,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ create_time= #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime != null" >
|
|
|
|
|
- create_time= #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
+ <if test="createUser != null">
|
|
|
|
|
+ create_user= #{createUser,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser != null" >
|
|
|
|
|
- create_user= #{createUser,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="gameName != null">
|
|
|
|
|
+ game_name= #{gameName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="gameName != null" >
|
|
|
|
|
- game_name= #{gameName,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="typeFlag != null">
|
|
|
|
|
+ type_flag= #{typeFlag,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="typeFlag != null" >
|
|
|
|
|
- type_flag= #{typeFlag,jdbcType=INTEGER},
|
|
|
|
|
|
|
+ <if test="icon != null">
|
|
|
|
|
+ icon= #{icon,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="icon != null" >
|
|
|
|
|
- icon= #{icon,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="rank != null">
|
|
|
|
|
+ rank= #{rank,jdbcType=INTEGER},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank != null" >
|
|
|
|
|
- rank= #{rank,jdbcType=INTEGER},
|
|
|
|
|
|
|
+ <if test="remark != null">
|
|
|
|
|
+ remark= #{remark,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="remark != null" >
|
|
|
|
|
- remark= #{remark,jdbcType=VARCHAR},
|
|
|
|
|
|
|
+ <if test="useFlag != null">
|
|
|
|
|
+ use_flag= #{useFlag,jdbcType=CHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="useFlag != null" >
|
|
|
|
|
- use_flag= #{useFlag,jdbcType=CHAR},
|
|
|
|
|
|
|
+ <if test="shortName != null">
|
|
|
|
|
+ short_name = #{shortName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
- </set>
|
|
|
|
|
|
|
+ <if test="profile != null">
|
|
|
|
|
+ profile= #{profile,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </set>
|
|
|
where
|
|
where
|
|
|
<if test="id != null and !"".equals(id)">
|
|
<if test="id != null and !"".equals(id)">
|
|
|
id = #{id,jdbcType=INTEGER}
|
|
id = #{id,jdbcType=INTEGER}
|
|
@@ -183,58 +206,60 @@
|
|
|
|
|
|
|
|
</update>
|
|
</update>
|
|
|
<select id="queryGameInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GameInfo">
|
|
<select id="queryGameInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GameInfo">
|
|
|
- select <include refid="Base_Column_List"/> from game_info
|
|
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from game_info
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
<if test="record.idStr != null and !"".equals(record.idStr)">
|
|
<if test="record.idStr != null and !"".equals(record.idStr)">
|
|
|
and id in (${record.idStr})
|
|
and id in (${record.idStr})
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.id != null and !"".equals(record.id)">
|
|
|
|
|
- and id = #{record.id}
|
|
|
|
|
|
|
+ <if test="record.id != null and !"".equals(record.id)">
|
|
|
|
|
+ and id = #{record.id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
|
|
+ and del_flag = #{record.delFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
|
|
- and del_flag = #{record.delFlag}
|
|
|
|
|
|
|
+ <if test="record.updateTime != null and !"".equals(record.updateTime)">
|
|
|
|
|
+ and update_time = #{record.updateTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.updateTime != null and !"".equals(record.updateTime)">
|
|
|
|
|
- and update_time = #{record.updateTime}
|
|
|
|
|
|
|
+ <if test="record.updateUser != null and !"".equals(record.updateUser)">
|
|
|
|
|
+ and update_user = #{record.updateUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.updateUser != null and !"".equals(record.updateUser)">
|
|
|
|
|
- and update_user = #{record.updateUser}
|
|
|
|
|
|
|
+ <if test="record.createTime != null and !"".equals(record.createTime)">
|
|
|
|
|
+ and create_time = #{record.createTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.createTime != null and !"".equals(record.createTime)">
|
|
|
|
|
- and create_time = #{record.createTime}
|
|
|
|
|
|
|
+ <if test="record.createUser != null and !"".equals(record.createUser)">
|
|
|
|
|
+ and create_user = #{record.createUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.createUser != null and !"".equals(record.createUser)">
|
|
|
|
|
- and create_user = #{record.createUser}
|
|
|
|
|
|
|
+ <if test="record.gameName != null and !"".equals(record.gameName)">
|
|
|
|
|
+ and game_name = #{record.gameName}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.gameName != null and !"".equals(record.gameName)">
|
|
|
|
|
- and game_name = #{record.gameName}
|
|
|
|
|
|
|
+ <if test="record.typeFlag != null and !"".equals(record.typeFlag)">
|
|
|
|
|
+ and type_flag = #{record.typeFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.typeFlag != null and !"".equals(record.typeFlag)">
|
|
|
|
|
- and type_flag = #{record.typeFlag}
|
|
|
|
|
|
|
+ <if test="record.icon != null and !"".equals(record.icon)">
|
|
|
|
|
+ and icon = #{record.icon}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.icon != null and !"".equals(record.icon)">
|
|
|
|
|
- and icon = #{record.icon}
|
|
|
|
|
|
|
+ <if test="record.rank != null and !"".equals(record.rank)">
|
|
|
|
|
+ and rank = #{record.rank}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.rank != null and !"".equals(record.rank)">
|
|
|
|
|
- and rank = #{record.rank}
|
|
|
|
|
|
|
+ <if test="record.remark != null and !"".equals(record.remark)">
|
|
|
|
|
+ and remark = #{record.remark}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.remark != null and !"".equals(record.remark)">
|
|
|
|
|
- and remark = #{record.remark}
|
|
|
|
|
|
|
+ <if test="record.useFlag != null and !"".equals(record.useFlag)">
|
|
|
|
|
+ and use_flag = #{record.useFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.useFlag != null and !"".equals(record.useFlag)">
|
|
|
|
|
- and use_flag = #{record.useFlag}
|
|
|
|
|
|
|
+ <if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
|
|
+ OR game_name LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR type_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR icon LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR rank LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR remark LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR use_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ </trim>
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
|
|
- <trim prefix="and (" suffix=")" prefixOverrides="OR" >
|
|
|
|
|
- OR game_name LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR type_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR icon LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR rank LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR remark LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- OR use_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
- </trim>
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
|
|
|
<if test="record.advancedQuery != null and !"".equals(record.advancedQuery)">
|
|
<if test="record.advancedQuery != null and !"".equals(record.advancedQuery)">
|
|
|
<foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
|
|
<foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
|
|
@@ -289,92 +314,204 @@
|
|
|
id desc
|
|
id desc
|
|
|
</select>
|
|
</select>
|
|
|
<select id="queryAllGameInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GameInfo">
|
|
<select id="queryAllGameInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GameInfo">
|
|
|
- select <include refid="Base_Column_List"/> from game_info
|
|
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from game_info
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
<if test="idStr != null and !"".equals(idStr)">
|
|
<if test="idStr != null and !"".equals(idStr)">
|
|
|
and id in (${idStr})
|
|
and id in (${idStr})
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="id != null and !"".equals(id)">
|
|
|
|
|
- and id = #{id}
|
|
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ and id = #{id}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
- and del_flag = #{delFlag}
|
|
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
+ and del_flag = #{delFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
- and update_time = #{updateTime}
|
|
|
|
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
+ and update_time = #{updateTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
- and update_user = #{updateUser}
|
|
|
|
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
+ and update_user = #{updateUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
- and create_time = #{createTime}
|
|
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
+ and create_time = #{createTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
- and create_user = #{createUser}
|
|
|
|
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
+ and create_user = #{createUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="gameName != null and !"".equals(gameName)">
|
|
|
|
|
- and game_name = #{gameName}
|
|
|
|
|
|
|
+ <if test="gameName != null and !"".equals(gameName)">
|
|
|
|
|
+ and game_name = #{gameName}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="typeFlag != null and !"".equals(typeFlag)">
|
|
|
|
|
- and type_flag = #{typeFlag}
|
|
|
|
|
|
|
+ <if test="typeFlag != null and !"".equals(typeFlag)">
|
|
|
|
|
+ and type_flag = #{typeFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="icon != null and !"".equals(icon)">
|
|
|
|
|
- and icon = #{icon}
|
|
|
|
|
|
|
+ <if test="icon != null and !"".equals(icon)">
|
|
|
|
|
+ and icon = #{icon}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
- and rank = #{rank}
|
|
|
|
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
+ and rank = #{rank}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="remark != null and !"".equals(remark)">
|
|
|
|
|
- and remark = #{remark}
|
|
|
|
|
|
|
+ <if test="remark != null and !"".equals(remark)">
|
|
|
|
|
+ and remark = #{remark}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="useFlag != null and !"".equals(useFlag)">
|
|
|
|
|
- and use_flag = #{useFlag}
|
|
|
|
|
|
|
+ <if test="useFlag != null and !"".equals(useFlag)">
|
|
|
|
|
+ and use_flag = #{useFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
|
|
- <trim prefix="and (" suffix=")" prefixOverrides="OR" >
|
|
|
|
|
- OR game_name LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR type_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR icon LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR rank LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR remark LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- OR use_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
- </trim>
|
|
|
|
|
|
|
+ <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
|
|
+ OR game_name LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR type_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR icon LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR rank LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR remark LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR use_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ </trim>
|
|
|
</if>
|
|
</if>
|
|
|
-<if test="advancedQuery != null and !"".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="advancedQuery != null and !"".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 < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ <if test="detailIndex == 3">
|
|
|
|
|
+ #{itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="detailIndex < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
|
|
|
- <if test="detailIndex < 3">
|
|
|
|
|
- ${itemDetail}
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
|
|
|
</foreach>
|
|
</foreach>
|
|
|
- </when>
|
|
|
|
|
- <otherwise>
|
|
|
|
|
- <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
- <if test="detailIndex == 3">
|
|
|
|
|
- #{itemDetail}
|
|
|
|
|
- </if>
|
|
|
|
|
-
|
|
|
|
|
- <if test="detailIndex < 3">
|
|
|
|
|
- ${itemDetail}
|
|
|
|
|
- </if>
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by
|
|
|
|
|
+
|
|
|
|
|
+ <if test="orderByStr != null and !"".equals(orderByStr)">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <trim suffixOverrides=",">
|
|
|
|
|
+ <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </foreach>
|
|
|
</foreach>
|
|
</foreach>
|
|
|
- </otherwise>
|
|
|
|
|
- </choose>
|
|
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ ,
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="getGameInfoSeasonsList" parameterType="java.util.Map"
|
|
|
|
|
+ resultMap="SeasonResult">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ ,
|
|
|
|
|
+ #{userId} as user_id
|
|
|
|
|
+ from game_info
|
|
|
|
|
+ <where>
|
|
|
|
|
+ and del_flag = 'N'
|
|
|
|
|
+ <if test="idStr != null and !"".equals(idStr)">
|
|
|
|
|
+ and id in (${idStr})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ and id = #{id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
+ and del_flag = #{delFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
+ and update_time = #{updateTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
+ and update_user = #{updateUser}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
+ and create_time = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
+ and create_user = #{createUser}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="gameName != null and !"".equals(gameName)">
|
|
|
|
|
+ and game_name = #{gameName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="typeFlag != null and !"".equals(typeFlag)">
|
|
|
|
|
+ and type_flag = #{typeFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="icon != null and !"".equals(icon)">
|
|
|
|
|
+ and icon = #{icon}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
+ and rank = #{rank}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remark != null and !"".equals(remark)">
|
|
|
|
|
+ and remark = #{remark}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="useFlag != null and !"".equals(useFlag)">
|
|
|
|
|
+ and use_flag = #{useFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
|
|
+ OR game_name LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR type_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR icon LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR rank LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR remark LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR use_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="advancedQuery != null and !"".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 < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ <if test="detailIndex == 3">
|
|
|
|
|
+ #{itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="detailIndex < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
|
|
|
- </foreach>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ </foreach>
|
|
|
|
|
|
|
|
|
|
|
|
|
-</if>
|
|
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
order by
|
|
order by
|
|
|
|
|
|
|
@@ -394,46 +531,48 @@
|
|
|
id desc
|
|
id desc
|
|
|
</select>
|
|
</select>
|
|
|
<select id="queryGameInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GameInfo">
|
|
<select id="queryGameInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GameInfo">
|
|
|
- select <include refid="Base_Column_List"/> from game_info
|
|
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from game_info
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
- <if test="id != null and !"".equals(id)">
|
|
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
and id = #{id}
|
|
and id = #{id}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
and del_flag = #{delFlag}
|
|
and del_flag = #{delFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
and update_time = #{updateTime}
|
|
and update_time = #{updateTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
and update_user = #{updateUser}
|
|
and update_user = #{updateUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
and create_time = #{createTime}
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
and create_user = #{createUser}
|
|
and create_user = #{createUser}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="gameName != null and !"".equals(gameName)">
|
|
|
|
|
|
|
+ <if test="gameName != null and !"".equals(gameName)">
|
|
|
and game_name = #{gameName}
|
|
and game_name = #{gameName}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="typeFlag != null and !"".equals(typeFlag)">
|
|
|
|
|
|
|
+ <if test="typeFlag != null and !"".equals(typeFlag)">
|
|
|
and type_flag = #{typeFlag}
|
|
and type_flag = #{typeFlag}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="icon != null and !"".equals(icon)">
|
|
|
|
|
|
|
+ <if test="icon != null and !"".equals(icon)">
|
|
|
and icon = #{icon}
|
|
and icon = #{icon}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
and rank = #{rank}
|
|
and rank = #{rank}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="remark != null and !"".equals(remark)">
|
|
|
|
|
|
|
+ <if test="remark != null and !"".equals(remark)">
|
|
|
and remark = #{remark}
|
|
and remark = #{remark}
|
|
|
</if>
|
|
</if>
|
|
|
- <if test="useFlag != null and !"".equals(useFlag)">
|
|
|
|
|
|
|
+ <if test="useFlag != null and !"".equals(useFlag)">
|
|
|
and use_flag = #{useFlag}
|
|
and use_flag = #{useFlag}
|
|
|
</if>
|
|
</if>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</where>
|
|
</where>
|
|
|
LIMIT 1
|
|
LIMIT 1
|
|
|
</select>
|
|
</select>
|
|
@@ -449,11 +588,23 @@
|
|
|
</if>
|
|
</if>
|
|
|
</update>
|
|
</update>
|
|
|
<select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GameInfo">
|
|
<select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GameInfo">
|
|
|
- select <include refid="Base_Column_List"/> from game_info
|
|
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from game_info
|
|
|
<where>
|
|
<where>
|
|
|
and del_flag = 'N'
|
|
and del_flag = 'N'
|
|
|
- </where>
|
|
|
|
|
|
|
+ </where>
|
|
|
order by id desc
|
|
order by id desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="SeasonResult" type="com.izouma.awesomeadmin.model.GameInfo" extends="BaseResultMap">
|
|
|
|
|
+
|
|
|
|
|
+ <association property="competitionSeason"
|
|
|
|
|
+ javaType="com.izouma.awesomeadmin.model.CompetitionSeason"
|
|
|
|
|
+ select="com.izouma.awesomeadmin.dao.CompetitionSeasonMapper.queryStartCompetitionSeason"
|
|
|
|
|
+ column="{ gameId = id , userId = user_id}"/>
|
|
|
|
|
+
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|
|
|
|
|
|