BusInfusionHistoryMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  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="com.nb.bus.mapper.BusInfusionHistoryMapper">
  4. <resultMap id="combineResult" type="com.nb.bus.service.dto.CombineResult">
  5. <result column="infusion_id" property="id"/>
  6. <result column="clinic_start_time" property="clinicStartTime"/>
  7. <result column="clinic_end_time" property="clinicEndTime"/>
  8. <result column="patient_id" property="patientId"/>
  9. <result column="device_id" property="deviceId"/>
  10. <result column="classification" property="classification"/>
  11. <result column="data_num" property="dataNumber"/>
  12. <result column="clinic_id" property="clinicId"/>
  13. <result column="device_type" property="type"/>
  14. <result column="patient_code" property="patientCode"/>
  15. <result column="ward" property="ward"/>
  16. <result column="bed_no" property="bedNo"/>
  17. <result column="total_dose" property="totalDose"/>
  18. <result column="first_dose" property="firstDose"/>
  19. <result column="remain_dose" property="remainDose"/>
  20. <result column="input_dose" property="inputDose"/>
  21. <result column="append_dose" property="appendDose"/>
  22. <result column="append_lock_time" property="appendLockTime"/>
  23. <result column="max_dose" property="maxDose"/>
  24. <result column="self_control_count" property="selfControlCount"/>
  25. <result column="self_control_lock_time" property="selfControlLockTime"/>
  26. <result column="pca_valid_count" property="pcaValidCount"/>
  27. <result column="pca_invalid_count" property="pcaInvalidCount"/>
  28. <result column="pca_total_count" property="pcaTotalCount"/>
  29. <result column="continue_dose" property="continueDose"/>
  30. <result column="pulse_dose" property="pulseDose"/>
  31. <result column="pulse_first_lock_time" property="pulseFirstLockTime"/>
  32. <result column="pulse_lock_time" property="pulseLockTime"/>
  33. <result column="flow_up_cycle" property="flowUpCycle"/>
  34. <result column="flow_down_cycle" property="flowDownCycle"/>
  35. <result column="flow_count" property="flowCount"/>
  36. <result column="flow_up_limit" property="flowUpLimit"/>
  37. <result column="flow_down_limit" property="flowDownLimit"/>
  38. <result column="flow_adjust_rate" property="flowAdjustRate"/>
  39. <result column="electric_quantity" property="electricQuantity"/>
  40. <result column="run_state" property="runState"/>
  41. <result column="alarm" property="alarm"/>
  42. <result column="warn_flow" property="warnFlow"/>
  43. <result column="warn_analgesic_poor" property="warnAnalgesicPoor"/>
  44. <result column="warn_low_battery" property="warnLowBattery"/>
  45. <result column="warn_will_finished" property="warnWillFinished"/>
  46. <result column="infusion_start_time" property="infusionStartTime"/>
  47. <result column="patient_name" property="patientName"/>
  48. <result column="infusion_start_time" property="infusionStartTime"/>
  49. <result column="infusion_finished" property="infusionFinished"/>
  50. <result column="is_undo" property="isUndo"/>
  51. <result column="last_upload_time" property="lastUploadTime"/>
  52. <result column="undo_by" property="undoBy"/>
  53. <result column="destroyer" property="destroyer"/>
  54. <result column="witnesses" property="witnesses"/>
  55. <result column="undo_time" property="undoTime"/>
  56. <result column="surgery_name" property="surgeryName"/>
  57. <result column="asa" property="asa"/>
  58. <result column="patient_gender" property="patientGender"/>
  59. <result column="patient_name" property="patientName"/>
  60. <result column="patient_age" property="patientAge"/>
  61. <result column="weight" property="weight"/>
  62. <result column="height" property="height"/>
  63. <result column="ana_doctor" property="anaDoctor"/>
  64. <result column="ana_type" property="anaType"/>
  65. <result column="anal_type" property="analType"/>
  66. <result column="surgery_doctor" property="surgeryDoctor"/>
  67. <result column="surgery_name" property="surgeryName"/>
  68. <result column="formula" property="formula" typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
  69. <result column="entrust" property="entrust"/>
  70. </resultMap>
  71. <resultMap id="combineAlarmResult" type="com.nb.bus.service.dto.CombineAlarmResult">
  72. <result column="device_type" property="type"/>
  73. <result column="alarm_time" property="alarmTime"/>
  74. <result column="infusion_id" property="id"/>
  75. <result column="infusion_start_time" property="infusionStartTime"/>
  76. <result column="cause" property="cause"/>
  77. <result column="alarm" property="isAlarm"/>
  78. <result column="run_state" property="runState"/>
  79. <result column="alarm_state" property="alarm"/>
  80. <result column="warn_will_finished" property="warnWillFinished"/>
  81. <result column="warn_analgesic_poor" property="warnAnalgesicPoor"/>
  82. <result column="warn_low_battery" property="warnLowBattery"/>
  83. <result column="warn_flow" property="warnFlow"/>
  84. </resultMap>
  85. <resultMap id="combineEvalResult" type="com.nb.bus.service.dto.CombineEvalResult">
  86. <result column="evaluate_time" property="evalTime"/>
  87. <result column="infusion_id" property="id"/>
  88. <result column="last_upload_time" property="lastUploadTime"/>
  89. <result column="eval_id" property="evalId"/>
  90. <result column="infusion_start_time" property="infusionStartTime"/>
  91. <result column="statics" property="statics"/>
  92. <result column="activity" property="activity"/>
  93. <result column="calm" property="calm"/>
  94. <result column="left_arm" property="leftArm"/>
  95. <result column="left_leg" property="leftLeg"/>
  96. <result column="right_arm" property="rightArm"/>
  97. <result column="right_leg" property="rightLeg"/>
  98. <result column="nausea_vomit" property="nauseaVomit"/>
  99. <result column="itch" property="itch"/>
  100. <result column="vertigo" property="vertigo"/>
  101. <result column="sore_throat" property="soreThroat"/>
  102. <result column="uroschesis" property="uroschesis"/>
  103. <result column="breath_depression" property="breathDepression"/>
  104. <result column="hoarseness" property="hoarseness"/>
  105. <result column="cognition_obstacle" property="cognitionObstacle"/>
  106. <result column="satisfaction" property="satisfaction"/>
  107. <result column="shrink_pressure" property="shrinkPressure"/>
  108. <result column="diastens_pressure" property="diastensPressure"/>
  109. <result column="heart_rate" property="heartRate"/>
  110. <result column="fetal_heart_rate" property="fetalHeartRate"/>
  111. <result column="breath_rate" property="breathRate"/>
  112. <result column="blood_oxygen_saturation" property="bloodOxygenSaturation"/>
  113. </resultMap>
  114. <resultMap id="queryStatsHistory" type="com.nb.bus.service.dto.CombineHistoryResult">
  115. <result column="infusion_id" property="id"/>
  116. <result column="patient_id" property="patientId"/>
  117. <result column="device_id" property="deviceId"/>
  118. <result column="clinic_id" property="clinicId"/>
  119. <result column="history_id" property="historyId"/>
  120. <result column="device_type" property="type"/>
  121. <result column="total_append_dose" property="totalAppendDose"/>
  122. <result column="input_dose" property="inputDose"/>
  123. <result column="continue_dose" property="continueDose"/>
  124. <result column="self_control_lock_time" property="selfControlLockTime"/>
  125. <result column="pca_valid_count" property="pcaValidCount"/>
  126. <result column="pca_invalid_count" property="pcaInvalidCount"/>
  127. <result column="pca_total_count" property="pcaTotalCount"/>
  128. <result column="upload_time" property="uploadTime"/>
  129. </resultMap>
  130. <select id="currentInClinic" resultType="com.nb.bus.entity.BusInfusionHistoryEntity">
  131. select d.alias,i.* from
  132. (select * from bus_infusion_history where clinic_id=#{clinicId} ORDER BY start_time desc limit 1) as i
  133. left join bus_device as d on d.device_id=i.device_id
  134. </select>
  135. <select id="queryPage" resultMap="combineResult">
  136. select
  137. i.id as infusion_id,
  138. i.device_id as device_id,
  139. i.classification as classification,
  140. i.data_number as data_number,
  141. i.clinic_id as clinic_id,
  142. i.type as device_type,
  143. i.patient_code as patient_code,
  144. c.ward as ward,
  145. c.bed_no as bed_no,
  146. p.id as patient_id,
  147. i.total_dose as total_dose,
  148. i.first_dose as first_dose,
  149. i.remain_dose as remain_dose,
  150. i.input_dose as input_dose,
  151. i.append_dose as append_dose,
  152. i.append_lock_time as append_lock_time,
  153. i.max_dose as max_dose,
  154. i.self_control_count as self_control_count,
  155. i.self_control_lock_time as self_control_lock_time,
  156. i.pca_valid_count as pca_valid_count,
  157. i.pca_invalid_count as pca_invalid_count,
  158. i.pca_total_count as pca_total_count,
  159. i.continue_dose as continue_dose,
  160. i.pulse_dose as pulse_dose,
  161. i.pulse_lock_time as pulse_lock_time,
  162. i.pulse_first_lock_time as pulse_first_lock_time,
  163. i.flow_up_cycle as flow_up_cycle,
  164. i.flow_down_cycle as flow_down_cycle,
  165. i.flow_count as flow_count,
  166. i.flow_up_limit as flow_up_limit,
  167. i.flow_down_limit as flow_down_limit,
  168. i.flow_adjust_rate as flow_adjust_rate,
  169. i.electric_quantity as electric_quantity,
  170. i.run_state as run_state,
  171. i.alarm as alarm,
  172. i.warn_will_finished as warn_will_finished,
  173. i.warn_analgesic_poor as warn_analgesic_poor,
  174. i.warn_low_battery as warn_low_battery,
  175. i.start_time as infusion_start_time,
  176. i.warn_flow as warn_flow,
  177. i.finished as infusion_finished,
  178. i.is_undo as is_undo,
  179. i.last_upload_time as last_upload_time,
  180. i.undo_by as undo_by,
  181. i.destroyer as destroyer,
  182. i.witnesses as witnesses,
  183. i.undo_time as undo_time,
  184. c.surgery_name as surgery_name,
  185. c.asa as asa,
  186. c.patient_gender as patient_gender,
  187. c.`patient_name` as patient_name,
  188. c.`patient_age` as patient_age,
  189. c.weight as weight,
  190. c.`height` as height,
  191. c.ana_doctor as ana_doctor,
  192. c.ana_type as ana_type,
  193. c.anal_type as anal_type,
  194. c.surgery_doctor as surgery_doctor,
  195. c.formula as formula,
  196. c.entrust as entrust
  197. from (
  198. <include refid="commonInfusionQuery"/>
  199. ) as i
  200. JOIN (
  201. <include refid="commonClinicQuery"/>
  202. ) as c
  203. on i.clinic_id=c.id
  204. join (select * from bus_patient
  205. <where>
  206. <if test="query.patientCode != null">
  207. and code like concat('%',#{query.patientCode},'%')
  208. </if>
  209. </where>
  210. ) as p on p.id = c.patient_id
  211. <if test="query.warns != null or query.deviceAlarm != null">
  212. JOIN (
  213. <include refid="commonDeviceAlarmQuery"/>
  214. ) as a
  215. on a.infusion_id = i.id
  216. </if>
  217. <if test="(query.orderByDesc!=null and query.orderByDesc.size > 0) or (query.orderByAsc!=null and query.orderByAsc.size > 0)">
  218. order by
  219. </if>
  220. <if test="query.orderByDesc!=null and query.orderByDesc.size > 0">
  221. <foreach item="descItem" index="index" collection="query.orderByDesc" open="" separator="," close="">
  222. -- !!!!这里使用$不要使用#,否自只是对列名(字符串)进行排序,而不是进行列排序
  223. ${descItem} desc
  224. </foreach>
  225. </if>
  226. <if test="query.orderByAsc!=null and query.orderByAsc.size > 0">
  227. <if test="query.orderByDesc!=null and query.orderByDesc.size > 0">
  228. ,
  229. </if>
  230. <foreach item="ascItem" index="index" collection="query.orderByAsc" open="" separator="," close="">
  231. ${ascItem} asc
  232. </foreach>
  233. </if>
  234. </select>
  235. <select id="queryStatsAlarm" resultMap="combineAlarmResult">
  236. select
  237. i.type as device_type,
  238. i.id as infusion_id,
  239. i.start_time as infusion_start_time,
  240. a.cause as cause,
  241. i.patient_code as patient_code,
  242. a.upload_time as alarm_time,
  243. a.alarm as alarm,
  244. a.run_state as run_state,
  245. a.alarm_state as alarm_state,
  246. a.warn_will_finished as warn_will_finished,
  247. a.warn_low_battery as warn_low_battery,
  248. a.warn_analgesic_poor as warn_analgesic_poor,
  249. a.warn_flow as warn_flow
  250. from (
  251. <include refid="commonInfusionQuery"/>
  252. ) as i
  253. JOIN (
  254. <include refid="commonClinicQuery"/>
  255. ) as c
  256. on i.clinic_id=c.id
  257. JOIN(
  258. <include refid="commonDeviceAlarmQuery"/>
  259. ) as a
  260. on a.infusion_id = i.id
  261. </select>
  262. <select id="queryStatsCommon" resultMap="combineResult">
  263. select
  264. i.id as infusion_id,
  265. i.device_id as device_id,
  266. i.pca_valid_count as pca_valid_count,
  267. i.pca_invalid_count as pca_invalid_count,
  268. i.pca_total_count as pca_total_count,
  269. i.start_time as infusion_start_time,
  270. i.continue_dose as continue_dose,
  271. i.input_dose as input_dose,
  272. i.append_dose as append_dose,
  273. i.self_control_lock_time as self_control_lock_time,
  274. i.patient_code as patient_code,
  275. c.monitor_start_time as clinic_start_time,
  276. c.end_time as clinic_end_time,
  277. c.id as clinic_id,
  278. c.asa as asa,
  279. c.patient_gender as patient_gender,
  280. c.`patient_age` as patient_age,
  281. c.anal_type as anal_type,
  282. c.weight as weight,
  283. c.`height` as height
  284. from (
  285. <include refid="commonInfusionQuery"/>
  286. ) as i
  287. JOIN (
  288. <include refid="commonClinicQuery"/>
  289. ) as c
  290. on i.clinic_id=c.id
  291. <if test="query.warns != null or query.deviceAlarm != null">
  292. JOIN (
  293. <include refid="commonDeviceAlarmQuery"/>
  294. ) as a
  295. on a.infusion_id = i.id
  296. </if>
  297. </select>
  298. <select id="queryStatsEval" resultMap="combineEvalResult">
  299. select
  300. i.id as infusion_id,
  301. i.last_upload_time as last_upload_time,
  302. i.start_time as infusion_start_time,
  303. e.evaluate_time as evaluate_time,
  304. e.statics as statics,
  305. e.activity as activity,
  306. e.calm as calm,
  307. e.left_arm as left_arm,
  308. e.left_leg as left_leg,
  309. e.right_arm as right_arm,
  310. e.right_leg as right_leg,
  311. e.nausea_vomit as nausea_vomit,
  312. e.itch as itch,
  313. e.vertigo as vertigo,
  314. e.sore_throat as sore_throat,
  315. e.uroschesis as uroschesis,
  316. e.breath_depression as breath_depression,
  317. e.hoarseness as hoarseness,
  318. e.cognition_obstacle as cognition_obstacle,
  319. e.satisfaction as satisfaction,
  320. e.shrink_pressure as shrink_pressure,
  321. e.diastens_pressure as diastens_pressure,
  322. e.heart_rate as heart_rate,
  323. e.fetal_heart_rate as fetal_heart_rate,
  324. e.breath_rate as breath_rate,
  325. e.blood_oxygen_saturation as blood_oxygen_saturation,
  326. e.id as eval_id
  327. from (
  328. <include refid="commonInfusionQuery"/>
  329. ) as i
  330. JOIN (
  331. <include refid="commonClinicQuery"/>
  332. ) as c
  333. on i.clinic_id=c.id
  334. left join (select * from bus_evaluation) as e
  335. on e.infusion_id=i.id
  336. <if test="query.warns != null or query.deviceAlarm != null">
  337. JOIN (
  338. <include refid="commonDeviceAlarmQuery"/>
  339. ) as a
  340. on a.infusion_id = i.id
  341. </if>
  342. </select>
  343. <select id="queryStatsHistory" resultMap="queryStatsHistory">
  344. SELECT i.id AS infusion_id,
  345. p.id AS patient_id,
  346. MAX(h.total_append_dose) AS total_append_dose,
  347. MAX(h.input_dose) AS input_dose,
  348. MAX(h.continue_dose) AS continue_dose,
  349. MAX(h.self_control_lock_time) AS self_control_lock_time,
  350. MAX(h.pca_valid_count) AS pca_valid_count,
  351. MAX(h.pca_invalid_count) AS pca_invalid_count,
  352. MAX(h.upload_time) AS upload_time
  353. from (
  354. <include refid="commonInfusionQuery"/>
  355. ) as i
  356. <if test="query.warns != null or query.deviceAlarm != null">
  357. JOIN (
  358. <include refid="commonDeviceAlarmQuery"/>
  359. ) as a
  360. on a.infusion_id = i.id
  361. </if>
  362. JOIN (
  363. <include refid="commonClinicQuery"/>
  364. ) as c
  365. on i.clinic_id=c.id
  366. join (select * from bus_patient
  367. <where>
  368. <if test="query.patientCode != null">
  369. and code like concat('%',#{query.patientCode},'%')
  370. </if>
  371. </where>
  372. ) as p on p.id = c.patient_id
  373. join (select * from bus_device_history) as h on h.infusion_id=i.id
  374. group by i.id,p.id,DATE_FORMAT(h.upload_time,'%Y-%m-%d')
  375. </select>
  376. <sql id="commonInfusionQuery">
  377. select * from bus_infusion_history
  378. <where>
  379. <if test="query.startTimeRange != null and query.startTimeRange.size > 0">
  380. and start_time &gt;= #{query.startTimeRange[0]}
  381. <if test="query.startTimeRange.size >1 ">
  382. and start_time &lt;= #{query.startTimeRange[1]}
  383. </if>
  384. </if>
  385. <if test="query.undoTimeRange != null and query.undoTimeRange.size > 0">
  386. and undo_time &gt;= #{query.undoTimeRange[0]}
  387. <if test="query.startTimeRange.size >1 ">
  388. and undo_time &lt;= #{query.undoTimeRange[1]}
  389. </if>
  390. </if>
  391. <if test="query.deviceType != null">
  392. and type = #{query.deviceType}
  393. </if>
  394. <if test="query.deviceId != null">
  395. and device_id like concat('%',#{query.deviceId},'%')
  396. </if>
  397. <if test="query.finished != null">
  398. and finished =#{query.finished}
  399. </if>
  400. <if test="query.isUndo != null">
  401. and is_undo =#{query.isUndo} and finished=0
  402. </if>
  403. <if test="query.validPcaCountRange != null and query.validPcaCountRange.size > 0">
  404. and pca_valid_count &gt;= #{query.validPcaCountRange[0]}
  405. <if test="query.validPcaCountRange.size >1 ">
  406. and pca_valid_count &lt;= #{query.validPcaCountRange[1]}
  407. </if>
  408. </if>
  409. <if test="query.inValidPcaCountRange != null and query.inValidPcaCountRange.size > 0">
  410. and pca_invalid_count &gt;= #{query.inValidPcaCountRange[0]}
  411. <if test="query.inValidPcaCountRange.size >1 ">
  412. and pca_invalid_count &lt;= #{query.inValidPcaCountRange[1]}
  413. </if>
  414. </if>
  415. </where>
  416. </sql>
  417. <sql id="commonDeviceAlarmQuery">
  418. select * from bus_device_alarm
  419. <where>
  420. <if test="query.warnAnalgesicPoor == true">and warn_analgesic_poor=1 </if>
  421. <if test="query.warnLowBattery == true"> and warn_low_battery=1 </if>
  422. <if test="query.warnFlow !=null">
  423. and warn_flow= #{query.warnFlow}
  424. </if>
  425. <if test="query.deviceAlarm != null">
  426. and alarm_state = #{query.deviceAlarm}
  427. </if>
  428. </where>
  429. </sql>
  430. <sql id="commonClinicQuery">
  431. select * from bus_clinic
  432. <where>
  433. <if test="query.patientCode != null">
  434. and patient_code like concat('%',#{query.patientCode},'%')
  435. </if>
  436. <if test="query.patientName != null">
  437. and patient_name like concat('%',#{query.patientName},'%')
  438. </if>
  439. <if test="query.patientGender != null">
  440. and patient_gender =#{query.patientGender}
  441. </if>
  442. <if test="query.ageRange != null and query.ageRange.size > 0">
  443. and patient_age &gt;= #{query.ageRange[0]}
  444. <if test="query.ageRange.size >1 ">
  445. and patient_age &lt;= #{query.ageRange[1]}
  446. </if>
  447. </if>
  448. <if test="query.weightRange != null and query.weightRange.size > 0">
  449. and weight &gt;= #{query.weightRange[0]}
  450. <if test="query.weightRange.size >1 ">
  451. and weight &lt;= #{query.weightRange[1]}
  452. </if>
  453. </if>
  454. <if test="query.heightRange != null and query.heightRange.size > 0">
  455. and height &gt;= #{query.heightRange[0]}
  456. <if test="query.heightRange.size >1 ">
  457. and height &lt;= #{query.heightRange[1]}
  458. </if>
  459. </if>
  460. <if test="query.asa != null">
  461. and asa like concat('%',#{query.asa},'%')
  462. </if>
  463. <if test="query.ward != null">
  464. and ward like concat('%',#{query.ward},'%')
  465. </if>
  466. <if test="query.bedNo != null">
  467. and bed_no like concat('%',#{query.bedNo},'%')
  468. </if>
  469. <if test="query.anaDoctor != null">
  470. and ana_doctor like concat('%',#{query.anaDoctor},'%')
  471. </if>
  472. <if test="query.anaType != null">
  473. and ana_type like concat('%',#{query.anaType},'%')
  474. </if>
  475. <if test="query.analType != null">
  476. and anal_type like concat('%',#{query.analType},'%')
  477. </if>
  478. <if test="query.drugName != null">
  479. and formula like concat('%',#{query.drugName},'%')
  480. </if>
  481. <if test="query.surgeryDoctor != null">
  482. and surgery_doctor like concat('%',#{query.surgeryDoctor},'%')
  483. </if>
  484. <if test="query.surgeryName != null">
  485. and surgery_name like concat('%',#{query.surgeryName},'%')
  486. </if>
  487. <if test="query.clinicStartTimeRange != null and query.clinicStartTimeRange.size > 0">
  488. and monitor_start_time &gt;= #{query.clinicStartTimeRange[0]}
  489. <if test="query.clinicStartTimeRange.size >1 ">
  490. and monitor_start_time &lt;= #{query.clinicStartTimeRange[1]}
  491. </if>
  492. </if>
  493. <if test="query.clinicEndTimeRange != null and query.clinicEndTimeRange.size > 0">
  494. and finished =1 and end_time &gt;= #{query.clinicEndTimeRange[0]}
  495. <if test="query.clinicEndTimeRange.size >1 ">
  496. and end_time &lt;= #{query.clinicEndTimeRange[1]}
  497. </if>
  498. </if>
  499. </where>
  500. </sql>
  501. </mapper>