VaccineInfoOperationMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.boman.web.core.mapper.VaccineInfoOperationMapper">
  6. <resultMap type="VaccineInfoOperation" id="VaccineInfoOperationResult">
  7. <result property="id" column="id"/>
  8. <result property="villageTowns" column="village_towns"/>
  9. <result property="village" column="village"/>
  10. <result property="villagerGroup" column="villager_group"/>
  11. <result property="houseType" column="house_type"/>
  12. <result property="domicile" column="domicile"/>
  13. <result property="province" column="province"/>
  14. <result property="city" column="city"/>
  15. <result property="region" column="region"/>
  16. <result property="userName" column="user_name"/>
  17. <result property="gender" column="gender"/>
  18. <result property="idCard" column="id_card"/>
  19. <result property="phoneNum" column="phone_num"/>
  20. <result property="keyIndustries" column="key_industries"/>
  21. <result property="isVaccination" column="is_vaccination"/>
  22. <result property="vaccineName" column="vaccine_name"/>
  23. <result property="jici" column="jici"/>
  24. <result property="vaccinationTime" column="vaccination_time"/>
  25. <result property="vaccinationPlace" column="vaccination_place"/>
  26. <result property="contraindication" column="contraindication"/>
  27. <result property="suspend" column="suspend"/>
  28. <result property="shouldBe" column="should_be"/>
  29. <result property="other" column="other"/>
  30. <result property="progress" column="progress"/>
  31. <result property="remark" column="remark"/>
  32. <result property="status" column="status"/>
  33. <result property="createBy" column="create_by"/>
  34. <result property="createTime" column="create_time"/>
  35. <result property="updateBy" column="update_by"/>
  36. <result property="updateTime" column="update_time"/>
  37. <result property="isDel" column="is_del"/>
  38. <result property="operationType" column="operation_type"/>
  39. <result property="vaccineInfoId" column="vaccine_info_id"/>
  40. <result property="manufacturer" column="manufacturer"/>
  41. <result property="crowdClassification" column="crowd_classification" />
  42. <result property="workUnit" column="work_unit" />
  43. <result property="birthday" column="birthday" />
  44. <result property="code" column="code" />
  45. <result property="nowIn" column="now_in" />
  46. <result property="url" column="url" />
  47. <result property="suspendUrl" column="suspend_url" />
  48. <result property="otherUrl" column="other_url" />
  49. <result property="age" column="age" />
  50. <result property="shouldSlow" column="should_slow" />
  51. </resultMap>
  52. <sql id="selectVaccineInfoOperationVo">
  53. select id, village_towns, village, villager_group, house_type, domicile, province, city,
  54. region, user_name, gender, id_card, phone_num, key_industries, is_vaccination,
  55. vaccine_name, jici, vaccination_time, vaccination_place, contraindication,
  56. suspend, should_be, other, progress, remark, status,
  57. create_by, create_time, update_by, update_time, is_del, operation_type,
  58. vaccine_info_id,code,birthday,work_unit,crowd_classification,manufacturer, now_in, url,suspend_url,other_url,age,
  59. vaccine_time_next,should_slow
  60. from vaccine_info_operation
  61. </sql>
  62. <select id="selectVaccineInfoOperationList" parameterType="VaccineInfoOperation"
  63. resultMap="VaccineInfoOperationResult">
  64. <include refid="selectVaccineInfoOperationVo"/>
  65. <where>
  66. <if test="villageTowns != null and villageTowns != ''">and village_towns = #{villageTowns}</if>
  67. <if test="village != null and village != ''">and village = #{village}</if>
  68. <if test="villagerGroup != null and villagerGroup != ''">and villager_group = #{villagerGroup}</if>
  69. <if test="houseType != null and houseType != ''">and house_type = #{houseType}</if>
  70. <if test="domicile != null and domicile != ''">and domicile = #{domicile}</if>
  71. <if test="province != null and province != ''">and province = #{province}</if>
  72. <if test="city != null and city != ''">and city = #{city}</if>
  73. <if test="region != null and region != ''">and region = #{region}</if>
  74. <if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
  75. <if test="gender != null and gender != ''">and gender = #{gender}</if>
  76. <if test="idCard != null and idCard != ''">and id_card = #{idCard}</if>
  77. <if test="phoneNum != null and phoneNum != ''">and phone_num = #{phoneNum}</if>
  78. <if test="keyIndustries != null and keyIndustries != ''">and key_industries = #{keyIndustries}</if>
  79. <if test="isVaccination != null and isVaccination != ''">and is_vaccination = #{isVaccination}</if>
  80. <if test="vaccineName != null and vaccineName != ''">and vaccine_name like concat('%', #{vaccineName},'%')</if>
  81. <if test="jici != null and jici != ''">and jici = #{jici}</if>
  82. <if test="vaccinationTime != null ">and vaccination_time = #{vaccinationTime}</if>
  83. <if test="vaccinationPlace != null and vaccinationPlace != ''">and vaccination_place =#{vaccinationPlace}</if>
  84. <if test="contraindication != null and contraindication != ''">and contraindication = #{contraindication}</if>
  85. <if test="suspend != null and suspend != ''">and suspend = #{suspend}</if>
  86. <if test="shouldBe != null and shouldBe != ''">and should_be = #{shouldBe}</if>
  87. <if test="other != null and other != ''">and other = #{other}</if>
  88. <if test="progress != null and progress != ''">and progress = #{progress}</if>
  89. <if test="status != null and status != ''">and status = #{status}</if>
  90. <if test="isDel != null and isDel != ''">and is_del = #{isDel}</if>
  91. <if test="operationType != null and operationType != ''">and operation_type = #{operationType}</if>
  92. <if test="vaccineInfoId != null ">and vaccine_info_id = #{vaccineInfoId}</if>
  93. <if test="code != null and code != ''"> and code = #{code}</if>
  94. <if test="birthday != null and birthday != ''"> and birthday = #{birthday}</if>
  95. <if test="workUnit != null and workUnit != ''"> and work_unit = #{workUnit}</if>
  96. <if test="crowdClassification != null and crowdClassification != ''"> and crowd_classification = #{crowdClassification}</if>
  97. <if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
  98. <if test="nowIn != null and nowIn != ''"> and now_in = #{nowIn}</if>
  99. <if test="url != null and url != ''"> and url = #{url}</if>
  100. <if test="suspendUrl != null and suspendUrl != ''"> and suspend_url = #{suspendUrl}</if>
  101. <if test="otherUrl != null and otherUrl != ''"> and other_url = #{otherUrl}</if>
  102. <if test="age != null and age != ''"> and age = #{age}</if>
  103. <if test="shouldSlow != null and shouldSlow != ''"> and should_slow = #{shouldSlow}</if>
  104. </where>
  105. </select>
  106. <select id="selectVaccineInfoOperationById" parameterType="Long" resultMap="VaccineInfoOperationResult">
  107. <include refid="selectVaccineInfoOperationVo"/>
  108. where id = #{id}
  109. </select>
  110. <insert id="insertVaccineInfoOperation" parameterType="VaccineInfoOperation" useGeneratedKeys="true"
  111. keyProperty="id">
  112. insert into vaccine_info_operation
  113. <trim prefix="(" suffix=")" suffixOverrides=",">
  114. <if test="villageTowns != null">village_towns,</if>
  115. <if test="village != null">village,</if>
  116. <if test="villagerGroup != null">villager_group,</if>
  117. <if test="houseType != null">house_type,</if>
  118. <if test="domicile != null">domicile,</if>
  119. <if test="province != null">province,</if>
  120. <if test="city != null">city,</if>
  121. <if test="region != null">region,</if>
  122. <if test="userName != null">user_name,</if>
  123. <if test="gender != null">gender,</if>
  124. <if test="idCard != null">id_card,</if>
  125. <if test="phoneNum != null">phone_num,</if>
  126. <if test="keyIndustries != null">key_industries,</if>
  127. <if test="isVaccination != null">is_vaccination,</if>
  128. <if test="vaccineName != null">vaccine_name,</if>
  129. <if test="jici != null">jici,</if>
  130. <if test="vaccinationTime != null">vaccination_time,</if>
  131. <if test="vaccinationPlace != null">vaccination_place,</if>
  132. <if test="contraindication != null">contraindication,</if>
  133. <if test="suspend != null">suspend,</if>
  134. <if test="shouldBe != null">should_be,</if>
  135. <if test="other != null">other,</if>
  136. <if test="progress != null">progress,</if>
  137. <if test="remark != null">remark,</if>
  138. <if test="status != null">status,</if>
  139. <if test="createBy != null">create_by,</if>
  140. <if test="updateBy != null">update_by,</if>
  141. <if test="updateTime != null">update_time,</if>
  142. <if test="isDel != null and isDel != ''">is_del,</if>
  143. <if test="operationType != null">operation_type,</if>
  144. <if test="vaccineInfoId != null">vaccine_info_id,</if>
  145. <if test="code != null and code != ''">code,</if>
  146. <if test="birthday != null and birthday != ''">birthday,</if>
  147. <if test="workUnit != null and workUnit != ''">work_unit,</if>
  148. <if test="crowdClassification != null and crowdClassification != ''">crowd_classification,</if>
  149. <if test="manufacturer != null and manufacturer != ''">manufacturer,</if>
  150. <if test="nowIn != null and nowIn != ''">now_in,</if>
  151. <if test="url != null and url != ''">url,</if>
  152. <if test="suspendUrl != null and suspendUrl != ''">suspend_url,</if>
  153. <if test="otherUrl != null and otherUrl != ''">other_url,</if>
  154. <if test="age != null and age != ''">age,</if>
  155. <if test="shouldSlow != null and shouldSlow != ''">should_slow,</if>
  156. create_time
  157. </trim>
  158. <trim prefix="values (" suffix=")" suffixOverrides=",">
  159. <if test="villageTowns != null">#{villageTowns},</if>
  160. <if test="village != null">#{village},</if>
  161. <if test="villagerGroup != null">#{villagerGroup},</if>
  162. <if test="houseType != null">#{houseType},</if>
  163. <if test="domicile != null">#{domicile},</if>
  164. <if test="province != null">#{province},</if>
  165. <if test="city != null">#{city},</if>
  166. <if test="region != null">#{region},</if>
  167. <if test="userName != null">#{userName},</if>
  168. <if test="gender != null">#{gender},</if>
  169. <if test="idCard != null">#{idCard},</if>
  170. <if test="phoneNum != null">#{phoneNum},</if>
  171. <if test="keyIndustries != null">#{keyIndustries},</if>
  172. <if test="isVaccination != null">#{isVaccination},</if>
  173. <if test="vaccineName != null">#{vaccineName},</if>
  174. <if test="jici != null">#{jici},</if>
  175. <if test="vaccinationTime != null">#{vaccinationTime},</if>
  176. <if test="vaccinationPlace != null">#{vaccinationPlace},</if>
  177. <if test="contraindication != null">#{contraindication},</if>
  178. <if test="suspend != null">#{suspend},</if>
  179. <if test="shouldBe != null">#{shouldBe},</if>
  180. <if test="other != null">#{other},</if>
  181. <if test="progress != null">#{progress},</if>
  182. <if test="remark != null">#{remark},</if>
  183. <if test="status != null">#{status},</if>
  184. <if test="createBy != null">#{createBy},</if>
  185. <if test="updateBy != null">#{updateBy},</if>
  186. <if test="updateTime != null">#{updateTime},</if>
  187. <if test="isDel != null and isDel != ''">#{isDel},</if>
  188. <if test="operationType != null">#{operationType},</if>
  189. <if test="vaccineInfoId != null">#{vaccineInfoId},</if>
  190. <if test="code != null and code != ''">#{code},</if>
  191. <if test="birthday != null and birthday != ''">#{birthday},</if>
  192. <if test="workUnit != null and workUnit != ''">#{workUnit},</if>
  193. <if test="crowdClassification != null and crowdClassification != ''">#{crowdClassification},</if>
  194. <if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if>
  195. <if test="nowIn != null and nowIn != ''">#{nowIn},</if>
  196. <if test="url != null and url != ''">#{url},</if>
  197. <if test="suspendUrl != null and suspendUrl != ''">#{suspendUrl},</if>
  198. <if test="otherUrl != null and otherUrl != ''">#{url},</if>
  199. <if test="age != null and age != ''">#{age},</if>
  200. <if test="shouldSlow != null and shouldSlow != ''">#{shouldSlow},</if>
  201. sysdate()
  202. </trim>
  203. </insert>
  204. <update id="updateVaccineInfoOperation" parameterType="VaccineInfoOperation">
  205. update vaccine_info_operation
  206. <trim prefix="SET" suffixOverrides=",">
  207. <if test="villageTowns != null">village_towns = #{villageTowns},</if>
  208. <if test="village != null">village = #{village},</if>
  209. <if test="villagerGroup != null">villager_group = #{villagerGroup},</if>
  210. <if test="houseType != null">house_type = #{houseType},</if>
  211. <if test="domicile != null">domicile = #{domicile},</if>
  212. <if test="province != null">province = #{province},</if>
  213. <if test="city != null">city = #{city},</if>
  214. <if test="region != null">region = #{region},</if>
  215. <if test="userName != null">user_name = #{userName},</if>
  216. <if test="gender != null">gender = #{gender},</if>
  217. <if test="idCard != null">id_card = #{idCard},</if>
  218. <if test="phoneNum != null">phone_num = #{phoneNum},</if>
  219. <if test="keyIndustries != null">key_industries = #{keyIndustries},</if>
  220. <if test="isVaccination != null">is_vaccination = #{isVaccination},</if>
  221. <if test="vaccineName != null">vaccine_name = #{vaccineName},</if>
  222. <if test="jici != null">jici = #{jici},</if>
  223. <if test="vaccinationTime != null">vaccination_time = #{vaccinationTime},</if>
  224. <if test="vaccinationPlace != null">vaccination_place = #{vaccinationPlace},</if>
  225. <if test="contraindication != null">contraindication = #{contraindication},</if>
  226. <if test="suspend != null">suspend = #{suspend},</if>
  227. <if test="shouldBe != null">should_be = #{shouldBe},</if>
  228. <if test="other != null">other = #{other},</if>
  229. <if test="progress != null">progress = #{progress},</if>
  230. <if test="remark != null">remark = #{remark},</if>
  231. <if test="status != null">status = #{status},</if>
  232. <if test="updateTime != null">update_time = #{updateTime},</if>
  233. <if test="isDel != null and isDel != ''">is_del = #{isDel},</if>
  234. <if test="operationType != null">operation_type = #{operationType},</if>
  235. <if test="vaccineInfoId != null">vaccine_info_id = #{vaccineInfoId},</if>
  236. <if test="code != null and code != ''">code = #{code},</if>
  237. <if test="birthday != null and birthday != ''">birthday = #{birthday},</if>
  238. <if test="workUnit != null and workUnit != ''">work_unit = #{workUnit},</if>
  239. <if test="crowdClassification != null and crowdClassification != ''">crowd_classification = #{crowdClassification},</if>
  240. <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer},</if>
  241. <if test="nowIn != null and nowIn != ''">now_in = #{nowIn},</if>
  242. <if test="url != null and url != ''">url = #{url},</if>
  243. <if test="suspendUrl != null and suspendUrl != ''">suspend_url = #{suspendUrl},</if>
  244. <if test="otherUrl != null and otherUrl != ''">other_url = #{otherUrl},</if>
  245. <if test="age != null and age != ''">age = #{age},</if>
  246. <if test="shouldSlow != null and shouldSlow != ''">should_slow = #{shouldSlow},</if>
  247. update_by = sysdate()
  248. </trim>
  249. where id = #{id}
  250. </update>
  251. <delete id="deleteVaccineInfoOperationById" parameterType="Long">
  252. delete from vaccine_info_operation where id = #{id}
  253. </delete>
  254. <delete id="deleteVaccineInfoOperationByIds" parameterType="String">
  255. delete from vaccine_info_operation where id in
  256. <foreach item="id" collection="array" open="(" separator="," close=")">
  257. #{id}
  258. </foreach>
  259. </delete>
  260. </mapper>