DingTalksConfigMapper.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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.system.DingTalksConfigMapper">
  4. <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.system.DingTalksConfig" >
  5. <id column="id" property="id" jdbcType="BIGINT" />
  6. <result column="type" property="type" jdbcType="INTEGER" />
  7. <result column="url" property="url" jdbcType="VARCHAR" />
  8. <result column="mobiles" property="mobiles" jdbcType="VARCHAR" />
  9. <result column="at_all" property="atAll" jdbcType="INTEGER" />
  10. <result column="is_def" property="isDef" jdbcType="INTEGER"/>
  11. <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
  12. </resultMap>
  13. <sql id="Base_Column_List" >
  14. id, type, url, mobiles, at_all, create_date,is_def
  15. </sql>
  16. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
  17. select
  18. <include refid="Base_Column_List" />
  19. from ding_talks_config
  20. where id = #{id,jdbcType=BIGINT}
  21. </select>
  22. <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.system.DingTalksConfig" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
  23. insert into ding_talks_config (id, type, url,
  24. mobiles, at_all, create_date
  25. )
  26. values (#{id,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR},
  27. #{mobiles,jdbcType=VARCHAR}, #{atAll,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}
  28. )
  29. </insert>
  30. <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.system.DingTalksConfig" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
  31. insert into ding_talks_config
  32. <trim prefix="(" suffix=")" suffixOverrides="," >
  33. <if test="id != null" >
  34. id,
  35. </if>
  36. <if test="type != null" >
  37. type,
  38. </if>
  39. <if test="url != null" >
  40. url,
  41. </if>
  42. <if test="mobiles != null" >
  43. mobiles,
  44. </if>
  45. <if test="atAll != null" >
  46. at_all,
  47. </if>
  48. <if test="createDate != null" >
  49. create_date,
  50. </if>
  51. </trim>
  52. <trim prefix="values (" suffix=")" suffixOverrides="," >
  53. <if test="id != null" >
  54. #{id,jdbcType=BIGINT},
  55. </if>
  56. <if test="type != null" >
  57. #{type,jdbcType=INTEGER},
  58. </if>
  59. <if test="url != null" >
  60. #{url,jdbcType=VARCHAR},
  61. </if>
  62. <if test="mobiles != null" >
  63. #{mobiles,jdbcType=VARCHAR},
  64. </if>
  65. <if test="atAll != null" >
  66. #{atAll,jdbcType=INTEGER},
  67. </if>
  68. <if test="createDate != null" >
  69. #{createDate,jdbcType=TIMESTAMP},
  70. </if>
  71. </trim>
  72. </insert>
  73. <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.system.DingTalksConfig" >
  74. update ding_talks_config
  75. <set >
  76. <if test="type != null" >
  77. type = #{type,jdbcType=INTEGER},
  78. </if>
  79. <if test="url != null" >
  80. url = #{url,jdbcType=VARCHAR},
  81. </if>
  82. <if test="mobiles != null" >
  83. mobiles = #{mobiles,jdbcType=VARCHAR},
  84. </if>
  85. <if test="atAll != null" >
  86. at_all = #{atAll,jdbcType=INTEGER},
  87. </if>
  88. <if test="createDate != null" >
  89. create_date = #{createDate,jdbcType=TIMESTAMP},
  90. </if>
  91. </set>
  92. where id = #{id,jdbcType=BIGINT}
  93. </update>
  94. <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.system.DingTalksConfig" >
  95. update ding_talks_config
  96. set type = #{type,jdbcType=INTEGER},
  97. url = #{url,jdbcType=VARCHAR},
  98. mobiles = #{mobiles,jdbcType=VARCHAR},
  99. at_all = #{atAll,jdbcType=INTEGER},
  100. create_date = #{createDate,jdbcType=TIMESTAMP}
  101. where id = #{id,jdbcType=BIGINT}
  102. </update>
  103. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
  104. delete from ding_talks_config
  105. where id = #{id,jdbcType=BIGINT}
  106. </delete>
  107. <select id="selectDingTalksConfigByPage" resultMap="BaseResultMap">
  108. select
  109. <include refid="Base_Column_List" />
  110. from ding_talks_config
  111. where 1 = 1
  112. <if test="type != null"> and type = #{type}</if>
  113. </select>
  114. </mapper>