BisInspRsfcoRgstrAoeparoDao.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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.com.goldenwater.dcproj.dao.BisInspRsfcoRgstrAoeparoDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrAoeparo" id="bisInspRsfcoRgstrAoeparoResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="pblmCasNls" column="PBLM_CAS_NLS"/>
  8. <result property="rctfOptn" column="RCTF_OPTN"/>
  9. <result property="note" column="NOTE"/>
  10. <result property="status" column="STATUS"/>
  11. <result property="recPersId" column="REC_PERS_ID"/>
  12. <result property="recPers" column="REC_PERS"/>
  13. <result property="recPersTel" column="REC_PERS_TEL"/>
  14. <result property="intm" column="INTM"/>
  15. <result property="uptm" column="UPTM"/>
  16. </resultMap>
  17. <sql id="table_columns">
  18. ID,
  19. RGSTR_ID,
  20. PBLM_CAS_NLS,
  21. RCTF_OPTN,
  22. NOTE,
  23. STATUS,
  24. REC_PERS_ID,
  25. REC_PERS,
  26. REC_PERS_TEL,
  27. INTM,
  28. UPTM
  29. </sql>
  30. <sql id="entity_properties">
  31. #{id},
  32. #{rgstrId},
  33. #{pblmCasNls},
  34. #{rctfOptn},
  35. #{note},
  36. #{status},
  37. #{recPersId},
  38. #{recPers},
  39. #{recPersTel},
  40. #{intm},
  41. #{uptm}
  42. </sql>
  43. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  44. <sql id="page_where">
  45. <trim prefix="where" prefixOverrides="and | or ">
  46. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  47. <if test="pblmCasNls != null and pblmCasNls != ''">and PBLM_CAS_NLS = #{pblmCasNls}</if>
  48. <if test="rctfOptn != null and rctfOptn != ''">and RCTF_OPTN = #{rctfOptn}</if>
  49. <if test="note != null and note != ''">and NOTE = #{note}</if>
  50. <if test="status != null and status != ''">and STATUS = #{status}</if>
  51. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  52. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  53. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  54. <if test="intm != null">and INTM = #{intm}</if>
  55. <if test="uptm != null">and UPTM = #{uptm}</if>
  56. </trim>
  57. </sql>
  58. <select id="get" resultMap="bisInspRsfcoRgstrAoeparoResultMap" parameterType="String" >
  59. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_AOEPARO where ID = #{id}
  60. </select>
  61. <select id="getBy" resultMap="bisInspRsfcoRgstrAoeparoResultMap">
  62. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_AOEPARO <include refid="page_where" />
  63. </select>
  64. <select id="findAll" resultMap="bisInspRsfcoRgstrAoeparoResultMap">
  65. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_AOEPARO
  66. </select>
  67. <select id="findList" resultMap="bisInspRsfcoRgstrAoeparoResultMap">
  68. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_AOEPARO <include refid="page_where" />
  69. </select>
  70. <select id="selectCount" resultType="int" >
  71. select count(ID) from BIS_INSP_RSFCO_RGSTR_AOEPARO <include refid="page_where" />
  72. </select>
  73. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrAoeparo">
  74. insert into BIS_INSP_RSFCO_RGSTR_AOEPARO( <include refid="table_columns" /> )
  75. values ( <include refid="entity_properties" /> )
  76. </insert>
  77. <delete id="delete" parameterType="java.lang.String">
  78. delete from BIS_INSP_RSFCO_RGSTR_AOEPARO where ID = #{id}
  79. </delete>
  80. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrAoeparo">
  81. delete from BIS_INSP_RSFCO_RGSTR_AOEPARO <include refid="page_where" />
  82. </delete>
  83. <update id="deleteInFlag" parameterType="java.lang.String">
  84. update BIS_INSP_RSFCO_RGSTR_AOEPARO set flag_valid = 0 where ID = #{id}
  85. </update>
  86. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrAoeparo">
  87. update BIS_INSP_RSFCO_RGSTR_AOEPARO
  88. <trim prefix="set" suffixOverrides=",">
  89. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  90. <if test="pblmCasNls != null and pblmCasNls != ''">PBLM_CAS_NLS = #{pblmCasNls},</if>
  91. <if test="rctfOptn != null and rctfOptn != ''">RCTF_OPTN = #{rctfOptn},</if>
  92. <if test="note != null and note != ''">NOTE = #{note},</if>
  93. <if test="status != null and status != ''">STATUS = #{status},</if>
  94. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  95. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  96. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  97. <if test="intm != null">INTM = #{intm},</if>
  98. <if test="uptm != null">UPTM = #{uptm},</if>
  99. </trim>
  100. <where>ID = #{id}</where>
  101. </update>
  102. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrAoeparo">
  103. update BIS_INSP_RSFCO_RGSTR_AOEPARO
  104. <trim prefix="set" suffixOverrides=",">
  105. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  106. <if test="pblmCasNls != null and pblmCasNls != ''">PBLM_CAS_NLS = #{pblmCasNls},</if>
  107. <if test="rctfOptn != null and rctfOptn != ''">RCTF_OPTN = #{rctfOptn},</if>
  108. <if test="note != null and note != ''">NOTE = #{note},</if>
  109. <if test="status != null and status != ''">STATUS = #{status},</if>
  110. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  111. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  112. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  113. <if test="intm != null">INTM = #{intm},</if>
  114. <if test="uptm != null">UPTM = #{uptm},</if>
  115. </trim>
  116. <include refid="page_where" />
  117. </update>
  118. <!-- 其他自定义SQL -->
  119. </mapper>