BisZhejiangCheckProcessDao.xml 5.2 KB

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