TacProvincePlanExamRecordDao.xml 5.7 KB

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