BisInspCdepQuaDao.xml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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.BisInspCdepQuaDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspCdepQua" id="bisInspCdepQuaResultMap">
  5. <result property="state" column="STATE"/>
  6. <result property="dataStat" column="DATA_STAT"/>
  7. <result property="id" column="ID"/>
  8. <result property="rgstrId" column="RGSTR_ID"/>
  9. <result property="isQuaMea" column="IS_QUA_MEA"/>
  10. <result property="isCreLic" column="IS_CRE_LIC"/>
  11. <result property="isDirCenTit" column="IS_DIR_CEN_TIT"/>
  12. <result property="isPerIntTit" column="IS_PER_INT_TIT"/>
  13. <result property="isInsPro" column="IS_INS_PRO"/>
  14. <result property="isSysSepPar" column="IS_SYS_SEP_PAR"/>
  15. <result property="persId" column="PERS_ID"/>
  16. <result property="intm" column="INTM"/>
  17. <result property="uptm" column="UPTM"/>
  18. </resultMap>
  19. <sql id="table_columns">
  20. STATE,
  21. DATA_STAT,
  22. ID,
  23. RGSTR_ID,
  24. IS_QUA_MEA,
  25. IS_CRE_LIC,
  26. IS_DIR_CEN_TIT,
  27. IS_PER_INT_TIT,
  28. IS_INS_PRO,
  29. IS_SYS_SEP_PAR,
  30. PERS_ID,
  31. INTM,
  32. UPTM
  33. </sql>
  34. <sql id="entity_properties">
  35. #{state},
  36. #{dataStat},
  37. #{id},
  38. #{rgstrId},
  39. #{isQuaMea},
  40. #{isCreLic},
  41. #{isDirCenTit},
  42. #{isPerIntTit},
  43. #{isInsPro},
  44. #{isSysSepPar},
  45. #{persId},
  46. #{intm},
  47. #{uptm}
  48. </sql>
  49. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  50. <sql id="page_where">
  51. <trim prefix="where" prefixOverrides="and | or ">
  52. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  53. <if test="id != null and id != ''">and ID = #{id}</if>
  54. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  55. <if test="isQuaMea != null and isQuaMea != ''">and IS_QUA_MEA = #{isQuaMea}</if>
  56. <if test="isCreLic != null and isCreLic != ''">and IS_CRE_LIC = #{isCreLic}</if>
  57. <if test="isDirCenTit != null and isDirCenTit != ''">and IS_DIR_CEN_TIT = #{isDirCenTit}</if>
  58. <if test="isPerIntTit != null and isPerIntTit != ''">and IS_PER_INT_TIT = #{isPerIntTit}</if>
  59. <if test="isInsPro != null and isInsPro != ''">and IS_INS_PRO = #{isInsPro}</if>
  60. <if test="isSysSepPar != null and isSysSepPar != ''">and IS_SYS_SEP_PAR = #{isSysSepPar}</if>
  61. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  62. <if test="intm != null">and INTM = #{intm}</if>
  63. <if test="uptm != null">and UPTM = #{uptm}</if>
  64. </trim>
  65. </sql>
  66. <select id="get" resultMap="bisInspCdepQuaResultMap" parameterType="String" >
  67. select <include refid="table_columns" /> from BIS_INSP_CDEP_QUA where RGSTR_ID = #{id}
  68. </select>
  69. <select id="getBy" resultMap="bisInspCdepQuaResultMap">
  70. select <include refid="table_columns" /> from BIS_INSP_CDEP_QUA <include refid="page_where" />
  71. </select>
  72. <select id="findAll" resultMap="bisInspCdepQuaResultMap">
  73. select <include refid="table_columns" /> from BIS_INSP_CDEP_QUA
  74. </select>
  75. <select id="findList" resultMap="bisInspCdepQuaResultMap">
  76. select <include refid="table_columns" /> from BIS_INSP_CDEP_QUA <include refid="page_where" />
  77. </select>
  78. <select id="selectCount" resultType="int" >
  79. select count(ID) from BIS_INSP_CDEP_QUA <include refid="page_where" />
  80. </select>
  81. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspCdepQua">
  82. insert into BIS_INSP_CDEP_QUA( <include refid="table_columns" /> )
  83. values ( <include refid="entity_properties" /> )
  84. </insert>
  85. <delete id="delete" parameterType="java.lang.String">
  86. update BIS_INSP_CDEP_QUA set DATA_STAT='9' where ID = #{id}
  87. </delete>
  88. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspCdepQua">
  89. delete from BIS_INSP_CDEP_QUA <include refid="page_where" />
  90. </delete>
  91. <update id="deleteInFlag" parameterType="java.lang.String">
  92. update BIS_INSP_CDEP_QUA set flag_valid = 0 where ID = #{id}
  93. </update>
  94. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspCdepQua">
  95. update BIS_INSP_CDEP_QUA
  96. <trim prefix="set" suffixOverrides=",">
  97. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  98. <if test="id != null and id != ''">ID = #{id},</if>
  99. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  100. <if test="isQuaMea != null and isQuaMea != ''">IS_QUA_MEA = #{isQuaMea},</if>
  101. <if test="isCreLic != null and isCreLic != ''">IS_CRE_LIC = #{isCreLic},</if>
  102. <if test="isDirCenTit != null and isDirCenTit != ''">IS_DIR_CEN_TIT = #{isDirCenTit},</if>
  103. <if test="isPerIntTit != null and isPerIntTit != ''">IS_PER_INT_TIT = #{isPerIntTit},</if>
  104. <if test="isInsPro != null and isInsPro != ''">IS_INS_PRO = #{isInsPro},</if>
  105. <if test="isSysSepPar != null and isSysSepPar != ''">IS_SYS_SEP_PAR = #{isSysSepPar},</if>
  106. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  107. <if test="state != null and state != ''">STATE = #{state},</if>
  108. <if test="intm != null">INTM = #{intm},</if>
  109. <if test="uptm != null">UPTM = #{uptm},</if>
  110. </trim>
  111. <where>ID = #{id}</where>
  112. </update>
  113. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspCdepQua">
  114. update BIS_INSP_CDEP_QUA
  115. <trim prefix="set" suffixOverrides=",">
  116. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  117. <if test="id != null and id != ''">ID = #{id},</if>
  118. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  119. <if test="isQuaMea != null and isQuaMea != ''">IS_QUA_MEA = #{isQuaMea},</if>
  120. <if test="isCreLic != null and isCreLic != ''">IS_CRE_LIC = #{isCreLic},</if>
  121. <if test="isDirCenTit != null and isDirCenTit != ''">IS_DIR_CEN_TIT = #{isDirCenTit},</if>
  122. <if test="isPerIntTit != null and isPerIntTit != ''">IS_PER_INT_TIT = #{isPerIntTit},</if>
  123. <if test="isInsPro != null and isInsPro != ''">IS_INS_PRO = #{isInsPro},</if>
  124. <if test="isSysSepPar != null and isSysSepPar != ''">IS_SYS_SEP_PAR = #{isSysSepPar},</if>
  125. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  126. <if test="intm != null">INTM = #{intm},</if>
  127. <if test="uptm != null">UPTM = #{uptm},</if>
  128. </trim>
  129. <include refid="page_where" />
  130. </update>
  131. <!-- 其他自定义SQL -->
  132. </mapper>