DailyRecordLsjiagongFileDao.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.ourwill.module.house.dao.daily.DailyRecordLsjiagongFileDao">
  4. <resultMap type="cn.ourwill.module.house.entity.daily.DailyRecordLsjiagongFile" id="baseMap">
  5. <result column="id" property="id"/>
  6. <result column="uuid" property="uuid"/>
  7. <result column="jcTime" property="jcTime"/>
  8. <result column="smj" property="smj"/>
  9. <result column="cdb" property="cdb"/>
  10. <result column="hlm" property="hlm"/>
  11. <result column="mtTime" property="mtTime"/>
  12. <result column="sml" property="sml"/>
  13. <result column="zjml" property="zjml"/>
  14. <result column="hyl" property="hyl"/>
  15. <result column="otms" property="otms"/>
  16. <result column="mbl" property="mbl"/>
  17. <result column="rxsl" property="rxsl"/>
  18. <result column="bz" property="bz"/>
  19. <result column="classes" property="classes"/>
  20. <result column="htype" property="htype"/>
  21. <result column="house_id" property="houseId"/>
  22. <result column="file_uuid" property="fileUuid"/>
  23. </resultMap>
  24. <sql id="columns">
  25. id ,
  26. uuid ,
  27. jcTime,
  28. smj,
  29. cdb,
  30. hlm,
  31. mtTime,
  32. sml,
  33. zjml,
  34. hyl,
  35. otms,
  36. mbl,
  37. rxsl,
  38. bz ,
  39. `classes` ,
  40. htype ,
  41. house_id,
  42. file_uuid
  43. </sql>
  44. <sql id="joinCols">
  45. </sql>
  46. <select id="get" resultMap="baseMap">
  47. SELECT
  48. <include refid="columns"/>
  49. FROM daily_record_lsjiagong_file a
  50. <include refid="joinCols"/>
  51. WHERE a.id = #{id}
  52. </select>
  53. <select id="findList" resultMap="baseMap">
  54. SELECT
  55. <include refid="columns"/>
  56. FROM daily_record_lsjiagong_file a
  57. <include refid="joinCols"/>
  58. <where>
  59. <if test="id !=null">
  60. and id = #{id}
  61. </if>
  62. <if test="searchStartDate !=null">
  63. and jcTime <![CDATA[ >= ]]> #{searchStartDate}
  64. </if>
  65. <if test="searchEndDate !=null">
  66. and jcTime &lt;= #{searchEndDate}
  67. </if>
  68. <if test="uuid !=null">
  69. and uuid = #{uuid}
  70. </if>
  71. <if test="houseId !=null">
  72. and house_id = #{houseId}
  73. </if>
  74. <if test="classes !=null">
  75. and `classes` = #{classes}
  76. </if>
  77. <if test="htype !=null">
  78. and htype = #{htype}
  79. </if>
  80. <if test=" fileUuid != null">
  81. and file_uuid = #{fileUuid}
  82. </if>
  83. </where>
  84. <choose>
  85. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  86. ORDER BY ${page.orderBy}
  87. </when>
  88. <otherwise>
  89. order by id desc
  90. </otherwise>
  91. </choose>
  92. </select>
  93. <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
  94. parameterType="cn.ourwill.module.house.entity.daily.DailyRecordLsjiagongFile">
  95. INSERT INTO daily_record_lsjiagong_file
  96. <trim prefix="(" suffix=")" suffixOverrides=",">
  97. <!-- <if test=" id != null">
  98. id,
  99. </if>-->
  100. <if test=" uuid != null">
  101. uuid,
  102. </if>
  103. <if test=" jcTime != null">
  104. jcTime,
  105. </if>
  106. <if test=" smj != null">
  107. smj,
  108. </if>
  109. <if test=" cdb != null">
  110. cdb,
  111. </if>
  112. <if test=" hlm != null">
  113. hlm,
  114. </if>
  115. <if test=" mtTime != null and mtTime!='' ">
  116. mtTime,
  117. </if>
  118. <if test=" sml != null">
  119. sml,
  120. </if>
  121. <if test=" zjml != null">
  122. zjml,
  123. </if>
  124. <if test=" hyl != null">
  125. hyl,
  126. </if>
  127. <if test=" otms != null">
  128. otms,
  129. </if>
  130. <if test=" mbl != null">
  131. mbl,
  132. </if>
  133. <if test=" rxsl != null">
  134. rxsl,
  135. </if>
  136. <if test=" bz != null">
  137. bz,
  138. </if>
  139. <if test=" classes != null">
  140. classes,
  141. </if>
  142. <if test=" htype != null">
  143. htype,
  144. </if>
  145. <if test=" houseId != null">
  146. house_id,
  147. </if>
  148. <if test=" fileUuid != null">
  149. file_uuid
  150. </if>
  151. </trim>
  152. <trim prefix="values (" suffix=")" suffixOverrides=",">
  153. <!--<if test="id !=null">
  154. #{id},
  155. </if>-->
  156. <if test=" uuid != null">
  157. #{uuid}, </if>
  158. <if test=" jcTime != null">
  159. #{jcTime},
  160. </if>
  161. <if test=" smj != null">
  162. #{smj},
  163. </if>
  164. <if test=" cdb != null">
  165. #{cdb},
  166. </if>
  167. <if test=" hlm != null">
  168. #{hlm},
  169. </if>
  170. <if test=" mtTime != null and mtTime!='' ">
  171. #{mtTime},
  172. </if>
  173. <if test=" sml != null">
  174. #{sml},
  175. </if>
  176. <if test=" zjml != null">
  177. #{zjml},
  178. </if>
  179. <if test=" hyl != null">
  180. #{hyl},
  181. </if>
  182. <if test=" otms != null">
  183. #{otms},
  184. </if>
  185. <if test=" mbl != null">
  186. #{mbl},
  187. </if>
  188. <if test=" rxsl != null">
  189. #{rxsl},
  190. </if>
  191. <if test=" bz != null">
  192. #{bz},
  193. </if>
  194. <if test=" classes != null">
  195. #{classes}, </if>
  196. <if test=" htype != null">
  197. #{htype}, </if>
  198. <if test=" houseId != null">
  199. #{houseId}, </if>
  200. <if test=" fileUuid != null">
  201. #{fileUuid}
  202. </if>
  203. </trim>
  204. </insert>
  205. </mapper>