123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- <?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="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNewMapper" >
- <resultMap id="BaseResultMap" type="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNew" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="grain_id" property="grainId" jdbcType="INTEGER" />
- <result column="code" property="code" jdbcType="VARCHAR" />
- <result column="apply_depart" property="applyDepart" jdbcType="VARCHAR" />
- <result column="apply_date" property="applyDate" jdbcType="VARCHAR" />
- <result column="apply_user" property="applyUser" jdbcType="VARCHAR" />
- <result column="depart_user" property="departUser" jdbcType="VARCHAR" />
- <result column="depart_state" property="departState" jdbcType="VARCHAR" />
- <result column="chief_user" property="chiefUser" jdbcType="VARCHAR" />
- <result column="chief_state" property="chiefState" jdbcType="VARCHAR" />
- <result column="head_state" property="headState" jdbcType="VARCHAR" />
- <result column="head_user" property="headUser" jdbcType="VARCHAR" />
- <result column="depart_idea" property="departIdea" jdbcType="VARCHAR" />
- <result column="chief_idea" property="chiefIdea" jdbcType="VARCHAR" />
- <result column="head_idea" property="headIdea" jdbcType="VARCHAR" />
- <result column="uuid" property="uuid" jdbcType="VARCHAR" />
- <result column="c_id" property="cId" jdbcType="INTEGER" />
- <result column="c_time" property="cTime" jdbcType="TIMESTAMP" />
- <result column="u_id" property="uId" jdbcType="INTEGER" />
- <result column="u_time" property="uTime" jdbcType="TIMESTAMP" />
- <result column="state" property="state" jdbcType="VARCHAR" />
- </resultMap>
- <sql id="Example_Where_Clause" >
- <where >
- <foreach collection="oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
- <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List" >
- id, grain_id, code, apply_depart, apply_date, apply_user, depart_user, depart_state,
- chief_user, chief_state, head_state, head_user, depart_idea, chief_idea, head_idea,
- c_id, c_time, u_id, u_time, state
- </sql>
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNewExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- from dm_device_apply_new
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- from dm_device_apply_new
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from dm_device_apply_new
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNewExample" >
- delete from dm_device_apply_new
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNew" >
- insert into dm_device_apply_new (id, grain_id, code,
- apply_depart, apply_date, apply_user,
- depart_user, depart_state, chief_user,
- chief_state, head_state, head_user,
- depart_idea, chief_idea, head_idea,
- c_id, c_time, u_id,
- u_time, state)
- values (#{id,jdbcType=INTEGER}, #{grainId,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR},
- #{applyDepart,jdbcType=VARCHAR}, #{applyDate,jdbcType=VARCHAR}, #{applyUser,jdbcType=VARCHAR},
- #{departUser,jdbcType=VARCHAR}, #{departState,jdbcType=VARCHAR}, #{chiefUser,jdbcType=VARCHAR},
- #{chiefState,jdbcType=VARCHAR}, #{headState,jdbcType=VARCHAR}, #{headUser,jdbcType=VARCHAR},
- #{departIdea,jdbcType=VARCHAR}, #{chiefIdea,jdbcType=VARCHAR}, #{headIdea,jdbcType=VARCHAR},
- #{cId,jdbcType=INTEGER}, #{cTime,jdbcType=TIMESTAMP}, #{uId,jdbcType=INTEGER},
- #{uTime,jdbcType=TIMESTAMP}, #{state,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNew" >
- insert into dm_device_apply_new
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="grainId != null" >
- grain_id,
- </if>
- <if test="code != null" >
- code,
- </if>
- <if test="applyDepart != null" >
- apply_depart,
- </if>
- <if test="applyDate != null" >
- apply_date,
- </if>
- <if test="applyUser != null" >
- apply_user,
- </if>
- <if test="departUser != null" >
- depart_user,
- </if>
- <if test="departState != null" >
- depart_state,
- </if>
- <if test="chiefUser != null" >
- chief_user,
- </if>
- <if test="chiefState != null" >
- chief_state,
- </if>
- <if test="headState != null" >
- head_state,
- </if>
- <if test="headUser != null" >
- head_user,
- </if>
- <if test="departIdea != null" >
- depart_idea,
- </if>
- <if test="chiefIdea != null" >
- chief_idea,
- </if>
- <if test="headIdea != null" >
- head_idea,
- </if>
- <if test="cId != null" >
- c_id,
- </if>
- <if test="cTime != null" >
- c_time,
- </if>
- <if test="uId != null" >
- u_id,
- </if>
- <if test="uTime != null" >
- u_time,
- </if>
- <if test="state != null" >
- state,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=INTEGER},
- </if>
- <if test="grainId != null" >
- #{grainId,jdbcType=INTEGER},
- </if>
- <if test="code != null" >
- #{code,jdbcType=VARCHAR},
- </if>
- <if test="applyDepart != null" >
- #{applyDepart,jdbcType=VARCHAR},
- </if>
- <if test="applyDate != null" >
- #{applyDate,jdbcType=VARCHAR},
- </if>
- <if test="applyUser != null" >
- #{applyUser,jdbcType=VARCHAR},
- </if>
- <if test="departUser != null" >
- #{departUser,jdbcType=VARCHAR},
- </if>
- <if test="departState != null" >
- #{departState,jdbcType=VARCHAR},
- </if>
- <if test="chiefUser != null" >
- #{chiefUser,jdbcType=VARCHAR},
- </if>
- <if test="chiefState != null" >
- #{chiefState,jdbcType=VARCHAR},
- </if>
- <if test="headState != null" >
- #{headState,jdbcType=VARCHAR},
- </if>
- <if test="headUser != null" >
- #{headUser,jdbcType=VARCHAR},
- </if>
- <if test="departIdea != null" >
- #{departIdea,jdbcType=VARCHAR},
- </if>
- <if test="chiefIdea != null" >
- #{chiefIdea,jdbcType=VARCHAR},
- </if>
- <if test="headIdea != null" >
- #{headIdea,jdbcType=VARCHAR},
- </if>
- <if test="cId != null" >
- #{cId,jdbcType=INTEGER},
- </if>
- <if test="cTime != null" >
- #{cTime,jdbcType=TIMESTAMP},
- </if>
- <if test="uId != null" >
- #{uId,jdbcType=INTEGER},
- </if>
- <if test="uTime != null" >
- #{uTime,jdbcType=TIMESTAMP},
- </if>
- <if test="state != null" >
- #{state,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNewExample" resultType="java.lang.Integer" >
- select count(*) from dm_device_apply_new
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map" >
- update dm_device_apply_new
- <set >
- <if test="record.id != null" >
- id = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.grainId != null" >
- grain_id = #{record.grainId,jdbcType=INTEGER},
- </if>
- <if test="record.code != null" >
- code = #{record.code,jdbcType=VARCHAR},
- </if>
- <if test="record.applyDepart != null" >
- apply_depart = #{record.applyDepart,jdbcType=VARCHAR},
- </if>
- <if test="record.applyDate != null" >
- apply_date = #{record.applyDate,jdbcType=VARCHAR},
- </if>
- <if test="record.applyUser != null" >
- apply_user = #{record.applyUser,jdbcType=VARCHAR},
- </if>
- <if test="record.departUser != null" >
- depart_user = #{record.departUser,jdbcType=VARCHAR},
- </if>
- <if test="record.departState != null" >
- depart_state = #{record.departState,jdbcType=VARCHAR},
- </if>
- <if test="record.chiefUser != null" >
- chief_user = #{record.chiefUser,jdbcType=VARCHAR},
- </if>
- <if test="record.chiefState != null" >
- chief_state = #{record.chiefState,jdbcType=VARCHAR},
- </if>
- <if test="record.headState != null" >
- head_state = #{record.headState,jdbcType=VARCHAR},
- </if>
- <if test="record.headUser != null" >
- head_user = #{record.headUser,jdbcType=VARCHAR},
- </if>
- <if test="record.departIdea != null" >
- depart_idea = #{record.departIdea,jdbcType=VARCHAR},
- </if>
- <if test="record.chiefIdea != null" >
- chief_idea = #{record.chiefIdea,jdbcType=VARCHAR},
- </if>
- <if test="record.headIdea != null" >
- head_idea = #{record.headIdea,jdbcType=VARCHAR},
- </if>
- <if test="record.cId != null" >
- c_id = #{record.cId,jdbcType=INTEGER},
- </if>
- <if test="record.cTime != null" >
- c_time = #{record.cTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.uId != null" >
- u_id = #{record.uId,jdbcType=INTEGER},
- </if>
- <if test="record.uTime != null" >
- u_time = #{record.uTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.state != null" >
- state = #{record.state,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map" >
- update dm_device_apply_new
- set id = #{record.id,jdbcType=INTEGER},
- grain_id = #{record.grainId,jdbcType=INTEGER},
- code = #{record.code,jdbcType=VARCHAR},
- apply_depart = #{record.applyDepart,jdbcType=VARCHAR},
- apply_date = #{record.applyDate,jdbcType=VARCHAR},
- apply_user = #{record.applyUser,jdbcType=VARCHAR},
- depart_user = #{record.departUser,jdbcType=VARCHAR},
- depart_state = #{record.departState,jdbcType=VARCHAR},
- chief_user = #{record.chiefUser,jdbcType=VARCHAR},
- chief_state = #{record.chiefState,jdbcType=VARCHAR},
- head_state = #{record.headState,jdbcType=VARCHAR},
- head_user = #{record.headUser,jdbcType=VARCHAR},
- depart_idea = #{record.departIdea,jdbcType=VARCHAR},
- chief_idea = #{record.chiefIdea,jdbcType=VARCHAR},
- head_idea = #{record.headIdea,jdbcType=VARCHAR},
- c_id = #{record.cId,jdbcType=INTEGER},
- c_time = #{record.cTime,jdbcType=TIMESTAMP},
- u_id = #{record.uId,jdbcType=INTEGER},
- u_time = #{record.uTime,jdbcType=TIMESTAMP},
- state = #{record.state,jdbcType=VARCHAR}
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNew" >
- update dm_device_apply_new
- <set >
- <if test="grainId != null" >
- grain_id = #{grainId,jdbcType=INTEGER},
- </if>
- <if test="code != null" >
- code = #{code,jdbcType=VARCHAR},
- </if>
- <if test="applyDepart != null" >
- apply_depart = #{applyDepart,jdbcType=VARCHAR},
- </if>
- <if test="applyDate != null" >
- apply_date = #{applyDate,jdbcType=VARCHAR},
- </if>
- <if test="applyUser != null" >
- apply_user = #{applyUser,jdbcType=VARCHAR},
- </if>
- <if test="departUser != null" >
- depart_user = #{departUser,jdbcType=VARCHAR},
- </if>
- <if test="departState != null" >
- depart_state = #{departState,jdbcType=VARCHAR},
- </if>
- <if test="chiefUser != null" >
- chief_user = #{chiefUser,jdbcType=VARCHAR},
- </if>
- <if test="chiefState != null" >
- chief_state = #{chiefState,jdbcType=VARCHAR},
- </if>
- <if test="headState != null" >
- head_state = #{headState,jdbcType=VARCHAR},
- </if>
- <if test="headUser != null" >
- head_user = #{headUser,jdbcType=VARCHAR},
- </if>
- <if test="departIdea != null" >
- depart_idea = #{departIdea,jdbcType=VARCHAR},
- </if>
- <if test="chiefIdea != null" >
- chief_idea = #{chiefIdea,jdbcType=VARCHAR},
- </if>
- <if test="headIdea != null" >
- head_idea = #{headIdea,jdbcType=VARCHAR},
- </if>
- <if test="cId != null" >
- c_id = #{cId,jdbcType=INTEGER},
- </if>
- <if test="cTime != null" >
- c_time = #{cTime,jdbcType=TIMESTAMP},
- </if>
- <if test="uId != null" >
- u_id = #{uId,jdbcType=INTEGER},
- </if>
- <if test="uTime != null" >
- u_time = #{uTime,jdbcType=TIMESTAMP},
- </if>
- <if test="state != null" >
- state = #{state,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="cn.ourwill.module.house.entity.new_entity.DmDeviceApplyNew" >
- update dm_device_apply_new
- set grain_id = #{grainId,jdbcType=INTEGER},
- code = #{code,jdbcType=VARCHAR},
- apply_depart = #{applyDepart,jdbcType=VARCHAR},
- apply_date = #{applyDate,jdbcType=VARCHAR},
- apply_user = #{applyUser,jdbcType=VARCHAR},
- depart_user = #{departUser,jdbcType=VARCHAR},
- depart_state = #{departState,jdbcType=VARCHAR},
- chief_user = #{chiefUser,jdbcType=VARCHAR},
- chief_state = #{chiefState,jdbcType=VARCHAR},
- head_state = #{headState,jdbcType=VARCHAR},
- head_user = #{headUser,jdbcType=VARCHAR},
- depart_idea = #{departIdea,jdbcType=VARCHAR},
- chief_idea = #{chiefIdea,jdbcType=VARCHAR},
- head_idea = #{headIdea,jdbcType=VARCHAR},
- c_id = #{cId,jdbcType=INTEGER},
- c_time = #{cTime,jdbcType=TIMESTAMP},
- u_id = #{uId,jdbcType=INTEGER},
- u_time = #{uTime,jdbcType=TIMESTAMP},
- state = #{state,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|