123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- <?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.dao.daily.DailyRecordLsjiagongFileDao">
- <resultMap type="cn.ourwill.module.house.entity.daily.DailyRecordLsjiagongFile" id="baseMap">
- <result column="id" property="id"/>
- <result column="uuid" property="uuid"/>
- <result column="jcTime" property="jcTime"/>
- <result column="smj" property="smj"/>
- <result column="cdb" property="cdb"/>
- <result column="hlm" property="hlm"/>
- <result column="mtTime" property="mtTime"/>
- <result column="sml" property="sml"/>
- <result column="zjml" property="zjml"/>
- <result column="hyl" property="hyl"/>
- <result column="otms" property="otms"/>
- <result column="mbl" property="mbl"/>
- <result column="rxsl" property="rxsl"/>
- <result column="bz" property="bz"/>
- <result column="classes" property="classes"/>
- <result column="htype" property="htype"/>
- <result column="house_id" property="houseId"/>
- <result column="file_uuid" property="fileUuid"/>
- </resultMap>
- <sql id="columns">
- id ,
- uuid ,
- jcTime,
- smj,
- cdb,
- hlm,
- mtTime,
- sml,
- zjml,
- hyl,
- otms,
- mbl,
- rxsl,
- bz ,
- `classes` ,
- htype ,
- house_id,
- file_uuid
- </sql>
- <sql id="joinCols">
- </sql>
- <select id="get" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_lsjiagong_file a
- <include refid="joinCols"/>
- WHERE a.id = #{id}
- </select>
- <select id="findList" resultMap="baseMap">
- SELECT
- <include refid="columns"/>
- FROM daily_record_lsjiagong_file a
- <include refid="joinCols"/>
- <where>
- <if test="id !=null">
- and id = #{id}
- </if>
- <if test="searchStartDate !=null">
- and jcTime <![CDATA[ >= ]]> #{searchStartDate}
- </if>
- <if test="searchEndDate !=null">
- and jcTime <= #{searchEndDate}
- </if>
- <if test="uuid !=null">
- and uuid = #{uuid}
- </if>
- <if test="houseId !=null">
- and house_id = #{houseId}
- </if>
- <if test="classes !=null">
- and `classes` = #{classes}
- </if>
- <if test="htype !=null">
- and htype = #{htype}
- </if>
- <if test=" fileUuid != null">
- and file_uuid = #{fileUuid}
- </if>
- </where>
- <choose>
- <when test="page !=null and page.orderBy != null and page.orderBy != ''">
- ORDER BY ${page.orderBy}
- </when>
- <otherwise>
- order by id desc
- </otherwise>
- </choose>
- </select>
- <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
- parameterType="cn.ourwill.module.house.entity.daily.DailyRecordLsjiagongFile">
- INSERT INTO daily_record_lsjiagong_file
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <!-- <if test=" id != null">
- id,
- </if>-->
- <if test=" uuid != null">
- uuid,
- </if>
- <if test=" jcTime != null">
- jcTime,
- </if>
- <if test=" smj != null">
- smj,
- </if>
- <if test=" cdb != null">
- cdb,
- </if>
- <if test=" hlm != null">
- hlm,
- </if>
- <if test=" mtTime != null and mtTime!='' ">
- mtTime,
- </if>
- <if test=" sml != null">
- sml,
- </if>
- <if test=" zjml != null">
- zjml,
- </if>
- <if test=" hyl != null">
- hyl,
- </if>
- <if test=" otms != null">
- otms,
- </if>
- <if test=" mbl != null">
- mbl,
- </if>
- <if test=" rxsl != null">
- rxsl,
- </if>
- <if test=" bz != null">
- bz,
- </if>
- <if test=" classes != null">
- classes,
- </if>
- <if test=" htype != null">
- htype,
- </if>
- <if test=" houseId != null">
- house_id,
- </if>
- <if test=" fileUuid != null">
- file_uuid
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <!--<if test="id !=null">
- #{id},
- </if>-->
- <if test=" uuid != null">
- #{uuid}, </if>
- <if test=" jcTime != null">
- #{jcTime},
- </if>
- <if test=" smj != null">
- #{smj},
- </if>
- <if test=" cdb != null">
- #{cdb},
- </if>
- <if test=" hlm != null">
- #{hlm},
- </if>
- <if test=" mtTime != null and mtTime!='' ">
- #{mtTime},
- </if>
- <if test=" sml != null">
- #{sml},
- </if>
- <if test=" zjml != null">
- #{zjml},
- </if>
- <if test=" hyl != null">
- #{hyl},
- </if>
- <if test=" otms != null">
- #{otms},
- </if>
- <if test=" mbl != null">
- #{mbl},
- </if>
- <if test=" rxsl != null">
- #{rxsl},
- </if>
- <if test=" bz != null">
- #{bz},
- </if>
- <if test=" classes != null">
- #{classes}, </if>
- <if test=" htype != null">
- #{htype}, </if>
- <if test=" houseId != null">
- #{houseId}, </if>
- <if test=" fileUuid != null">
- #{fileUuid}
- </if>
- </trim>
- </insert>
- </mapper>
|