QwFriendWelcomeItemMapper.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.fs.qw.mapper.QwFriendWelcomeItemMapper">
  6. <resultMap type="QwFriendWelcomeItem" id="QwFriendWelcomeItemResult">
  7. <result property="id" column="id" />
  8. <result property="friendWelcomeId" column="friend_welcome_id" />
  9. <result property="welcomeText" column="welcome_text" />
  10. <result property="attachments" column="attachments" />
  11. <result property="week" column="week" />
  12. <result property="startTime" column="start_time" />
  13. <result property="endTime" column="end_time" />
  14. <result property="createdTime" column="created_time" />
  15. <result property="updateTieme" column="update_tieme" />
  16. </resultMap>
  17. <sql id="selectQwFriendWelcomeItemVo">
  18. select id, friend_welcome_id, welcome_text, attachments, week, start_time, end_time, created_time, update_tieme from qw_friend_welcome_item
  19. </sql>
  20. <select id="selectQwFriendWelcomeItemList" parameterType="QwFriendWelcomeItem" resultMap="QwFriendWelcomeItemResult">
  21. <include refid="selectQwFriendWelcomeItemVo"/>
  22. <where>
  23. <if test="friendWelcomeId != null "> and friend_welcome_id = #{friendWelcomeId}</if>
  24. <if test="welcomeText != null and welcomeText != ''"> and welcome_text = #{welcomeText}</if>
  25. <if test="attachments != null and attachments != ''"> and attachments = #{attachments}</if>
  26. <if test="week != null and week != ''"> and week = #{week}</if>
  27. <if test="startTime != null "> and start_time = #{startTime}</if>
  28. <if test="endTime != null "> and end_time = #{endTime}</if>
  29. <if test="createdTime != null "> and created_time = #{createdTime}</if>
  30. <if test="updateTieme != null "> and update_tieme = #{updateTieme}</if>
  31. </where>
  32. </select>
  33. <select id="selectQwFriendWelcomeItemById" parameterType="Long" resultMap="QwFriendWelcomeItemResult">
  34. <include refid="selectQwFriendWelcomeItemVo"/>
  35. where id = #{id}
  36. </select>
  37. <insert id="insertQwFriendWelcomeItem" parameterType="QwFriendWelcomeItem">
  38. insert into qw_friend_welcome_item
  39. <trim prefix="(" suffix=")" suffixOverrides=",">
  40. <if test="id != null">id,</if>
  41. <if test="friendWelcomeId != null">friend_welcome_id,</if>
  42. <if test="welcomeText != null">welcome_text,</if>
  43. <if test="attachments != null">attachments,</if>
  44. <if test="week != null">week,</if>
  45. <if test="startTime != null">start_time,</if>
  46. <if test="endTime != null">end_time,</if>
  47. <if test="createdTime != null">created_time,</if>
  48. <if test="updateTieme != null">update_tieme,</if>
  49. </trim>
  50. <trim prefix="values (" suffix=")" suffixOverrides=",">
  51. <if test="id != null">#{id},</if>
  52. <if test="friendWelcomeId != null">#{friendWelcomeId},</if>
  53. <if test="welcomeText != null">#{welcomeText},</if>
  54. <if test="attachments != null">#{attachments},</if>
  55. <if test="week != null">#{week},</if>
  56. <if test="startTime != null">#{startTime},</if>
  57. <if test="endTime != null">#{endTime},</if>
  58. <if test="createdTime != null">#{createdTime},</if>
  59. <if test="updateTieme != null">#{updateTieme},</if>
  60. </trim>
  61. </insert>
  62. <update id="updateQwFriendWelcomeItem" parameterType="QwFriendWelcomeItem">
  63. update qw_friend_welcome_item
  64. <trim prefix="SET" suffixOverrides=",">
  65. <if test="friendWelcomeId != null">friend_welcome_id = #{friendWelcomeId},</if>
  66. <if test="welcomeText != null">welcome_text = #{welcomeText},</if>
  67. <if test="attachments != null">attachments = #{attachments},</if>
  68. <if test="week != null">week = #{week},</if>
  69. <if test="startTime != null">start_time = #{startTime},</if>
  70. <if test="endTime != null">end_time = #{endTime},</if>
  71. <if test="createdTime != null">created_time = #{createdTime},</if>
  72. <if test="updateTieme != null">update_tieme = #{updateTieme},</if>
  73. </trim>
  74. where id = #{id}
  75. </update>
  76. <delete id="deleteQwFriendWelcomeItemById" parameterType="Long">
  77. delete from qw_friend_welcome_item where id = #{id}
  78. </delete>
  79. <delete id="deleteQwFriendWelcomeItemByIds" parameterType="String">
  80. delete from qw_friend_welcome_item where id in
  81. <foreach item="id" collection="array" open="(" separator="," close=")">
  82. #{id}
  83. </foreach>
  84. </delete>
  85. </mapper>