TacObjPblmstb515Dao.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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.TacObjPblmstb515Dao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacObjPblmstb" id="tacObjPblmstb515ResultMap">
  5. <result property="pblmTypeDesc2" column="PBLM_TYPE_DESC2"/>
  6. <result property="pblmTypeDesc" column="PBLM_TYPE_DESC"/>
  7. <result property="id" column="ID"/>
  8. <result property="spfsnlType" column="SPFSNL_TYPE"/>
  9. <result property="class1" column="CLASS1"/>
  10. <result property="class1Name" column="CLASS1_NAME"/>
  11. <result property="class2" column="CLASS2"/>
  12. <result property="class2Name" column="CLASS2_NAME"/>
  13. <result property="sn" column="SN"/>
  14. <result property="pblmsDesc" column="PBLMS_DESC"/>
  15. <result property="relativeLaw" column="RELATIVE_LAW"/>
  16. <result property="lawContent" column="LAW_CONTENT"/>
  17. <result property="cate0" column="CATE0"/>
  18. <result property="cate1" column="CATE1"/>
  19. <result property="cate2" column="CATE2"/>
  20. <result property="subjectIds" column="SUBJECT_IDS"/>
  21. <result property="note" column="NOTE"/>
  22. <result property="intm" column="INTM"/>
  23. <result property="uptm" column="UPTM"/>
  24. <result property="cate0Desc" column="CATE0_DESC"/>
  25. <result property="cate1Desc" column="CATE1_DESC"/>
  26. <result property="cate2Desc" column="CATE2_DESC"/>
  27. <result property="pblmType" column="PBLM_TYPE"/>
  28. <result property="pblmChType" column="PBLM_CH_TYPE"/>
  29. <result property="dataStat" column="DATA_STAT"/>
  30. <result property="sortNo" column="SORT_NO"/>
  31. <result property="persId" column="PERS_ID"/>
  32. </resultMap>
  33. <sql id="table_columns">
  34. PBLM_TYPE_DESC2,
  35. PBLM_TYPE_DESC,
  36. ID,
  37. SPFSNL_TYPE,
  38. CLASS1,
  39. CLASS1_NAME,
  40. CLASS2,
  41. CLASS2_NAME,
  42. SN,
  43. PBLMS_DESC,
  44. RELATIVE_LAW,
  45. LAW_CONTENT,
  46. CATE0,
  47. CATE1,
  48. CATE2,
  49. SUBJECT_IDS,
  50. NOTE,
  51. INTM,
  52. UPTM,
  53. CATE0_DESC,
  54. CATE1_DESC,
  55. CATE2_DESC,
  56. PBLM_TYPE,
  57. PBLM_CH_TYPE,
  58. DATA_STAT,
  59. SORT_NO,
  60. PERS_ID
  61. </sql>
  62. <sql id="entity_properties">
  63. #{pblmTypeDesc2},
  64. #{pblmTypeDesc},
  65. #{id},
  66. #{spfsnlType},
  67. #{class1},
  68. #{class1Name},
  69. #{class2},
  70. #{class2Name},
  71. #{sn},
  72. #{pblmsDesc},
  73. #{relativeLaw},
  74. #{lawContent},
  75. #{cate0},
  76. #{cate1},
  77. #{cate2},
  78. #{subjectIds},
  79. #{note},
  80. #{intm},
  81. #{uptm},
  82. #{cate0Desc},
  83. #{cate1Desc},
  84. #{cate2Desc},
  85. #{pblmType},
  86. #{pblmChType},
  87. #{dataStat},
  88. #{sortNo},
  89. #{persId}
  90. </sql>
  91. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  92. <sql id="page_where">
  93. <trim prefix="where" prefixOverrides="and | or ">
  94. <if test="pblmTypeDesc != null and pblmTypeDesc != ''">and PBLM_TYPE_DESC = #{pblmTypeDesc}</if>
  95. <if test="id != null and id != ''">and ID = #{id}</if>
  96. <if test="spfsnlType != null and spfsnlType != ''">and SPFSNL_TYPE = #{spfsnlType}</if>
  97. <if test="class1 != null and class1 != ''">and CLASS1 = #{class1}</if>
  98. <if test="class1Name != null and class1Name != ''">and CLASS1_NAME = #{class1Name}</if>
  99. <if test="class2 != null and class2 != ''">and CLASS2 = #{class2}</if>
  100. <if test="class2Name != null and class2Name != ''">and CLASS2_NAME = #{class2Name}</if>
  101. <if test="sn != null and sn != ''">and SN = #{sn}</if>
  102. <if test="pblmsDesc != null and pblmsDesc != ''">and PBLMS_DESC = #{pblmsDesc}</if>
  103. <if test="relativeLaw != null and relativeLaw != ''">and RELATIVE_LAW = #{relativeLaw}</if>
  104. <if test="lawContent != null and lawContent != ''">and LAW_CONTENT = #{lawContent}</if>
  105. <if test="cate0 != null and cate0 != ''">and CATE0 = #{cate0}</if>
  106. <if test="cate1 != null and cate1 != ''">and CATE1 = #{cate1}</if>
  107. <if test="cate2 != null and cate2 != ''">and CATE2 = #{cate2}</if>
  108. <if test="subjectIds != null and subjectIds != ''">and SUBJECT_IDS = #{subjectIds}</if>
  109. <if test="note != null and note != ''">and NOTE = #{note}</if>
  110. <if test="intm != null">and INTM = #{intm}</if>
  111. <if test="uptm != null">and UPTM = #{uptm}</if>
  112. <if test="cate0Desc != null and cate0Desc != ''">and CATE0_DESC = #{cate0Desc}</if>
  113. <if test="cate1Desc != null and cate1Desc != ''">and CATE1_DESC = #{cate1Desc}</if>
  114. <if test="cate2Desc != null and cate2Desc != ''">and CATE2_DESC = #{cate2Desc}</if>
  115. <if test="pblmType != null and pblmType != ''">and PBLM_TYPE = #{pblmType}</if>
  116. <if test="pblmChType != null and pblmChType != ''">and PBLM_CH_TYPE = #{pblmChType}</if>
  117. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  118. <if test="sortNo != null and sortNo != ''">and SORT_NO = #{sortNo}</if>
  119. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  120. </trim>
  121. </sql>
  122. <select id="get" resultMap="tacObjPblmstb515ResultMap" parameterType="String" >
  123. select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB515 where ID = #{id}
  124. </select>
  125. <select id="getBy" resultMap="tacObjPblmstb515ResultMap">
  126. select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB515 <include refid="page_where" />
  127. </select>
  128. <select id="findAll" resultMap="tacObjPblmstb515ResultMap">
  129. select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB515
  130. </select>
  131. <select id="findList" resultMap="tacObjPblmstb515ResultMap">
  132. select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB515 <include refid="page_where" />
  133. </select>
  134. <select id="selectCount" resultType="int" >
  135. select count(ID) from TAC_OBJ_PBLMSTB515 <include refid="page_where" />
  136. </select>
  137. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  138. insert into TAC_OBJ_PBLMSTB515( <include refid="table_columns" /> )
  139. values ( <include refid="entity_properties" /> )
  140. </insert>
  141. <delete id="delete" parameterType="java.lang.String">
  142. delete from TAC_OBJ_PBLMSTB515 where ID = #{id}
  143. </delete>
  144. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  145. delete from TAC_OBJ_PBLMSTB515 <include refid="page_where" />
  146. </delete>
  147. <update id="deleteInFlag" parameterType="java.lang.String">
  148. update TAC_OBJ_PBLMSTB515 set flag_valid = 0 where ID = #{id}
  149. </update>
  150. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  151. update TAC_OBJ_PBLMSTB515
  152. <trim prefix="set" suffixOverrides=",">
  153. <if test="pblmTypeDesc != null and pblmTypeDesc != ''">PBLM_TYPE_DESC = #{pblmTypeDesc},</if>
  154. <if test="id != null and id != ''">ID = #{id},</if>
  155. <if test="spfsnlType != null and spfsnlType != ''">SPFSNL_TYPE = #{spfsnlType},</if>
  156. <if test="class1 != null and class1 != ''">CLASS1 = #{class1},</if>
  157. <if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
  158. <if test="class2 != null and class2 != ''">CLASS2 = #{class2},</if>
  159. <if test="class2Name != null and class2Name != ''">CLASS2_NAME = #{class2Name},</if>
  160. <if test="sn != null and sn != ''">SN = #{sn},</if>
  161. <if test="pblmsDesc != null and pblmsDesc != ''">PBLMS_DESC = #{pblmsDesc},</if>
  162. <if test="relativeLaw != null and relativeLaw != ''">RELATIVE_LAW = #{relativeLaw},</if>
  163. <if test="lawContent != null and lawContent != ''">LAW_CONTENT = #{lawContent},</if>
  164. <if test="cate0 != null and cate0 != ''">CATE0 = #{cate0},</if>
  165. <if test="cate1 != null and cate1 != ''">CATE1 = #{cate1},</if>
  166. <if test="cate2 != null and cate2 != ''">CATE2 = #{cate2},</if>
  167. <if test="subjectIds != null and subjectIds != ''">SUBJECT_IDS = #{subjectIds},</if>
  168. <if test="note != null and note != ''">NOTE = #{note},</if>
  169. <if test="intm != null">INTM = #{intm},</if>
  170. <if test="uptm != null">UPTM = #{uptm},</if>
  171. <if test="cate0Desc != null and cate0Desc != ''">CATE0_DESC = #{cate0Desc},</if>
  172. <if test="cate1Desc != null and cate1Desc != ''">CATE1_DESC = #{cate1Desc},</if>
  173. <if test="cate2Desc != null and cate2Desc != ''">CATE2_DESC = #{cate2Desc},</if>
  174. <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
  175. <if test="pblmChType != null and pblmChType != ''">PBLM_CH_TYPE = #{pblmChType},</if>
  176. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  177. <if test="sortNo != null and sortNo != ''">SORT_NO = #{sortNo},</if>
  178. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  179. </trim>
  180. <where>ID = #{id}</where>
  181. </update>
  182. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
  183. update TAC_OBJ_PBLMSTB515
  184. <trim prefix="set" suffixOverrides=",">
  185. <if test="pblmTypeDesc != null and pblmTypeDesc != ''">PBLM_TYPE_DESC = #{pblmTypeDesc},</if>
  186. <if test="id != null and id != ''">ID = #{id},</if>
  187. <if test="spfsnlType != null and spfsnlType != ''">SPFSNL_TYPE = #{spfsnlType},</if>
  188. <if test="class1 != null and class1 != ''">CLASS1 = #{class1},</if>
  189. <if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
  190. <if test="class2 != null and class2 != ''">CLASS2 = #{class2},</if>
  191. <if test="class2Name != null and class2Name != ''">CLASS2_NAME = #{class2Name},</if>
  192. <if test="sn != null and sn != ''">SN = #{sn},</if>
  193. <if test="pblmsDesc != null and pblmsDesc != ''">PBLMS_DESC = #{pblmsDesc},</if>
  194. <if test="relativeLaw != null and relativeLaw != ''">RELATIVE_LAW = #{relativeLaw},</if>
  195. <if test="lawContent != null and lawContent != ''">LAW_CONTENT = #{lawContent},</if>
  196. <if test="cate0 != null and cate0 != ''">CATE0 = #{cate0},</if>
  197. <if test="cate1 != null and cate1 != ''">CATE1 = #{cate1},</if>
  198. <if test="cate2 != null and cate2 != ''">CATE2 = #{cate2},</if>
  199. <if test="subjectIds != null and subjectIds != ''">SUBJECT_IDS = #{subjectIds},</if>
  200. <if test="note != null and note != ''">NOTE = #{note},</if>
  201. <if test="intm != null">INTM = #{intm},</if>
  202. <if test="uptm != null">UPTM = #{uptm},</if>
  203. <if test="cate0Desc != null and cate0Desc != ''">CATE0_DESC = #{cate0Desc},</if>
  204. <if test="cate1Desc != null and cate1Desc != ''">CATE1_DESC = #{cate1Desc},</if>
  205. <if test="cate2Desc != null and cate2Desc != ''">CATE2_DESC = #{cate2Desc},</if>
  206. <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
  207. <if test="pblmChType != null and pblmChType != ''">PBLM_CH_TYPE = #{pblmChType},</if>
  208. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  209. <if test="sortNo != null and sortNo != ''">SORT_NO = #{sortNo},</if>
  210. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  211. </trim>
  212. <include refid="page_where" />
  213. </update>
  214. <!-- 其他自定义SQL -->
  215. </mapper>