104 lines
5.4 KiB
XML
104 lines
5.4 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.system.mapper.DmPlayerConfigMapper">
|
|
|
|
<resultMap type="DmPlayerConfig" id="DmPlayerConfigResult">
|
|
<result property="id" column="id" />
|
|
<result property="playerId" column="player_id" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="shoutInterval" column="shout_interval" />
|
|
<result property="shoutMana" column="shout_mana" />
|
|
<result property="autoAddMana" column="auto_add_mana" />
|
|
<result property="addManaThreshold" column="add_mana_threshold" />
|
|
<result property="yoloHeight" column="yolo_height" />
|
|
<result property="yoloWidth" column="yolo_width" />
|
|
<result property="customParams" column="custom_params" />
|
|
<result property="fixedDirection" column="fixed_direction" />
|
|
<result property="shoutKey" column="shout_key" />
|
|
</resultMap>
|
|
|
|
<sql id="selectDmPlayerConfigVo">
|
|
select id, player_id, create_time,shout_key, update_time, shout_interval, shout_mana, auto_add_mana, add_mana_threshold, yolo_height, yolo_width, custom_params, fixed_direction from dm_player_config
|
|
</sql>
|
|
|
|
<select id="selectDmPlayerConfigList" parameterType="DmPlayerConfig" resultMap="DmPlayerConfigResult">
|
|
<include refid="selectDmPlayerConfigVo"/>
|
|
<where>
|
|
<if test="playerId != null "> and player_id = #{playerId}</if>
|
|
<if test="fixedDirection != null "> and fixed_direction = #{fixedDirection}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectDmPlayerConfigById" parameterType="Long" resultMap="DmPlayerConfigResult">
|
|
<include refid="selectDmPlayerConfigVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
<select id="selectDmPlayerConfigByPlayerId" parameterType="Long" resultMap="DmPlayerConfigResult">
|
|
<include refid="selectDmPlayerConfigVo"/>
|
|
where player_id = #{playerId}
|
|
</select>
|
|
<insert id="insertDmPlayerConfig" parameterType="DmPlayerConfig" useGeneratedKeys="true" keyProperty="id">
|
|
insert into dm_player_config
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="playerId != null">player_id,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="shoutInterval != null">shout_interval,</if>
|
|
<if test="shoutMana != null">shout_mana,</if>
|
|
<if test="autoAddMana != null">auto_add_mana,</if>
|
|
<if test="addManaThreshold != null">add_mana_threshold,</if>
|
|
<if test="yoloHeight != null">yolo_height,</if>
|
|
<if test="yoloWidth != null">yolo_width,</if>
|
|
<if test="customParams != null">custom_params,</if>
|
|
<if test="fixedDirection != null">fixed_direction,</if>
|
|
<if test="shoutKey != null">shoutKey,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="playerId != null">#{playerId},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="shoutInterval != null">#{shoutInterval},</if>
|
|
<if test="shoutMana != null">#{shoutMana},</if>
|
|
<if test="autoAddMana != null">#{autoAddMana},</if>
|
|
<if test="addManaThreshold != null">#{addManaThreshold},</if>
|
|
<if test="yoloHeight != null">#{yoloHeight},</if>
|
|
<if test="yoloWidth != null">#{yoloWidth},</if>
|
|
<if test="customParams != null">#{customParams},</if>
|
|
<if test="fixedDirection != null">#{fixedDirection},</if>
|
|
<if test="shoutKey != null">#{shoutKey},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateDmPlayerConfig" parameterType="DmPlayerConfig">
|
|
update dm_player_config
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="playerId != null">player_id = #{playerId},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="shoutInterval != null">shout_interval = #{shoutInterval},</if>
|
|
<if test="shoutMana != null">shout_mana = #{shoutMana},</if>
|
|
<if test="autoAddMana != null">auto_add_mana = #{autoAddMana},</if>
|
|
<if test="addManaThreshold != null">add_mana_threshold = #{addManaThreshold},</if>
|
|
<if test="yoloHeight != null">yolo_height = #{yoloHeight},</if>
|
|
<if test="yoloWidth != null">yolo_width = #{yoloWidth},</if>
|
|
<if test="customParams != null">custom_params = #{customParams},</if>
|
|
<if test="fixedDirection != null">fixed_direction = #{fixedDirection},</if>
|
|
<if test="shoutKey != null">shout_key = #{shoutKey},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteDmPlayerConfigById" parameterType="Long">
|
|
delete from dm_player_config where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteDmPlayerConfigByIds" parameterType="String">
|
|
delete from dm_player_config where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |