ChannelReviewMapper.xml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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= "com.juxiao.xchat.module.xbd.mapper.operation.ChannelReviewMapper" >
  4. <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.operation.ChannelReview" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="channel" property="channel" jdbcType="VARCHAR" />
  7. <result column="audit_option" property="auditOption" jdbcType="VARCHAR" />
  8. <result column="left_level" property="leftLevel" jdbcType="INTEGER" />
  9. <result column="audit_version" property="auditVersion" jdbcType="VARCHAR" />
  10. <result column="begin_time" property="beginTime" jdbcType="TIMESTAMP" />
  11. <result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
  12. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  13. </resultMap>
  14. <sql id="Base_Column_List" >
  15. id, channel, audit_option, left_level, audit_version, begin_time, end_time, create_time
  16. </sql>
  17. <select id="getChannelReviewList" resultMap="BaseResultMap" parameterType="map">
  18. select
  19. <include refid="Base_Column_List" />
  20. from channel
  21. <where>
  22. <if test="channel !=null and channel !=''">
  23. and channel = #{channel,jdbcType=VARCHAR}
  24. </if>
  25. </where>
  26. </select>
  27. <select id="getChannelReviewById" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  28. select
  29. <include refid="Base_Column_List" />
  30. from channel
  31. where id = #{id,jdbcType=INTEGER}
  32. </select>
  33. <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.operation.ChannelReview" >
  34. insert into channel (id, channel, audit_option,
  35. left_level, audit_version, begin_time,
  36. end_time, create_time)
  37. values (#{id,jdbcType=INTEGER}, #{channel,jdbcType=VARCHAR}, #{auditOption,jdbcType=VARCHAR},
  38. #{leftLevel,jdbcType=INTEGER}, #{auditVersion,jdbcType=VARCHAR}, #{beginTime,jdbcType=TIMESTAMP},
  39. #{endTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
  40. </insert>
  41. <update id="updateById" parameterType="com.juxiao.xchat.module.xbd.domain.operation.ChannelReview" >
  42. update channel
  43. set
  44. channel = #{channel,jdbcType=VARCHAR},
  45. audit_option = #{auditOption,jdbcType=VARCHAR},
  46. left_level = #{leftLevel,jdbcType=INTEGER},
  47. audit_version = #{auditVersion,jdbcType=VARCHAR},
  48. begin_time = #{beginTime,jdbcType=TIMESTAMP},
  49. end_time = #{endTime,jdbcType=TIMESTAMP}
  50. where id = #{id,jdbcType=INTEGER}
  51. </update>
  52. <delete id="deleteById" parameterType="java.lang.Integer" >
  53. delete from channel
  54. where id = #{id,jdbcType=INTEGER}
  55. </delete>
  56. </mapper>