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.
465 lines
17 KiB
465 lines
17 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.delivery.persist.mapper.StuOrderMapper">
|
|
<resultMap id="BaseResultMap" type="com.ccsens.delivery.bean.po.StuOrder">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="stu_num" jdbcType="VARCHAR" property="stuNum" />
|
|
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
|
<result column="id_card" jdbcType="VARCHAR" property="idCard" />
|
|
<result column="college_id" jdbcType="BIGINT" property="collegeId" />
|
|
<result column="dormitory_id" jdbcType="BIGINT" property="dormitoryId" />
|
|
<result column="address" jdbcType="VARCHAR" property="address" />
|
|
<result column="symptom" jdbcType="VARCHAR" property="symptom" />
|
|
<result column="broken" jdbcType="TINYINT" property="broken" />
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
<result column="plan_time" jdbcType="BIGINT" property="planTime" />
|
|
<result column="real_time" jdbcType="BIGINT" property="realTime" />
|
|
<result column="status" jdbcType="TINYINT" property="status" />
|
|
<result column="operator" jdbcType="BIGINT" property="operator" />
|
|
<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="college_name" jdbcType="VARCHAR" property="collegeName" />
|
|
<result column="dormitory_name" jdbcType="VARCHAR" property="dormitoryName" />
|
|
</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, user_id, name, stu_num, phone, id_card, college_id, dormitory_id, address, symptom,
|
|
broken, remark, plan_time, real_time, status, operator, created_at, updated_at, rec_status,
|
|
college_name, dormitory_name
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from t_stu_order
|
|
<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_stu_order
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from t_stu_order
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderExample">
|
|
delete from t_stu_order
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ccsens.delivery.bean.po.StuOrder">
|
|
insert into t_stu_order (id, user_id, name,
|
|
stu_num, phone, id_card,
|
|
college_id, dormitory_id, address,
|
|
symptom, broken, remark,
|
|
plan_time, real_time, status,
|
|
operator, created_at, updated_at,
|
|
rec_status, college_name, dormitory_name
|
|
)
|
|
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
|
#{stuNum,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR},
|
|
#{collegeId,jdbcType=BIGINT}, #{dormitoryId,jdbcType=BIGINT}, #{address,jdbcType=VARCHAR},
|
|
#{symptom,jdbcType=VARCHAR}, #{broken,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR},
|
|
#{planTime,jdbcType=BIGINT}, #{realTime,jdbcType=BIGINT}, #{status,jdbcType=TINYINT},
|
|
#{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
|
|
#{recStatus,jdbcType=TINYINT}, #{collegeName,jdbcType=VARCHAR}, #{dormitoryName,jdbcType=VARCHAR}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ccsens.delivery.bean.po.StuOrder">
|
|
insert into t_stu_order
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="userId != null">
|
|
user_id,
|
|
</if>
|
|
<if test="name != null">
|
|
name,
|
|
</if>
|
|
<if test="stuNum != null">
|
|
stu_num,
|
|
</if>
|
|
<if test="phone != null">
|
|
phone,
|
|
</if>
|
|
<if test="idCard != null">
|
|
id_card,
|
|
</if>
|
|
<if test="collegeId != null">
|
|
college_id,
|
|
</if>
|
|
<if test="dormitoryId != null">
|
|
dormitory_id,
|
|
</if>
|
|
<if test="address != null">
|
|
address,
|
|
</if>
|
|
<if test="symptom != null">
|
|
symptom,
|
|
</if>
|
|
<if test="broken != null">
|
|
broken,
|
|
</if>
|
|
<if test="remark != null">
|
|
remark,
|
|
</if>
|
|
<if test="planTime != null">
|
|
plan_time,
|
|
</if>
|
|
<if test="realTime != null">
|
|
real_time,
|
|
</if>
|
|
<if test="status != null">
|
|
status,
|
|
</if>
|
|
<if test="operator != null">
|
|
operator,
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at,
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at,
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status,
|
|
</if>
|
|
<if test="collegeName != null">
|
|
college_name,
|
|
</if>
|
|
<if test="dormitoryName != null">
|
|
dormitory_name,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="userId != null">
|
|
#{userId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="stuNum != null">
|
|
#{stuNum,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phone != null">
|
|
#{phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="idCard != null">
|
|
#{idCard,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="collegeId != null">
|
|
#{collegeId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="dormitoryId != null">
|
|
#{dormitoryId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="address != null">
|
|
#{address,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="symptom != null">
|
|
#{symptom,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="broken != null">
|
|
#{broken,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="remark != null">
|
|
#{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="planTime != null">
|
|
#{planTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="realTime != null">
|
|
#{realTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="status != null">
|
|
#{status,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="operator != null">
|
|
#{operator,jdbcType=BIGINT},
|
|
</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="collegeName != null">
|
|
#{collegeName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="dormitoryName != null">
|
|
#{dormitoryName,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.ccsens.delivery.bean.po.StuOrderExample" resultType="java.lang.Long">
|
|
select count(*) from t_stu_order
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update t_stu_order
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.userId != null">
|
|
user_id = #{record.userId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.name != null">
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.stuNum != null">
|
|
stu_num = #{record.stuNum,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.phone != null">
|
|
phone = #{record.phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.idCard != null">
|
|
id_card = #{record.idCard,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.collegeId != null">
|
|
college_id = #{record.collegeId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.dormitoryId != null">
|
|
dormitory_id = #{record.dormitoryId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.address != null">
|
|
address = #{record.address,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.symptom != null">
|
|
symptom = #{record.symptom,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.broken != null">
|
|
broken = #{record.broken,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.remark != null">
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.planTime != null">
|
|
plan_time = #{record.planTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.realTime != null">
|
|
real_time = #{record.realTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.status != null">
|
|
status = #{record.status,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.operator != null">
|
|
operator = #{record.operator,jdbcType=BIGINT},
|
|
</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.collegeName != null">
|
|
college_name = #{record.collegeName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.dormitoryName != null">
|
|
dormitory_name = #{record.dormitoryName,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update t_stu_order
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
user_id = #{record.userId,jdbcType=BIGINT},
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
stu_num = #{record.stuNum,jdbcType=VARCHAR},
|
|
phone = #{record.phone,jdbcType=VARCHAR},
|
|
id_card = #{record.idCard,jdbcType=VARCHAR},
|
|
college_id = #{record.collegeId,jdbcType=BIGINT},
|
|
dormitory_id = #{record.dormitoryId,jdbcType=BIGINT},
|
|
address = #{record.address,jdbcType=VARCHAR},
|
|
symptom = #{record.symptom,jdbcType=VARCHAR},
|
|
broken = #{record.broken,jdbcType=TINYINT},
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
plan_time = #{record.planTime,jdbcType=BIGINT},
|
|
real_time = #{record.realTime,jdbcType=BIGINT},
|
|
status = #{record.status,jdbcType=TINYINT},
|
|
operator = #{record.operator,jdbcType=BIGINT},
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
college_name = #{record.collegeName,jdbcType=VARCHAR},
|
|
dormitory_name = #{record.dormitoryName,jdbcType=VARCHAR}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.delivery.bean.po.StuOrder">
|
|
update t_stu_order
|
|
<set>
|
|
<if test="userId != null">
|
|
user_id = #{userId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="name != null">
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="stuNum != null">
|
|
stu_num = #{stuNum,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="phone != null">
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="idCard != null">
|
|
id_card = #{idCard,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="collegeId != null">
|
|
college_id = #{collegeId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="dormitoryId != null">
|
|
dormitory_id = #{dormitoryId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="address != null">
|
|
address = #{address,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="symptom != null">
|
|
symptom = #{symptom,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="broken != null">
|
|
broken = #{broken,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="remark != null">
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="planTime != null">
|
|
plan_time = #{planTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="realTime != null">
|
|
real_time = #{realTime,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="status != null">
|
|
status = #{status,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="operator != null">
|
|
operator = #{operator,jdbcType=BIGINT},
|
|
</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="collegeName != null">
|
|
college_name = #{collegeName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="dormitoryName != null">
|
|
dormitory_name = #{dormitoryName,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.delivery.bean.po.StuOrder">
|
|
update t_stu_order
|
|
set user_id = #{userId,jdbcType=BIGINT},
|
|
name = #{name,jdbcType=VARCHAR},
|
|
stu_num = #{stuNum,jdbcType=VARCHAR},
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
id_card = #{idCard,jdbcType=VARCHAR},
|
|
college_id = #{collegeId,jdbcType=BIGINT},
|
|
dormitory_id = #{dormitoryId,jdbcType=BIGINT},
|
|
address = #{address,jdbcType=VARCHAR},
|
|
symptom = #{symptom,jdbcType=VARCHAR},
|
|
broken = #{broken,jdbcType=TINYINT},
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
plan_time = #{planTime,jdbcType=BIGINT},
|
|
real_time = #{realTime,jdbcType=BIGINT},
|
|
status = #{status,jdbcType=TINYINT},
|
|
operator = #{operator,jdbcType=BIGINT},
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
college_name = #{collegeName,jdbcType=VARCHAR},
|
|
dormitory_name = #{dormitoryName,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper>
|