|
@@ -0,0 +1,338 @@
|
|
|
+<?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.idea.oa.apply.mapper.ApplyCheckInMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.idea.oa.apply.model.ApplyCheckIn">
|
|
|
+ <id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
+ <result column="flow_num" jdbcType="VARCHAR" property="flowNum" />
|
|
|
+ <result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
+ <result column="house_name" jdbcType="VARCHAR" property="houseName" />
|
|
|
+ <result column="house_id" jdbcType="VARCHAR" property="houseId" />
|
|
|
+ <result column="file_data_ids" jdbcType="VARCHAR" property="fileDataIds" />
|
|
|
+ <result column="status" jdbcType="INTEGER" property="status" />
|
|
|
+ <result column="created_by_dept" jdbcType="VARCHAR" property="createdByDept" />
|
|
|
+ <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
|
|
|
+ <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
|
|
+ <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
|
|
|
+ <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
|
|
+ <result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
+ </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, flow_num, title, house_name, house_id, file_data_ids, status, created_by_dept,
|
|
|
+ created_by, created_at, updated_by, updated_at, remark
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.idea.oa.apply.model.ApplyCheckInExample" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from apply_check_in
|
|
|
+ <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.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from apply_check_in
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ delete from apply_check_in
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.idea.oa.apply.model.ApplyCheckInExample">
|
|
|
+ delete from apply_check_in
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.idea.oa.apply.model.ApplyCheckIn">
|
|
|
+ insert into apply_check_in (id, flow_num, title,
|
|
|
+ house_name, house_id, file_data_ids,
|
|
|
+ status, created_by_dept, created_by,
|
|
|
+ created_at, updated_by, updated_at,
|
|
|
+ remark)
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{flowNum,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
|
|
+ #{houseName,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR}, #{fileDataIds,jdbcType=VARCHAR},
|
|
|
+ #{status,jdbcType=INTEGER}, #{createdByDept,jdbcType=VARCHAR}, #{createdBy,jdbcType=VARCHAR},
|
|
|
+ #{createdAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ #{remark,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.idea.oa.apply.model.ApplyCheckIn">
|
|
|
+ insert into apply_check_in
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="flowNum != null">
|
|
|
+ flow_num,
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ title,
|
|
|
+ </if>
|
|
|
+ <if test="houseName != null">
|
|
|
+ house_name,
|
|
|
+ </if>
|
|
|
+ <if test="houseId != null">
|
|
|
+ house_id,
|
|
|
+ </if>
|
|
|
+ <if test="fileDataIds != null">
|
|
|
+ file_data_ids,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status,
|
|
|
+ </if>
|
|
|
+ <if test="createdByDept != null">
|
|
|
+ created_by_dept,
|
|
|
+ </if>
|
|
|
+ <if test="createdBy != null">
|
|
|
+ created_by,
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ created_at,
|
|
|
+ </if>
|
|
|
+ <if test="updatedBy != null">
|
|
|
+ updated_by,
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ updated_at,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ remark,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="flowNum != null">
|
|
|
+ #{flowNum,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ #{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="houseName != null">
|
|
|
+ #{houseName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="houseId != null">
|
|
|
+ #{houseId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="fileDataIds != null">
|
|
|
+ #{fileDataIds,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createdByDept != null">
|
|
|
+ #{createdByDept,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createdBy != null">
|
|
|
+ #{createdBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ #{createdAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updatedBy != null">
|
|
|
+ #{updatedBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.idea.oa.apply.model.ApplyCheckInExample" resultType="java.lang.Long">
|
|
|
+ select count(*) from apply_check_in
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update apply_check_in
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.flowNum != null">
|
|
|
+ flow_num = #{record.flowNum,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.title != null">
|
|
|
+ title = #{record.title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.houseName != null">
|
|
|
+ house_name = #{record.houseName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.houseId != null">
|
|
|
+ house_id = #{record.houseId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.fileDataIds != null">
|
|
|
+ file_data_ids = #{record.fileDataIds,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.status != null">
|
|
|
+ status = #{record.status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.createdByDept != null">
|
|
|
+ created_by_dept = #{record.createdByDept,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createdBy != null">
|
|
|
+ created_by = #{record.createdBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createdAt != null">
|
|
|
+ created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.updatedBy != null">
|
|
|
+ updated_by = #{record.updatedBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.updatedAt != null">
|
|
|
+ updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.remark != null">
|
|
|
+ remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update apply_check_in
|
|
|
+ set id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ flow_num = #{record.flowNum,jdbcType=VARCHAR},
|
|
|
+ title = #{record.title,jdbcType=VARCHAR},
|
|
|
+ house_name = #{record.houseName,jdbcType=VARCHAR},
|
|
|
+ house_id = #{record.houseId,jdbcType=VARCHAR},
|
|
|
+ file_data_ids = #{record.fileDataIds,jdbcType=VARCHAR},
|
|
|
+ status = #{record.status,jdbcType=INTEGER},
|
|
|
+ created_by_dept = #{record.createdByDept,jdbcType=VARCHAR},
|
|
|
+ created_by = #{record.createdBy,jdbcType=VARCHAR},
|
|
|
+ created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
|
+ updated_by = #{record.updatedBy,jdbcType=VARCHAR},
|
|
|
+ updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ remark = #{record.remark,jdbcType=VARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.idea.oa.apply.model.ApplyCheckIn">
|
|
|
+ update apply_check_in
|
|
|
+ <set>
|
|
|
+ <if test="flowNum != null">
|
|
|
+ flow_num = #{flowNum,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="houseName != null">
|
|
|
+ house_name = #{houseName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="houseId != null">
|
|
|
+ house_id = #{houseId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="fileDataIds != null">
|
|
|
+ file_data_ids = #{fileDataIds,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createdByDept != null">
|
|
|
+ created_by_dept = #{createdByDept,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createdBy != null">
|
|
|
+ created_by = #{createdBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updatedBy != null">
|
|
|
+ updated_by = #{updatedBy,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">
|
|
|
+ remark = #{remark,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.idea.oa.apply.model.ApplyCheckIn">
|
|
|
+ update apply_check_in
|
|
|
+ set flow_num = #{flowNum,jdbcType=VARCHAR},
|
|
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
+ house_name = #{houseName,jdbcType=VARCHAR},
|
|
|
+ house_id = #{houseId,jdbcType=VARCHAR},
|
|
|
+ file_data_ids = #{fileDataIds,jdbcType=VARCHAR},
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ created_by_dept = #{createdByDept,jdbcType=VARCHAR},
|
|
|
+ created_by = #{createdBy,jdbcType=VARCHAR},
|
|
|
+ created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
|
+ updated_by = #{updatedBy,jdbcType=VARCHAR},
|
|
|
+ updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ remark = #{remark,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+</mapper>
|