InsuranceDefinition.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  4. <!-- namespace必须指向DAO接口 -->
  5. <mapper namespace="com.jpsoft.picc.modules.base.dao.InsuranceDefinitionDAO">
  6. <resultMap id="InsuranceDefinitionMap" type="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
  7. <id property="id" column="id_"/>
  8. <result property="name" column="name_"/>
  9. <result property="insuranceDescription" column="insurance_description"/>
  10. <result property="clause" column="clause_"/>
  11. <result property="status" column="status_"/>
  12. <result property="delFlag" column="del_flag"/>
  13. <result property="createBy" column="create_by"/>
  14. <result property="createTime" column="create_time"/>
  15. <result property="updateBy" column="update_by"/>
  16. <result property="updateTime" column="update_time"/>
  17. <result property="cutOffTime" column="cut_off_time"/>
  18. <result property="advanceSubmitDays" column="advance_submit_days"/>
  19. <result property="notice" column="notice_"/>
  20. <result property="letter" column="letter_"/>
  21. <result property="specialStatement" column="special_statement"/>
  22. <result property="exemptionInstructions" column="exemption_instructions"/>
  23. <result property="responsibility" column="responsibility_"/>
  24. <result property="responsibilityAttach" column="responsibility_attach"/>
  25. <result property="haveAttach" column="have_attach"/>
  26. </resultMap>
  27. <insert id="insert" parameterType="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
  28. <!--
  29. <selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
  30. select sys_guid() from dual
  31. </selectKey>
  32. -->
  33. <![CDATA[
  34. insert into base_insurance_definition
  35. (id_,name_,insurance_description,clause_,status_,del_flag,create_by,create_time,
  36. update_by,update_time,cut_off_time,notice_,advance_submit_days,
  37. letter_ ,special_statement ,exemption_instructions ,responsibility_ ,responsibility_attach ,have_attach
  38. )
  39. values
  40. (
  41. #{id,jdbcType=VARCHAR}
  42. ,#{name,jdbcType=VARCHAR}
  43. ,#{insuranceDescription,jdbcType=VARCHAR}
  44. ,#{clause,jdbcType=VARCHAR}
  45. ,#{status,jdbcType=VARCHAR}
  46. ,#{delFlag,jdbcType= NUMERIC }
  47. ,#{createBy,jdbcType=VARCHAR}
  48. ,#{createTime,jdbcType= TIMESTAMP }
  49. ,#{updateBy,jdbcType=VARCHAR}
  50. ,#{updateTime,jdbcType= TIMESTAMP }
  51. ,#{cutOffTime,jdbcType= VARCHAR }
  52. ,#{notice,jdbcType= VARCHAR }
  53. ,#{advanceSubmitDays, jdbcType=NUMERIC}
  54. ,#{letter,jdbcType= VARCHAR }
  55. ,#{specialStatement,jdbcType= VARCHAR }
  56. ,#{exemptionInstructions,jdbcType= VARCHAR }
  57. ,#{responsibility,jdbcType= VARCHAR }
  58. ,#{responsibilityAttach,jdbcType= VARCHAR }
  59. ,#{haveAttach,jdbcType= NUMERIC }
  60. )
  61. ]]>
  62. </insert>
  63. <delete id="delete" parameterType="string">
  64. delete from base_insurance_definition where id_=#{id,jdbcType=VARCHAR}
  65. </delete>
  66. <update id="update" parameterType="com.jpsoft.picc.modules.base.entity.InsuranceDefinition">
  67. update base_insurance_definition
  68. <set>
  69. <if test="name!=null">
  70. name_=#{name,jdbcType=VARCHAR},
  71. </if>
  72. <if test="insuranceDescription!=null">
  73. insurance_description=#{insuranceDescription,jdbcType=VARCHAR},
  74. </if>
  75. <if test="clause!=null">
  76. clause_=#{clause,jdbcType=VARCHAR},
  77. </if>
  78. <if test="status!=null">
  79. status_=#{status,jdbcType=VARCHAR},
  80. </if>
  81. <if test="delFlag!=null">
  82. del_flag=#{delFlag,jdbcType= NUMERIC },
  83. </if>
  84. <if test="createBy!=null">
  85. create_by=#{createBy,jdbcType=VARCHAR},
  86. </if>
  87. <if test="createTime!=null">
  88. create_time=#{createTime,jdbcType= TIMESTAMP },
  89. </if>
  90. <if test="updateBy!=null">
  91. update_by=#{updateBy,jdbcType=VARCHAR},
  92. </if>
  93. <if test="updateTime!=null">
  94. update_time=#{updateTime,jdbcType= TIMESTAMP },
  95. </if>
  96. <if test="cutOffTime!=null">
  97. cut_off_time=#{cutOffTime,jdbcType= VARCHAR },
  98. </if>
  99. <if test="notice!=null">
  100. notice_=#{notice,jdbcType= VARCHAR },
  101. </if>
  102. <if test="advanceSubmitDays!=null">
  103. advance_submit_days=#{advanceSubmitDays,jdbcType= NUMERIC },
  104. </if>
  105. <if test="letter!=null">
  106. letter_ =#{letter,jdbcType= VARCHAR },
  107. </if>
  108. <if test="specialStatement!=null">
  109. special_statement =#{specialStatement,jdbcType= VARCHAR },
  110. </if>
  111. <if test="exemptionInstructions!=null">
  112. exemption_instructions =#{exemptionInstructions,jdbcType= VARCHAR },
  113. </if>
  114. <if test="responsibility!=null">
  115. responsibility_ =#{responsibility,jdbcType= VARCHAR },
  116. </if>
  117. <if test="responsibilityAttach!=null">
  118. responsibility_attach =#{responsibilityAttach,jdbcType= VARCHAR },
  119. </if>
  120. <if test="haveAttach!=null">
  121. have_attach =#{haveAttach,jdbcType= NUMERIC },
  122. </if>
  123. </set>
  124. where id_=#{id}
  125. </update>
  126. <select id="get" parameterType="string" resultMap="InsuranceDefinitionMap">
  127. select * from base_insurance_definition where id_=#{0}
  128. </select>
  129. <select id="exist" parameterType="string" resultType="int">
  130. select count(*) from base_insurance_definition where id_=#{0}
  131. </select>
  132. <select id="list" resultMap="InsuranceDefinitionMap">
  133. select * from base_insurance_definition where del_flag=0
  134. </select>
  135. <select id="search" parameterType="hashmap" resultMap="InsuranceDefinitionMap">
  136. <![CDATA[
  137. select * from base_insurance_definition
  138. ]]>
  139. <where>
  140. and del_flag = false
  141. <if test="searchParams.name != null">
  142. and name_ like #{searchParams.name}
  143. </if>
  144. </where>
  145. <foreach item="sort" collection="sortList" open="order by" separator=",">
  146. ${sort.name} ${sort.order}
  147. </foreach>
  148. </select>
  149. </mapper>