|
|
|
|
<?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.ccsens.mt.persist.mapper.CompeteGroupMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteGroup">
|
|
|
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
|
<result column="group_name" jdbcType="VARCHAR" property="groupName" />
|
|
|
|
|
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
|
|
|
<result column="start_age" jdbcType="INTEGER" property="startAge" />
|
|
|
|
|
<result column="end_age" jdbcType="INTEGER" property="endAge" />
|
|
|
|
|
<result column="sequence" jdbcType="INTEGER" property="sequence" />
|
|
|
|
|
<result column="type" jdbcType="TINYINT" property="type" />
|
|
|
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
|
|
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
|
|
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
|
|
|
|
|
<result column="sex" jdbcType="TINYINT" property="sex" />
|
|
|
|
|
<result column="max_age" jdbcType="TINYINT" property="maxAge" />
|
|
|
|
|
<result column="min_age" jdbcType="TINYINT" property="minAge" />
|
|
|
|
|
<result column="group_remark" jdbcType="TINYINT" property="groupRemark" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
|
|
|
<where>
|
|
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
</when>
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
#{listItem}
|
|
|
|
|
</foreach>
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</where>
|
|
|
|
|
</sql>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
id, group_name, description, start_age, end_age, sequence, type, created_at, updated_at,
|
|
|
|
|
rec_status, sex, max_age, min_age, group_remark
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteGroupExample" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from t_compete_group
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from t_compete_group
|
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
|
|
delete from t_compete_group
|
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
|
</delete>
|
|
|
|
|
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.CompeteGroupExample">
|
|
|
|
|
delete from t_compete_group
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteGroup">
|
|
|
|
|
insert into t_compete_group (id, group_name, description,
|
|
|
|
|
start_age, end_age, sequence,
|
|
|
|
|
type, created_at, updated_at,
|
|
|
|
|
rec_status, sex, max_age,
|
|
|
|
|
min_age, group_remark)
|
|
|
|
|
values (#{id,jdbcType=BIGINT}, #{groupName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
|
|
|
|
#{startAge,jdbcType=INTEGER}, #{endAge,jdbcType=INTEGER}, #{sequence,jdbcType=INTEGER},
|
|
|
|
|
#{type,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
|
|
#{recStatus,jdbcType=TINYINT}, #{sex,jdbcType=TINYINT}, #{maxAge,jdbcType=TINYINT},
|
|
|
|
|
#{minAge,jdbcType=TINYINT}, #{groupRemark,jdbcType=TINYINT})
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.CompeteGroup">
|
|
|
|
|
insert into t_compete_group
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="groupName != null">
|
|
|
|
|
group_name,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="description != null">
|
|
|
|
|
description,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startAge != null">
|
|
|
|
|
start_age,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endAge != null">
|
|
|
|
|
end_age,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sequence != null">
|
|
|
|
|
sequence,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="type != null">
|
|
|
|
|
type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdAt != null">
|
|
|
|
|
created_at,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedAt != null">
|
|
|
|
|
updated_at,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="recStatus != null">
|
|
|
|
|
rec_status,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sex != null">
|
|
|
|
|
sex,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="maxAge != null">
|
|
|
|
|
max_age,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="minAge != null">
|
|
|
|
|
min_age,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="groupRemark != null">
|
|
|
|
|
group_remark,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="groupName != null">
|
|
|
|
|
#{groupName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="description != null">
|
|
|
|
|
#{description,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startAge != null">
|
|
|
|
|
#{startAge,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endAge != null">
|
|
|
|
|
#{endAge,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sequence != null">
|
|
|
|
|
#{sequence,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="type != null">
|
|
|
|
|
#{type,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdAt != null">
|
|
|
|
|
#{createdAt,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedAt != null">
|
|
|
|
|
#{updatedAt,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="recStatus != null">
|
|
|
|
|
#{recStatus,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sex != null">
|
|
|
|
|
#{sex,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="maxAge != null">
|
|
|
|
|
#{maxAge,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="minAge != null">
|
|
|
|
|
#{minAge,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="groupRemark != null">
|
|
|
|
|
#{groupRemark,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.CompeteGroupExample" resultType="java.lang.Long">
|
|
|
|
|
select count(*) from t_compete_group
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
|
update t_compete_group
|
|
|
|
|
<set>
|
|
|
|
|
<if test="record.id != null">
|
|
|
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.groupName != null">
|
|
|
|
|
group_name = #{record.groupName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.description != null">
|
|
|
|
|
description = #{record.description,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.startAge != null">
|
|
|
|
|
start_age = #{record.startAge,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.endAge != null">
|
|
|
|
|
end_age = #{record.endAge,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.sequence != null">
|
|
|
|
|
sequence = #{record.sequence,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.type != null">
|
|
|
|
|
type = #{record.type,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.createdAt != null">
|
|
|
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.updatedAt != null">
|
|
|
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.recStatus != null">
|
|
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.sex != null">
|
|
|
|
|
sex = #{record.sex,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.maxAge != null">
|
|
|
|
|
max_age = #{record.maxAge,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.minAge != null">
|
|
|
|
|
min_age = #{record.minAge,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.groupRemark != null">
|
|
|
|
|
group_remark = #{record.groupRemark,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
|
update t_compete_group
|
|
|
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
|
|
|
group_name = #{record.groupName,jdbcType=VARCHAR},
|
|
|
|
|
description = #{record.description,jdbcType=VARCHAR},
|
|
|
|
|
start_age = #{record.startAge,jdbcType=INTEGER},
|
|
|
|
|
end_age = #{record.endAge,jdbcType=INTEGER},
|
|
|
|
|
sequence = #{record.sequence,jdbcType=INTEGER},
|
|
|
|
|
type = #{record.type,jdbcType=TINYINT},
|
|
|
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
|
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
|
|
|
sex = #{record.sex,jdbcType=TINYINT},
|
|
|
|
|
max_age = #{record.maxAge,jdbcType=TINYINT},
|
|
|
|
|
min_age = #{record.minAge,jdbcType=TINYINT},
|
|
|
|
|
group_remark = #{record.groupRemark,jdbcType=TINYINT}
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.CompeteGroup">
|
|
|
|
|
update t_compete_group
|
|
|
|
|
<set>
|
|
|
|
|
<if test="groupName != null">
|
|
|
|
|
group_name = #{groupName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="description != null">
|
|
|
|
|
description = #{description,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startAge != null">
|
|
|
|
|
start_age = #{startAge,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endAge != null">
|
|
|
|
|
end_age = #{endAge,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sequence != null">
|
|
|
|
|
sequence = #{sequence,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="type != null">
|
|
|
|
|
type = #{type,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createdAt != null">
|
|
|
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updatedAt != null">
|
|
|
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="recStatus != null">
|
|
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sex != null">
|
|
|
|
|
sex = #{sex,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="maxAge != null">
|
|
|
|
|
max_age = #{maxAge,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="minAge != null">
|
|
|
|
|
min_age = #{minAge,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="groupRemark != null">
|
|
|
|
|
group_remark = #{groupRemark,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteGroup">
|
|
|
|
|
update t_compete_group
|
|
|
|
|
set group_name = #{groupName,jdbcType=VARCHAR},
|
|
|
|
|
description = #{description,jdbcType=VARCHAR},
|
|
|
|
|
start_age = #{startAge,jdbcType=INTEGER},
|
|
|
|
|
end_age = #{endAge,jdbcType=INTEGER},
|
|
|
|
|
sequence = #{sequence,jdbcType=INTEGER},
|
|
|
|
|
type = #{type,jdbcType=TINYINT},
|
|
|
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
|
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
|
|
|
sex = #{sex,jdbcType=TINYINT},
|
|
|
|
|
max_age = #{maxAge,jdbcType=TINYINT},
|
|
|
|
|
min_age = #{minAge,jdbcType=TINYINT},
|
|
|
|
|
group_remark = #{groupRemark,jdbcType=TINYINT}
|
|
|
|
|
where id = #{id,jdbcType=BIGINT}
|
|
|
|
|
</update>
|
|
|
|
|
</mapper>
|