You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

323 lines
12 KiB

<?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.CompeteTeamMapper">
<resultMap id="BaseResultMap" type="com.ccsens.mt.bean.po.CompeteTeam">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="creator" jdbcType="BIGINT" property="creator" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="compete_time_id" jdbcType="BIGINT" property="competeTimeId" />
<result column="gender_group" jdbcType="TINYINT" property="genderGroup" />
<result column="certificate" jdbcType="TINYINT" property="certificate" />
<result column="qr_code" jdbcType="VARCHAR" property="qrCode" />
<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="compete_group_id" jdbcType="BIGINT" property="competeGroupId" />
<result column="success" jdbcType="TINYINT" property="success" />
</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, creator, project_id, compete_time_id, gender_group, certificate, qr_code, created_at,
updated_at, rec_status, compete_group_id, success
</sql>
<select id="selectByExample" parameterType="com.ccsens.mt.bean.po.CompeteTeamExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_compete_team
<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_team
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_compete_team
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.mt.bean.po.CompeteTeamExample">
delete from t_compete_team
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.mt.bean.po.CompeteTeam">
insert into t_compete_team (id, creator, project_id,
compete_time_id, gender_group, certificate,
qr_code, created_at, updated_at,
rec_status, compete_group_id, success
)
values (#{id,jdbcType=BIGINT}, #{creator,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT},
#{competeTimeId,jdbcType=BIGINT}, #{genderGroup,jdbcType=TINYINT}, #{certificate,jdbcType=TINYINT},
#{qrCode,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT}, #{competeGroupId,jdbcType=BIGINT}, #{success,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.mt.bean.po.CompeteTeam">
insert into t_compete_team
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="creator != null">
creator,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="competeTimeId != null">
compete_time_id,
</if>
<if test="genderGroup != null">
gender_group,
</if>
<if test="certificate != null">
certificate,
</if>
<if test="qrCode != null">
qr_code,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
<if test="competeGroupId != null">
compete_group_id,
</if>
<if test="success != null">
success,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="creator != null">
#{creator,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="competeTimeId != null">
#{competeTimeId,jdbcType=BIGINT},
</if>
<if test="genderGroup != null">
#{genderGroup,jdbcType=TINYINT},
</if>
<if test="certificate != null">
#{certificate,jdbcType=TINYINT},
</if>
<if test="qrCode != null">
#{qrCode,jdbcType=VARCHAR},
</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="competeGroupId != null">
#{competeGroupId,jdbcType=BIGINT},
</if>
<if test="success != null">
#{success,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.mt.bean.po.CompeteTeamExample" resultType="java.lang.Long">
select count(*) from t_compete_team
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_compete_team
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.competeTimeId != null">
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
</if>
<if test="record.genderGroup != null">
gender_group = #{record.genderGroup,jdbcType=TINYINT},
</if>
<if test="record.certificate != null">
certificate = #{record.certificate,jdbcType=TINYINT},
</if>
<if test="record.qrCode != null">
qr_code = #{record.qrCode,jdbcType=VARCHAR},
</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.competeGroupId != null">
compete_group_id = #{record.competeGroupId,jdbcType=BIGINT},
</if>
<if test="record.success != null">
success = #{record.success,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_team
set id = #{record.id,jdbcType=BIGINT},
creator = #{record.creator,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=BIGINT},
compete_time_id = #{record.competeTimeId,jdbcType=BIGINT},
gender_group = #{record.genderGroup,jdbcType=TINYINT},
certificate = #{record.certificate,jdbcType=TINYINT},
qr_code = #{record.qrCode,jdbcType=VARCHAR},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT},
compete_group_id = #{record.competeGroupId,jdbcType=BIGINT},
success = #{record.success,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.mt.bean.po.CompeteTeam">
update t_compete_team
<set>
<if test="creator != null">
creator = #{creator,jdbcType=BIGINT},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="competeTimeId != null">
compete_time_id = #{competeTimeId,jdbcType=BIGINT},
</if>
<if test="genderGroup != null">
gender_group = #{genderGroup,jdbcType=TINYINT},
</if>
<if test="certificate != null">
certificate = #{certificate,jdbcType=TINYINT},
</if>
<if test="qrCode != null">
qr_code = #{qrCode,jdbcType=VARCHAR},
</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="competeGroupId != null">
compete_group_id = #{competeGroupId,jdbcType=BIGINT},
</if>
<if test="success != null">
success = #{success,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.mt.bean.po.CompeteTeam">
update t_compete_team
set creator = #{creator,jdbcType=BIGINT},
project_id = #{projectId,jdbcType=BIGINT},
compete_time_id = #{competeTimeId,jdbcType=BIGINT},
gender_group = #{genderGroup,jdbcType=TINYINT},
certificate = #{certificate,jdbcType=TINYINT},
qr_code = #{qrCode,jdbcType=VARCHAR},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT},
compete_group_id = #{competeGroupId,jdbcType=BIGINT},
success = #{success,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>