BisInspRepeatCheckLogDao.xml 4.1 KB

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