LiveCommentFeatureConfigMapper.xml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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.fs.live.mapper.LiveCommentFeatureConfigMapper">
  4. <resultMap type="LiveCommentFeatureConfig" id="LiveCommentFeatureConfigResult">
  5. <result property="configId" column="config_id"/>
  6. <result property="floatEnabled" column="float_enabled"/>
  7. <result property="floatCooldownSec" column="float_cooldown_sec"/>
  8. <result property="floatRoleCodes" column="float_role_codes"/>
  9. <result property="pinMaxPerRoom" column="pin_max_per_room"/>
  10. <result property="pinDurationOptions" column="pin_duration_options"/>
  11. <result property="pinRoleCodes" column="pin_role_codes"/>
  12. <result property="remark" column="remark"/>
  13. <result property="updateBy" column="update_by"/>
  14. <result property="updateTime" column="update_time"/>
  15. </resultMap>
  16. <sql id="selectVo">
  17. select config_id, float_enabled, float_cooldown_sec, float_role_codes, pin_max_per_room,
  18. pin_duration_options, pin_role_codes, remark, update_by, update_time
  19. from live_comment_feature_config
  20. </sql>
  21. <select id="selectByConfigId" resultMap="LiveCommentFeatureConfigResult">
  22. <include refid="selectVo"/>
  23. where config_id = #{configId}
  24. </select>
  25. <update id="updateLiveCommentFeatureConfig" parameterType="LiveCommentFeatureConfig">
  26. update live_comment_feature_config
  27. <trim prefix="SET" suffixOverrides=",">
  28. <if test="floatEnabled != null">float_enabled = #{floatEnabled},</if>
  29. <if test="floatCooldownSec != null">float_cooldown_sec = #{floatCooldownSec},</if>
  30. <if test="floatRoleCodes != null">float_role_codes = #{floatRoleCodes},</if>
  31. <if test="pinMaxPerRoom != null">pin_max_per_room = #{pinMaxPerRoom},</if>
  32. <if test="pinDurationOptions != null">pin_duration_options = #{pinDurationOptions},</if>
  33. <if test="pinRoleCodes != null">pin_role_codes = #{pinRoleCodes},</if>
  34. <if test="remark != null">remark = #{remark},</if>
  35. <if test="updateBy != null">update_by = #{updateBy},</if>
  36. <if test="updateTime != null">update_time = #{updateTime},</if>
  37. </trim>
  38. where config_id = #{configId}
  39. </update>
  40. </mapper>