TacProvincePlanExamineDao.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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.TacProvincePlanExamineDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacProvincePlanExamine" id="tacProvincePlanExamineResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="objName" column="OBJ_NAME"/>
  7. <result property="rgstrId" column="RGSTR_ID"/>
  8. <result property="planProcessId" column="PLAN_PROCESS_ID"/>
  9. <result property="stageStatus" column="STAGE_STATUS"/>
  10. <result property="intm" column="INTM"/>
  11. <result property="uptm" column="UPTM"/>
  12. </resultMap>
  13. <sql id="table_columns">
  14. ID,
  15. OBJ_NAME,
  16. RGSTR_ID,
  17. PLAN_PROCESS_ID,
  18. STAGE_STATUS,
  19. INTM,
  20. UPTM
  21. </sql>
  22. <sql id="entity_properties">
  23. #{id},
  24. #{objName},
  25. #{rgstrId},
  26. #{planProcessId},
  27. #{stageStatus},
  28. #{intm},
  29. #{uptm}
  30. </sql>
  31. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  32. <sql id="page_where">
  33. <trim prefix="where" prefixOverrides="and | or ">
  34. <if test="objName != null and objName != ''">and OBJ_NAME = #{objName}</if>
  35. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  36. <if test="planProcessId != null and planProcessId != ''">and PLAN_PROCESS_ID = #{planProcessId}</if>
  37. <if test="stageStatus != null and stageStatus != ''">and STAGE_STATUS = #{stageStatus}</if>
  38. <if test="intm != null">and INTM = #{intm}</if>
  39. <if test="uptm != null">and UPTM = #{uptm}</if>
  40. </trim>
  41. </sql>
  42. <select id="get" resultMap="tacProvincePlanExamineResultMap" parameterType="String" >
  43. select <include refid="table_columns" /> from TAC_PROVINCE_PLAN_EXAMINE where ID = #{id}
  44. </select>
  45. <select id="getBy" resultMap="tacProvincePlanExamineResultMap">
  46. select <include refid="table_columns" /> from TAC_PROVINCE_PLAN_EXAMINE <include refid="page_where" />
  47. </select>
  48. <select id="findAll" resultMap="tacProvincePlanExamineResultMap">
  49. select <include refid="table_columns" /> from TAC_PROVINCE_PLAN_EXAMINE
  50. </select>
  51. <select id="findList" resultMap="tacProvincePlanExamineResultMap">
  52. select <include refid="table_columns" /> from TAC_PROVINCE_PLAN_EXAMINE <include refid="page_where" />
  53. </select>
  54. <select id="selectCount" resultType="int" >
  55. select count(ID) from TAC_PROVINCE_PLAN_EXAMINE <include refid="page_where" />
  56. </select>
  57. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacProvincePlanExamine">
  58. insert into TAC_PROVINCE_PLAN_EXAMINE( <include refid="table_columns" /> )
  59. values ( <include refid="entity_properties" /> )
  60. </insert>
  61. <delete id="delete" parameterType="java.lang.String">
  62. update TAC_PROVINCE_PLAN_EXAMINE set DATA_STAT='9' where ID = #{id}
  63. </delete>
  64. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacProvincePlanExamine">
  65. update TAC_PROVINCE_PLAN_EXAMINE set DATA_STAT='9' <include refid="page_where" />
  66. </delete>
  67. <update id="deleteInFlag" parameterType="java.lang.String">
  68. update TAC_PROVINCE_PLAN_EXAMINE set DATA_STAT = '9' where ID = #{id}
  69. </update>
  70. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacProvincePlanExamine">
  71. update TAC_PROVINCE_PLAN_EXAMINE
  72. <trim prefix="set" suffixOverrides=",">
  73. <if test="objName != null and objName != ''">OBJ_NAME = #{objName},</if>
  74. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  75. <if test="planProcessId != null and planProcessId != ''">PLAN_PROCESS_ID = #{planProcessId},</if>
  76. <if test="stageStatus != null and stageStatus != ''">STAGE_STATUS = #{stageStatus},</if>
  77. <if test="intm != null">INTM = #{intm},</if>
  78. <if test="uptm != null">UPTM = #{uptm},</if>
  79. </trim>
  80. <where>ID = #{id}</where>
  81. </update>
  82. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacProvincePlanExamine">
  83. update TAC_PROVINCE_PLAN_EXAMINE
  84. <trim prefix="set" suffixOverrides=",">
  85. <if test="objName != null and objName != ''">OBJ_NAME = #{objName},</if>
  86. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  87. <if test="planProcessId != null and planProcessId != ''">PLAN_PROCESS_ID = #{planProcessId},</if>
  88. <if test="stageStatus != null and stageStatus != ''">STAGE_STATUS = #{stageStatus},</if>
  89. <if test="intm != null">INTM = #{intm},</if>
  90. <if test="uptm != null">UPTM = #{uptm},</if>
  91. </trim>
  92. <include refid="page_where" />
  93. </update>
  94. <!-- 其他自定义SQL -->
  95. </mapper>