2026-03-10 14:30:24 +08:00

48 lines
1.8 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="DubSupport">
<select id="findSupportById" parameterType="java.util.Map" resultType="DubSupport">
SELECT voiceid,uid,islike
FROM DubSupport
WHERE voiceid = #{voiceid} AND uid = #{uid}
</select>
<insert id="doSaveSupport" parameterType="DubSupport">
INSERT INTO DubSupport(voiceid,uid,islike)
VALUES (#{voiceid},#{uid},#{islike})
</insert>
<update id="doUpdateSupport" parameterType="DubSupport">
Update DubSupport
<set>
<if test="islike != null">islike = #{islike}</if>
</set>
WHERE voiceid = #{voiceid} AND uid = #{uid}
</update>
<update id="doUpdateUserVoicByIds" parameterType="java.util.Map">
Update dubuservoice
<set>
<if test="uid != null">uid = #{uid},</if>
<if test="videoid != null">videoid = #{videoid},</if>
<if test="voicename != null">voicename = #{voicename},</if>
<if test="isshare != null">isshare = #{isshare},</if>
<if test="playcount != null">playcount = ${playcount},</if>
<if test="isdelete != null">isdelete = #{isdelete},</if>
<if test="thirdpartylink != null">thirdpartylink = #{thirdpartylink},</if>
<if test="production != null">production = #{production},</if>
<if test="isrecommend != null">isrecommend = #{isrecommend},</if>
<if test="recommendtime != null">recommendtime = #{recommendtime},</if>
<if test="award != null">award = #{award},</if>
<if test="created != null">created = #{created},</if>
<if test="areaid != null">areaid = #{areaid},</if>
<if test="draft != null">draft = #{draft},</if>
<if test="likecount != null">likecount = ${likecount}</if>
</set>
WHERE voiceid = #{voiceid}
</update>
</mapper>