123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- <?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.bz.smart_city.dao.TaskFormMapper">
- <!--auto generated Code-->
- <resultMap id="BaseResultMap" type="com.bz.smart_city.entity.TaskForm">
- <result column="id" property="id" jdbcType="INTEGER"/>
- <result column="site_id" property="siteId" jdbcType="INTEGER"/>
- <result column="client_type" property="clientType" jdbcType="VARCHAR"/>
- <result column="form_name" property="formName" jdbcType="VARCHAR"/>
- <result column="form_key" property="formKey" jdbcType="VARCHAR"/>
- <result column="form_content" property="formContent" jdbcType="VARCHAR"/>
- <result column="form_category" property="formCategory" jdbcType="VARCHAR"/>
- <result column="status" property="status" jdbcType="INTEGER"/>
- <result column="create_by" property="createBy" jdbcType="VARCHAR"/>
- <result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
- <result column="date_create" property="dateCreate" jdbcType="TIMESTAMP"/>
- <result column="date_update" property="dateUpdate" jdbcType="TIMESTAMP"/>
- </resultMap>
- <!--auto generated Code-->
- <sql id="Base_Column_List">
- id,
- site_id,
- client_type,
- form_name,
- form_key,
- form_content,
- form_category,
- status,
- create_by,
- update_by,
- date_create,
- date_update
- </sql>
- <!--auto generated Code-->
- <insert id="insert" useGeneratedKeys="true" keyProperty="taskForm.id">
- INSERT INTO sc_task_form (
- id,
- site_id,
- client_type,
- form_name,
- form_key,
- form_content,
- form_category,
- status,
- create_by,
- update_by,
- date_create,
- date_update
- ) VALUES (
- #{taskForm.id,jdbcType=INTEGER},
- #{taskForm.siteId,jdbcType=INTEGER},
- #{taskForm.clientType,jdbcType=VARCHAR},
- #{taskForm.formName,jdbcType=VARCHAR},
- #{taskForm.formKey,jdbcType=VARCHAR},
- #{taskForm.formContent,jdbcType=VARCHAR},
- #{taskForm.formCategory,jdbcType=VARCHAR},
- #{taskForm.status,jdbcType=INTEGER},
- #{taskForm.createBy,jdbcType=VARCHAR},
- #{taskForm.updateBy,jdbcType=VARCHAR},
- #{taskForm.dateCreate,jdbcType=TIMESTAMP},
- #{taskForm.dateUpdate,jdbcType=TIMESTAMP}
- )
- </insert>
- <!--auto generated Code-->
- <insert id="insertSelective" useGeneratedKeys="true" keyProperty="taskForm.id">
- INSERT INTO sc_task_form
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="taskForm.id!=null"> id,</if>
- <if test="taskForm.siteId!=null"> site_id,</if>
- <if test="taskForm.formName!=null"> form_name,</if>
- <if test="taskForm.formKey!=null"> form_key,</if>
- <if test="taskForm.formContent!=null"> form_content,</if>
- <if test="taskForm.formCategory!=null"> form_category,</if>
- <if test="taskForm.status!=null"> status,</if>
- <if test="taskForm.createBy!=null"> create_by,</if>
- <if test="taskForm.updateBy!=null"> update_by,</if>
- <if test="taskForm.dateCreate!=null"> date_create,</if>
- <if test="taskForm.dateUpdate!=null"> date_update,</if>
- </trim>
- VALUES
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="taskForm.id!=null">#{taskForm.id,jdbcType=INTEGER},
- </if>
- <if test="taskForm.siteId!=null">#{taskForm.siteId,jdbcType=INTEGER},
- </if>
- <if test="taskForm.formName!=null">#{taskForm.formName,jdbcType=VARCHAR},
- </if>
- <if test="taskForm.formKey!=null">#{taskForm.formKey,jdbcType=VARCHAR},
- </if>
- <if test="taskForm.formContent!=null">#{taskForm.formContent,jdbcType=VARCHAR},
- </if>
- <if test="taskForm.formCategory!=null">#{taskForm.formCategory,jdbcType=VARCHAR},
- </if>
- <if test="taskForm.status!=null">#{taskForm.status,jdbcType=INTEGER},
- </if>
- <if test="taskForm.createBy!=null">#{taskForm.createBy,jdbcType=VARCHAR},
- </if>
- <if test="taskForm.updateBy!=null">#{taskForm.updateBy,jdbcType=VARCHAR},
- </if>
- <if test="taskForm.dateCreate!=null">#{taskForm.dateCreate,jdbcType=TIMESTAMP},
- </if>
- <if test="taskForm.dateUpdate!=null">#{taskForm.dateUpdate,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <!--auto generated Code-->
- <insert id="insertList">
- INSERT INTO sc_task_form (
- id,
- site_id,
- form_name,
- form_key,
- form_content,
- form_category,
- status,
- create_by,
- update_by,
- date_create,
- date_update
- )VALUES
- <foreach collection="taskForms" item="taskForm" index="index" separator=",">
- (
- #{taskForm.id,jdbcType=INTEGER},
- #{taskForm.siteId,jdbcType=INTEGER},
- #{taskForm.formName,jdbcType=VARCHAR},
- #{taskForm.formKey,jdbcType=VARCHAR},
- #{taskForm.formContent,jdbcType=VARCHAR},
- #{taskForm.formCategory,jdbcType=VARCHAR},
- #{taskForm.status,jdbcType=INTEGER},
- #{taskForm.createBy,jdbcType=VARCHAR},
- #{taskForm.updateBy,jdbcType=VARCHAR},
- #{taskForm.dateCreate,jdbcType=TIMESTAMP},
- #{taskForm.dateUpdate,jdbcType=TIMESTAMP}
- )
- </foreach>
- </insert>
- <!--auto generated Code-->
- <update id="updateByPrimaryKeySelective">
- UPDATE sc_task_form
- <set>
- <if test="taskForm.siteId != null"> site_id= #{taskForm.siteId,jdbcType=INTEGER},</if>
- <if test="taskForm.formName != null"> form_name= #{taskForm.formName,jdbcType=VARCHAR},</if>
- <if test="taskForm.formKey != null"> form_key= #{taskForm.formKey,jdbcType=VARCHAR},</if>
- <if test="taskForm.formContent != null"> form_content= #{taskForm.formContent,jdbcType=VARCHAR},</if>
- <if test="taskForm.formCategory != null"> form_category= #{taskForm.formCategory,jdbcType=VARCHAR},</if>
- <if test="taskForm.status != null"> status= #{taskForm.status,jdbcType=INTEGER},</if>
- <if test="taskForm.createBy != null"> create_by= #{taskForm.createBy,jdbcType=VARCHAR},</if>
- <if test="taskForm.updateBy != null"> update_by= #{taskForm.updateBy,jdbcType=VARCHAR},</if>
- <if test="taskForm.dateCreate != null"> date_create= #{taskForm.dateCreate,jdbcType=TIMESTAMP},</if>
- <if test="taskForm.dateUpdate != null"> date_update= #{taskForm.dateUpdate,jdbcType=TIMESTAMP}</if>
- </set>
- WHERE id = #{taskForm.id,jdbcType=INTEGER}
- </update>
-
- <select id="singleQuery" resultType="com.bz.smart_city.entity.TaskForm">
- select
- *
- from
- sc_task_form
- where status = 1
- <if test="taskForm.id!=null">
- and id = #{taskForm.id,jdbcType=INTEGER}
- </if>
- <if test="taskForm.siteId!=null">
- and site_id = #{taskForm.siteId,jdbcType=INTEGER}
- </if>
- <if test="taskForm.clientType!=null">
- and client_type = #{taskForm.clientType,jdbcType=VARCHAR}
- </if>
- <if test="taskForm.formName!=null">
- and form_name = #{taskForm.formName,jdbcType=VARCHAR}
- </if>
- <if test="taskForm.formKey!=null">
- and form_key = #{taskForm.formKey,jdbcType=VARCHAR}
- </if>
- limit 1
- </select>
- </mapper>
|