DailyRecordWindrainsnowDao.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  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.DailyRecordWindrainsnowDao">
  4. <resultMap type="cn.ourwill.module.house.entity.daily.DailyRecordWindrainsnow" id="baseMap">
  5. <result column="id" property="id"/>
  6. <result column="uuid" property="uuid"/>
  7. <result column="house_id" property="houseId"/>
  8. <result column="check_date" property="checkDate"/>
  9. <result column="check_sign" property="checkSign"/>
  10. <result column="custodian_sign" property="custodianSign"/>
  11. <result column="remark" property="remark"/>
  12. <result column="pre_window_close" property="preWindowClose"/>
  13. <result column="pre_water_clean" property="preWaterClean"/>
  14. <result column="doing_weather" property="doingWeather"/>
  15. <result column="doing_window_close" property="doingWindowClose"/>
  16. <result column="doing_water_clean" property="doingWaterClean"/>
  17. <result column="doing_water_in" property="doingWaterIn"/>
  18. <result column="doing_water_in_position" property="doingWaterInPosition"/>
  19. <result column="doing_water_in_solution" property="doingWaterInSolution"/>
  20. <result column="post_check_date" property="postCheckDate"/>
  21. <result column="post_house_temp" property="postHouseTemp"/>
  22. <result column="post_house_water" property="postHouseWater"/>
  23. <result column="post_water_in" property="postWaterIn"/>
  24. <result column="post_water_in_position" property="postWaterInPosition"/>
  25. <result column="post_water_in_solution" property="postWaterInSolution"/>
  26. <result column="c_id" property="cId"/>
  27. <result column="c_time" property="cTime"/>
  28. <result column="u_id" property="uId"/>
  29. <result column="u_time" property="uTime"/>
  30. <result column="version" property="version"/>
  31. <result column="sync_flag" property="syncFlag"/>
  32. </resultMap>
  33. <sql id="columns">
  34. id ,
  35. uuid ,
  36. house_id ,
  37. check_date,
  38. check_sign,
  39. custodian_sign,
  40. remark,
  41. pre_window_close,
  42. pre_water_clean,
  43. doing_weather,
  44. doing_window_close,
  45. doing_water_clean,
  46. doing_water_in,
  47. doing_water_in_position,
  48. doing_water_in_solution,
  49. post_check_date,
  50. post_house_temp,
  51. post_house_water,
  52. post_water_in,
  53. post_water_in_position,
  54. post_water_in_solution,
  55. c_id ,
  56. c_time ,
  57. u_id ,
  58. u_time ,
  59. version,
  60. sync_flag
  61. </sql>
  62. <sql id="joinCols">
  63. </sql>
  64. <select id="get" resultMap="baseMap">
  65. SELECT
  66. <include refid="columns"/>
  67. FROM windrainsnow_check a
  68. <include refid="joinCols"/>
  69. WHERE a.id = #{id}
  70. </select>
  71. <select id="getByUuid" resultMap="baseMap">
  72. SELECT
  73. <include refid="columns"/>
  74. FROM windrainsnow_check a
  75. <include refid="joinCols"/>
  76. WHERE a.uuid = #{uuid}
  77. </select>
  78. <update id="updateByUuid" parameterType="cn.ourwill.module.house.entity.daily.DailyRecordWindrainsnow">
  79. UPDATE windrainsnow_check <set>
  80. <if test="uuid != null">
  81. uuid=#{uuid},
  82. </if>
  83. <if test="houseId != null">
  84. house_id=#{houseId},
  85. </if>
  86. <if test="checkDate !=null">
  87. check_date=#{checkDate},
  88. </if>
  89. <if test="checkSign !=null">
  90. check_sign=#{checkSign},
  91. </if>
  92. <if test="custodianSign !=null">
  93. custodian_sign=#{custodianSign},
  94. </if>
  95. <if test="remark !=null">
  96. remark=#{remark},
  97. </if>
  98. <if test="preWindowClose !=null">
  99. pre_window_close=#{preWindowClose},
  100. </if>
  101. <if test="preWaterClean !=null">
  102. pre_water_clean=#{preWaterClean},
  103. </if>
  104. <if test="doingWeather !=null">
  105. doing_weather=#{doingWeather},
  106. </if>
  107. <if test="doingWindowClose !=null">
  108. doing_window_close=#{doingWindowClose},
  109. </if>
  110. <if test="doingWaterClean !=null">
  111. doing_water_clean=#{doingWaterClean},
  112. </if>
  113. <if test="doingWaterIn !=null">
  114. doing_water_in=#{doingWaterIn},
  115. </if>
  116. <if test="doingWaterInPosition !=null">
  117. doing_water_in_position=#{doingWaterInPosition},
  118. </if>
  119. <if test="doingWaterInSolution !=null">
  120. doing_water_in_solution=#{doingWaterInSolution},
  121. </if>
  122. <if test="postCheckDate !=null">
  123. post_check_date=#{postCheckDate},
  124. </if>
  125. <if test="postHouseTemp !=null">
  126. post_house_temp=#{postHouseTemp},
  127. </if>
  128. <if test="postHouseWater !=null">
  129. post_house_water=#{postHouseWater},
  130. </if>
  131. <if test="postWaterIn !=null">
  132. post_water_in=#{postWaterIn},
  133. </if>
  134. <if test="postWaterInPosition !=null">
  135. post_water_in_position=#{postWaterInPosition},
  136. </if>
  137. <if test="postWaterInSolution !=null">
  138. post_water_in_solution=#{postWaterInSolution},
  139. </if>
  140. <if test="cId !=null">
  141. c_id=#{cId},
  142. </if>
  143. <if test="cTime !=null">
  144. c_time=#{cTime},
  145. </if>
  146. <if test="uId !=null">
  147. u_id=#{uId},
  148. </if>
  149. <if test="uTime !=null">
  150. u_time=#{uTime},
  151. </if>
  152. <if test="version !=null">
  153. version=#{version}
  154. </if>
  155. <!--<if test="syncFlag !=null">
  156. sync_flag=#{syncFlag}
  157. </if>-->
  158. </set>
  159. WHERE uuid = #{uuid}
  160. </update>
  161. <select id="findNoUuidList" resultMap="baseMap">
  162. SELECT
  163. <include refid="columns"/>
  164. FROM windrainsnow_check a
  165. <include refid="joinCols"/>
  166. WHERE a.uuid is null or trim(a.uuid) = '';
  167. </select>
  168. <select id="findList" resultMap="baseMap">
  169. SELECT
  170. <include refid="columns"/>
  171. FROM windrainsnow_check a
  172. <include refid="joinCols"/>
  173. <where>
  174. <if test="id !=null">
  175. and id = #{id}
  176. </if>
  177. <if test="searchStartDate !=null">
  178. and STR_TO_DATE(check_date, '%Y-%m-%d') <![CDATA[ >= ]]> #{searchStartDate}
  179. </if>
  180. <if test="searchEndDate !=null">
  181. and STR_TO_DATE(check_date, '%Y-%m-%d') &lt;= #{searchEndDate}
  182. </if>
  183. <if test="uuid !=null">
  184. and uuid = #{uuid}
  185. </if>
  186. <if test="houseId !=null">
  187. and house_id = #{houseId}
  188. </if>
  189. <if test="checkDate !=null">
  190. and check_date = #{checkDate}
  191. </if>
  192. <if test="checkSign !=null">
  193. and check_sign = #{checkSign}
  194. </if>
  195. <if test="custodianSign !=null">
  196. and custodian_sign = #{custodianSign}
  197. </if>
  198. <if test="remark !=null">
  199. and remark = #{remark}
  200. </if>
  201. <if test="preWindowClose !=null">
  202. and pre_window_close = #{preWindowClose}
  203. </if>
  204. <if test="preWaterClean !=null">
  205. and pre_water_clean = #{preWaterClean}
  206. </if>
  207. <if test="doingWeather !=null">
  208. and doing_weather = #{doingWeather}
  209. </if>
  210. <if test="doingWindowClose !=null">
  211. and doing_window_close = #{doingWindowClose}
  212. </if>
  213. <if test="doingWaterClean !=null">
  214. and doing_water_clean = #{doingWaterClean}
  215. </if>
  216. <if test="doingWaterIn !=null">
  217. and doing_water_in = #{doingWaterIn}
  218. </if>
  219. <if test="doingWaterInPosition !=null">
  220. and doing_water_in_position = #{doingWaterInPosition}
  221. </if>
  222. <if test="doingWaterInSolution !=null">
  223. and doing_water_in_solution = #{doingWaterInSolution}
  224. </if>
  225. <if test="postCheckDate !=null">
  226. and post_check_date = #{postCheckDate}
  227. </if>
  228. <if test="postHouseTemp !=null">
  229. and post_house_temp = #{postHouseTemp}
  230. </if>
  231. <if test="postHouseWater !=null">
  232. and post_house_water = #{postHouseWater}
  233. </if>
  234. <if test="postWaterIn !=null">
  235. and post_water_in = #{postWaterIn}
  236. </if>
  237. <if test="postWaterInPosition !=null">
  238. and post_water_in_position = #{postWaterInPosition}
  239. </if>
  240. <if test="postWaterInSolution !=null">
  241. and post_water_in_solution = #{postWaterInSolution}
  242. </if>
  243. <if test="cId !=null">
  244. and c_id = #{cId}
  245. </if>
  246. <if test="cTime !=null">
  247. and c_time = #{cTime}
  248. </if>
  249. <if test="uId !=null">
  250. and u_id = #{uId}
  251. </if>
  252. <if test="uTime !=null">
  253. and u_time = #{uTime}
  254. </if>
  255. <if test="version !=null">
  256. and version = #{version}
  257. </if>
  258. <if test="syncFlag !=null">
  259. and sync_flag = #{syncFlag}
  260. </if>
  261. </where>
  262. <choose>
  263. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  264. ORDER BY ${page.orderBy}
  265. </when>
  266. <otherwise>
  267. order by id desc
  268. </otherwise>
  269. </choose>
  270. </select>
  271. <select id="findAllList" resultMap="baseMap">
  272. SELECT
  273. <include refid="columns"/>
  274. FROM windrainsnow_check a
  275. <include refid="joinCols"/>
  276. <where>
  277. <if test="id !=null">
  278. and id = #{id}
  279. </if>
  280. <if test="searchStartDate !=null">
  281. and STR_TO_DATE(check_date, '%Y-%m-%d') <![CDATA[ >= ]]> #{searchStartDate}
  282. </if>
  283. <if test="searchEndDate !=null">
  284. and STR_TO_DATE(check_date, '%Y-%m-%d') &lt;= #{searchEndDate}
  285. </if>
  286. <if test="uuid !=null">
  287. and uuid = #{uuid}
  288. </if>
  289. <if test="houseId !=null">
  290. and house_id = #{houseId}
  291. </if>
  292. <if test="checkDate !=null">
  293. and check_date = #{checkDate}
  294. </if>
  295. <if test="checkSign !=null">
  296. and check_sign = #{checkSign}
  297. </if>
  298. <if test="custodianSign !=null">
  299. and custodian_sign = #{custodianSign}
  300. </if>
  301. <if test="remark !=null">
  302. and remark = #{remark}
  303. </if>
  304. <if test="preWindowClose !=null">
  305. and pre_window_close = #{preWindowClose}
  306. </if>
  307. <if test="preWaterClean !=null">
  308. and pre_water_clean = #{preWaterClean}
  309. </if>
  310. <if test="doingWeather !=null">
  311. and doing_weather = #{doingWeather}
  312. </if>
  313. <if test="doingWindowClose !=null">
  314. and doing_window_close = #{doingWindowClose}
  315. </if>
  316. <if test="doingWaterClean !=null">
  317. and doing_water_clean = #{doingWaterClean}
  318. </if>
  319. <if test="doingWaterIn !=null">
  320. and doing_water_in = #{doingWaterIn}
  321. </if>
  322. <if test="doingWaterInPosition !=null">
  323. and doing_water_in_position = #{doingWaterInPosition}
  324. </if>
  325. <if test="doingWaterInSolution !=null">
  326. and doing_water_in_solution = #{doingWaterInSolution}
  327. </if>
  328. <if test="postCheckDate !=null">
  329. and post_check_date = #{postCheckDate}
  330. </if>
  331. <if test="postHouseTemp !=null">
  332. and post_house_temp = #{postHouseTemp}
  333. </if>
  334. <if test="postHouseWater !=null">
  335. and post_house_water = #{postHouseWater}
  336. </if>
  337. <if test="postWaterIn !=null">
  338. and post_water_in = #{postWaterIn}
  339. </if>
  340. <if test="postWaterInPosition !=null">
  341. and post_water_in_position = #{postWaterInPosition}
  342. </if>
  343. <if test="postWaterInSolution !=null">
  344. and post_water_in_solution = #{postWaterInSolution}
  345. </if>
  346. <if test="cId !=null">
  347. and c_id = #{cId}
  348. </if>
  349. <if test="cTime !=null">
  350. and c_time = #{cTime}
  351. </if>
  352. <if test="uId !=null">
  353. and u_id = #{uId}
  354. </if>
  355. <if test="uTime !=null">
  356. and u_time = #{uTime}
  357. </if>
  358. <if test="version !=null">
  359. and version = #{version}
  360. </if>
  361. <if test="syncFlag !=null">
  362. and sync_flag = #{syncFlag}
  363. </if>
  364. </where>
  365. <choose>
  366. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  367. ORDER BY ${page.orderBy}
  368. </when>
  369. <otherwise>
  370. </otherwise>
  371. </choose>
  372. </select>
  373. <select id="findListByHouseId" resultMap="baseMap" parameterType="Map">
  374. SELECT
  375. <include refid="columns"/>
  376. from windrainsnow_check drfk
  377. where type = 0
  378. <if test="houseId !=null">
  379. and drfk.house_id = #{houseId}
  380. </if>
  381. <if test="beginDate !=null and beginDate!=''">
  382. and drfk.check_date &gt;= str_to_date(#{beginDate},'%Y-%m-%d')
  383. </if>
  384. <if test="endDate !=null and endDate!=''">
  385. and drfk.check_date &lt; str_to_date(#{endDate},'%Y-%m-%d')
  386. </if>
  387. order by str_to_date(drfk.check_date,'%Y-%m-%d') asc,drfk.id desc
  388. </select>
  389. <insert id="insert" keyColumn="id" keyProperty="id" useGeneratedKeys="true"
  390. parameterType="cn.ourwill.module.house.entity.daily.DailyRecordWindrainsnow">
  391. INSERT INTO windrainsnow_check
  392. <trim prefix="(" suffix=")" suffixOverrides=",">
  393. <if test="id != null">
  394. id,
  395. </if>
  396. <if test="uuid != null">
  397. uuid,
  398. </if>
  399. <if test="houseId != null">
  400. house_id,
  401. </if>
  402. <if test="checkDate !=null and checkDate!='' ">
  403. check_date,
  404. </if>
  405. <if test="checkSign !=null">
  406. check_sign,
  407. </if>
  408. <if test="custodianSign !=null">
  409. custodian_sign,
  410. </if>
  411. <if test="remark !=null">
  412. remark,
  413. </if>
  414. <if test="preWindowClose !=null">
  415. pre_window_close,
  416. </if>
  417. <if test="preWaterClean !=null">
  418. pre_water_clean,
  419. </if>
  420. <if test="doingWeather !=null">
  421. doing_weather,
  422. </if>
  423. <if test="doingWindowClose !=null">
  424. doing_window_close,
  425. </if>
  426. <if test="doingWaterClean !=null">
  427. doing_water_clean,
  428. </if>
  429. <if test="doingWaterIn !=null">
  430. doing_water_in,
  431. </if>
  432. <if test="doingWaterInPosition !=null">
  433. doing_water_in_position,
  434. </if>
  435. <if test="doingWaterInSolution !=null">
  436. doing_water_in_solution,
  437. </if>
  438. <if test="postCheckDate !=null and postCheckDate!=''">
  439. post_check_date,
  440. </if>
  441. <if test="postHouseTemp !=null">
  442. post_house_temp,
  443. </if>
  444. <if test="postHouseWater !=null">
  445. post_house_water,
  446. </if>
  447. <if test="postWaterIn !=null">
  448. post_water_in,
  449. </if>
  450. <if test="postWaterInPosition !=null">
  451. post_water_in_position,
  452. </if>
  453. <if test="postWaterInSolution !=null">
  454. post_water_in_solution,
  455. </if>
  456. <if test="cId !=null">
  457. c_id,
  458. </if>
  459. <if test="cTime !=null">
  460. c_time,
  461. </if>
  462. <if test="uId !=null">
  463. u_id,
  464. </if>
  465. <if test="uTime !=null">
  466. u_time,
  467. </if>
  468. <if test="version !=null">
  469. version
  470. </if>
  471. <!--<if test="syncFlag !=null">
  472. sync_flag,
  473. </if>-->
  474. </trim>
  475. <trim prefix="values (" suffix=")" suffixOverrides=",">
  476. <if test=" id != null">
  477. #{id}, </if>
  478. <if test=" uuid != null">
  479. #{uuid}, </if>
  480. <if test=" houseId != null">
  481. #{houseId}, </if>
  482. <if test="checkDate !=null and checkDate!=''" >
  483. #{checkDate},
  484. </if>
  485. <if test="checkSign !=null">
  486. #{checkSign},
  487. </if>
  488. <if test="custodianSign !=null">
  489. #{custodianSign},
  490. </if>
  491. <if test="remark !=null">
  492. #{remark},
  493. </if>
  494. <if test="preWindowClose !=null">
  495. #{preWindowClose},
  496. </if>
  497. <if test="preWaterClean !=null">
  498. #{preWaterClean},
  499. </if>
  500. <if test="doingWeather !=null">
  501. #{doingWeather},
  502. </if>
  503. <if test="doingWindowClose !=null">
  504. #{doingWindowClose},
  505. </if>
  506. <if test="doingWaterClean !=null">
  507. #{doingWaterClean},
  508. </if>
  509. <if test="doingWaterIn !=null">
  510. #{doingWaterIn},
  511. </if>
  512. <if test="doingWaterInPosition !=null">
  513. #{doingWaterInPosition},
  514. </if>
  515. <if test="doingWaterInSolution !=null">
  516. #{doingWaterInSolution},
  517. </if>
  518. <if test="postCheckDate !=null and postCheckDate!=''">
  519. #{postCheckDate},
  520. </if>
  521. <if test="postHouseTemp !=null">
  522. #{postHouseTemp},
  523. </if>
  524. <if test="postHouseWater !=null">
  525. #{postHouseWater},
  526. </if>
  527. <if test="postWaterIn !=null">
  528. #{postWaterIn},
  529. </if>
  530. <if test="postWaterInPosition !=null">
  531. #{postWaterInPosition},
  532. </if>
  533. <if test="postWaterInSolution !=null">
  534. #{postWaterInSolution},
  535. </if>
  536. <if test="cId !=null">
  537. #{cId},
  538. </if>
  539. <if test="cTime !=null">
  540. #{cTime},
  541. </if>
  542. <if test="uId !=null">
  543. #{uId},
  544. </if>
  545. <if test="uTime !=null">
  546. #{uTime},
  547. </if>
  548. <if test="version !=null">
  549. #{version}
  550. </if>
  551. <!--<if test="syncFlag !=null">
  552. #{syncFlag}
  553. </if>-->
  554. </trim>
  555. </insert>
  556. <update id="update" parameterType="cn.ourwill.module.house.entity.daily.DailyRecordWindrainsnow">
  557. UPDATE windrainsnow_check <set>
  558. <if test="id != null">
  559. id=#{id},
  560. </if>
  561. <if test="uuid != null">
  562. uuid=#{uuid},
  563. </if>
  564. <if test="houseId != null">
  565. house_id=#{houseId},
  566. </if>
  567. <if test="checkDate !=null">
  568. check_date=#{checkDate},
  569. </if>
  570. <if test="checkSign !=null">
  571. check_sign=#{checkSign},
  572. </if>
  573. <if test="custodianSign !=null">
  574. custodian_sign=#{custodianSign},
  575. </if>
  576. <if test="remark !=null">
  577. remark=#{remark},
  578. </if>
  579. <if test="preWindowClose !=null">
  580. pre_window_close=#{preWindowClose},
  581. </if>
  582. <if test="preWaterClean !=null">
  583. pre_water_clean=#{preWaterClean},
  584. </if>
  585. <if test="doingWeather !=null">
  586. doing_weather=#{doingWeather},
  587. </if>
  588. <if test="doingWindowClose !=null">
  589. doing_window_close=#{doingWindowClose},
  590. </if>
  591. <if test="doingWaterClean !=null">
  592. doing_water_clean=#{doingWaterClean},
  593. </if>
  594. <if test="doingWaterIn !=null">
  595. doing_water_in=#{doingWaterIn},
  596. </if>
  597. <if test="doingWaterInPosition !=null">
  598. doing_water_in_position=#{doingWaterInPosition},
  599. </if>
  600. <if test="doingWaterInSolution !=null">
  601. doing_water_in_solution=#{doingWaterInSolution},
  602. </if>
  603. <if test="postCheckDate !=null">
  604. post_check_date=#{postCheckDate},
  605. </if>
  606. <if test="postHouseTemp !=null">
  607. post_house_temp=#{postHouseTemp},
  608. </if>
  609. <if test="postHouseWater !=null">
  610. post_house_water=#{postHouseWater},
  611. </if>
  612. <if test="postWaterIn !=null">
  613. post_water_in=#{postWaterIn},
  614. </if>
  615. <if test="postWaterInPosition !=null">
  616. post_water_in_position=#{postWaterInPosition},
  617. </if>
  618. <if test="postWaterInSolution !=null">
  619. post_water_in_solution=#{postWaterInSolution},
  620. </if>
  621. <if test="cId !=null">
  622. c_id=#{cId},
  623. </if>
  624. <if test="cTime !=null">
  625. c_time=#{cTime},
  626. </if>
  627. <if test="uId !=null">
  628. u_id=#{uId},
  629. </if>
  630. <if test="uTime !=null">
  631. u_time=#{uTime},
  632. </if>
  633. <if test="version !=null">
  634. version=#{version},
  635. </if>
  636. <if test="syncFlag !=null">
  637. sync_flag=#{syncFlag}
  638. </if>
  639. </set>
  640. WHERE id = #{id}
  641. </update>
  642. <delete id="deleteById" parameterType="cn.ourwill.module.house.entity.daily.DailyRecordWindrainsnow">
  643. DELETE FROM windrainsnow_check WHERE id=#{id}
  644. </delete>
  645. <select id="findByHouseIdNoPage" resultMap="baseMap">
  646. SELECT *
  647. FROM windrainsnow_check
  648. where house_id=#{houseId}
  649. <if test="cTime != null">
  650. AND post_check_date <![CDATA[ <= ]]> #{cTime}
  651. </if>
  652. </select>
  653. <select id="findHouseId" resultMap="baseMap">
  654. SELECT *
  655. FROM windrainsnow_check
  656. <where>
  657. <if test="houseId !=null">
  658. and house_id = #{houseId}
  659. </if>
  660. <if test="cTime !=null">
  661. and c_time like CONCAT('%',#{cTime},'%')
  662. </if>
  663. </where>
  664. order by check_date asc limit #{num},#{size}
  665. </select>
  666. <delete id="deleteWindrainsnowByHouseId">
  667. DELETE FROM windrainsnow_check
  668. WHERE house_id = #{houseId}
  669. <if test="cTime != null">
  670. AND post_check_date <![CDATA[ <= ]]> #{cTime}
  671. </if>
  672. </delete>
  673. </mapper>