BisInspMeetMntsSmsDao.xml 4.8 KB

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