123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398 |
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="cn.ourwill.module.house.dao.dm.RecordDeviceBackDao">
- <resultMap type="cn.ourwill.module.house.entity.dm.RecordDeviceBack" id="baseMap">
- <result column="id" property="id"/>
- <result column="uuid" property="uuid"/>
- <result column="get_uuid" property="getUuid"/>
- <result column="count" property="count"/>
- <result column="unit" property="unit"/>
- <result column="bookkeeper" property="bookkeeper"/>
- <result column="handler" property="handler"/>
- <result column="collator" property="collator"/>
- <result column="return_time" property="returnTime"/>
- <result column="device_status" property="deviceStatus"/>
- <result column="device_no" property="deviceNo"/>
- <result column="status_repair" property="statusRepair"/>
- <result column="normal_boot" property="normalBoot"/>
- <result column="normal_operation" property="normalOperation"/>
- <result column="clean_and_tidy" property="cleanAndTidy"/>
- <result column="fixed_asset_number" property="fixedAssetNumber"/>
- </resultMap>
- <sql id="columns">
- id ,
- uuid ,
- get_uuid ,
- `count` ,
- unit ,
- bookkeeper ,
- handler ,
- collator ,
- return_time ,
- device_status,
- device_no,
- status_repair,
- a.normal_boot ,
- a.normal_operation ,
- a.clean_and_tidy,
- a.fixed_asset_number
- </sql>
- <sql id="joinCols">
- </sql>
- <select id="get" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM record_device_back a
- <include refid="joinCols"/>
- WHERE a.id = #{id}
- </select>
- <select id="getByUuid" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM record_device_back a
- <include refid="joinCols"/>
- WHERE a.uuid = #{uuid}
- </select>
- <select id="findList" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM record_device_back a
- <include refid="joinCols"/>
- <where>
- <if test="id !=null">
- and id = #{id}
- </if>
- <if test="uuid !=null">
- and uuid = #{uuid}
- </if>
- <if test="getUuid !=null">
- and get_uuid = #{getUuid}
- </if>
- <if test="count !=null">
- and `count` = #{count}
- </if>
- <if test="unit !=null">
- and unit = #{unit}
- </if>
- <if test="bookkeeper !=null">
- and bookkeeper = #{bookkeeper}
- </if>
- <if test="handler !=null">
- and handler = #{handler}
- </if>
- <if test="collator !=null">
- and collator = #{collator}
- </if>
- <if test="returnTime !=null">
- and return_time = #{returnTime}
- </if>
- <if test="deviceStatus !=null">
- and device_status = #{deviceStatus}
- </if>
- <if test="deviceNo !=null">
- and device_no = #{deviceNo}
- </if>
- <if test="statusRepair !=null">
- and status_repair = #{statusRepair}
- </if>
- <if test="normalBoot !=null">
- and a.normal_boot = #{normalBoot}
- </if>
- <if test="normalOperation !=null">
- and a.normal_operation = #{normalOperation}
- </if>
- <if test="cleanAndTidy !=null">
- and a.clean_and_tidy = #{cleanAndTidy}
- </if>
- <if test="fixedAssetNumber !=null">
- and a.fixed_asset_number = #{fixedAssetNumber}
- </if>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
- <select id="findAllList" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM record_device_back a
- <include refid="joinCols"/>
- <where>
- <if test="id !=null">
- and id = #{id}
- </if>
- <if test="uuid !=null">
- and uuid = #{uuid}
- </if>
- <if test="getUuid !=null">
- and get_uuid = #{getUuid}
- </if>
- <if test="count !=null">
- and `count` = #{count}
- </if>
- <if test="unit !=null">
- and unit = #{unit}
- </if>
- <if test="bookkeeper !=null">
- and bookkeeper = #{bookkeeper}
- </if>
- <if test="handler !=null">
- and handler = #{handler}
- </if>
- <if test="collator !=null">
- and collator = #{collator}
- </if>
- <if test="returnTime !=null">
- and return_time = #{returnTime}
- </if>
- <if test="deviceStatus !=null">
- and device_status = #{deviceStatus}
- </if>
- <if test="deviceNo !=null">
- and device_no = #{deviceNo}
- </if>
- <if test="statusRepair !=null">
- and status_repair = #{statusRepair}
- </if>
- <if test="normalBoot !=null">
- and a.normal_boot = #{normalBoot}
- </if>
- <if test="normalOperation !=null">
- and a.normal_operation = #{normalOperation}
- </if>
- <if test="cleanAndTidy !=null">
- and a.clean_and_tidy = #{cleanAndTidy}
- </if>
- <if test="fixedAssetNumber !=null">
- and a.fixed_asset_number = #{fixedAssetNumber}
- </if>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- </otherwise>
- </choose>
- </select>
- <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
- parameterType="cn.ourwill.module.house.entity.dm.RecordDeviceBack">
- INSERT INTO record_device_back
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <!-- <if test=" id != null">
- id,
- </if>-->
- <if test="uuid !=null">
- uuid,
- </if>
- <if test="getUuid !=null">
- get_uuid,
- </if>
- <if test=" count != null">
- `count`,
- </if>
- <if test=" unit != null">
- unit,
- </if>
- <if test=" bookkeeper != null">
- bookkeeper,
- </if>
- <if test=" handler != null">
- handler,
- </if>
- <if test=" collator != null">
- collator,
- </if>
- <if test=" returnTime != null">
- return_time,
- </if>
- <if test=" deviceStatus != null">
- device_status,
- </if>
- <if test=" deviceNo != null">
- device_no,
- </if>
- <if test="statusRepair !=null">
- status_repair,
- </if>
- <if test="normalBoot !=null">
- normal_boot ,
- </if>
- <if test="normalOperation !=null">
- normal_operation ,
- </if>
- <if test="cleanAndTidy !=null">
- clean_and_tidy,
- </if>
- <if test="fixedAssetNumber !=null">
- fixed_asset_number
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <!-- <if test=" id != null">
- #{id}, </if>-->
- <if test="uuid !=null">
- #{uuid}, </if>
- <if test="getUuid !=null">
- #{getUuid}, </if>
- <if test=" count != null">
- #{count}, </if>
- <if test=" unit != null">
- #{unit}, </if>
- <if test=" bookkeeper != null">
- #{bookkeeper}, </if>
- <if test=" handler != null">
- #{handler}, </if>
- <if test=" collator != null">
- #{collator}, </if>
- <if test=" returnTime != null">
- #{returnTime}, </if>
- <if test=" deviceStatus != null">
- #{deviceStatus} , </if>
- <if test=" deviceNo != null">
- #{deviceNo} , </if>
- <if test="statusRepair !=null">
- #{statusRepair},
- </if>
- <if test="normalBoot !=null">
- #{normalBoot},
- </if>
- <if test="normalOperation !=null">
- #{normalOperation},
- </if>
- <if test="cleanAndTidy !=null">
- #{cleanAndTidy},
- </if>
- <if test="fixedAssetNumber !=null">
- #{fixedAssetNumber}
- </if>
- </trim>
- </insert>
- <update id="update" parameterType="cn.ourwill.module.house.entity.dm.RecordDeviceBack">
- UPDATE record_device_back <set>
- <if test="id != null">
- id= #{id} ,
- </if>
- <if test="uuid !=null">
- uuid = #{uuid} ,
- </if>
- <if test="getUuid !=null">
- get_uuid = #{getUuid} ,
- </if>
- <if test="count != null">
- `count`= #{count} ,
- </if>
- <if test="unit != null">
- unit= #{unit} ,
- </if>
- <if test="bookkeeper != null">
- bookkeeper= #{bookkeeper} ,
- </if>
- <if test="handler != null">
- handler= #{handler} ,
- </if>
- <if test="collator != null">
- collator= #{collator} ,
- </if>
- <if test="returnTime != null">
- return_time= #{returnTime} ,
- </if>
- <if test="deviceStatus != null">
- device_status= #{deviceStatus},
- </if>
- <if test="deviceNo != null">
- device_no= #{deviceNo},
- </if>
- <if test="statusRepair !=null">
- status_repair = #{statusRepair},
- </if>
- <if test="normalBoot !=null">
- normal_boot = #{normalBoot},
- </if>
- <if test="normalOperation !=null">
- normal_operation = #{normalOperation},
- </if>
- <if test="cleanAndTidy !=null">
- clean_and_tidy = #{cleanAndTidy},
- </if>
- <if test="fixedAssetNumber !=null">
- fixed_asset_number = #{fixedAssetNumber}
- </if>
- </set>
- WHERE id = #{id}
- </update>
- <update id="updateByUuid" parameterType="cn.ourwill.module.house.entity.dm.RecordDeviceBack">
- UPDATE record_device_back <set>
- <if test="uuid !=null">
- uuid = #{uuid} ,
- </if>
- <if test="getUuid !=null">
- get_uuid = #{getUuid} ,
- </if>
- <if test="count != null">
- `count`= #{count} ,
- </if>
- <if test="unit != null">
- unit= #{unit} ,
- </if>
- <if test="bookkeeper != null">
- bookkeeper= #{bookkeeper} ,
- </if>
- <if test="handler != null">
- handler= #{handler} ,
- </if>
- <if test="collator != null">
- collator= #{collator} ,
- </if>
- <if test="returnTime != null">
- return_time= #{returnTime} ,
- </if>
- <if test="deviceStatus != null">
- device_status= #{deviceStatus},
- </if>
- <if test="deviceNo != null">
- device_no= #{deviceNo},
- </if>
- <if test="statusRepair !=null">
- status_repair = #{statusRepair},
- </if>
- <if test="normalBoot !=null">
- normal_boot = #{normalBoot},
- </if>
- <if test="normalOperation !=null">
- normal_operation = #{normalOperation},
- </if>
- <if test="cleanAndTidy !=null">
- clean_and_tidy = #{cleanAndTidy},
- </if>
- <if test="fixedAssetNumber !=null">
- fixed_asset_number = #{fixedAssetNumber}
- </if>
- </set>
- WHERE uuid = #{uuid}
- </update>
- <delete id="deleteById" parameterType="java.lang.Long">
- DELETE FROM record_device_back WHERE id = #{id}
- </delete>
- <delete id="deleteByIds" parameterType="java.util.List">
- DELETE FROM record_device_back WHERE id IN
- <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
- #{item}
- </foreach>
- </delete>
- </mapper>
|