模板添加两个参数

This commit is contained in:
2025-02-19 14:36:27 +08:00
parent e87ce424fb
commit 373922bbbf
6 changed files with 21 additions and 16 deletions

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ycwl.basic.mapper.TemplateMapper">
<insert id="add">
insert into template(id, scenic_id, `name`, pid, is_placeholder, source_url, luts, overlays, audios, cover_url, frame_rate, speed, price, slash_price, crop_enable, only_if)
values (#{id}, #{scenicId}, #{name}, #{pid}, #{isPlaceholder}, #{sourceUrl}, #{luts}, #{overlays}, #{audios}, #{coverUrl}, #{frameRate}, #{speed}, #{price}, #{slashPrice}, #{cropEnable}, #{onlyIf})
insert into template(id, scenic_id, `name`, pid, is_placeholder, source_url, luts, overlays, audios, cover_url, frame_rate, speed, price, slash_price, crop_enable, only_if, resolution, create_time)
values (#{id}, #{scenicId}, #{name}, #{pid}, #{isPlaceholder}, #{sourceUrl}, #{luts}, #{overlays}, #{audios}, #{coverUrl}, #{frameRate}, #{speed}, #{price}, #{slashPrice}, #{cropEnable}, #{onlyIf}, #{resolution}, now())
</insert>
<insert id="addConfig">
insert into template_config(id, template_id, create_time)
@ -12,6 +12,7 @@
<update id="update">
update template
<set>
update_time = now(),
<if test="name!= null">`name` = #{name}, </if>
<if test="scenicId!= null">`scenic_id` = #{scenicId}, </if>
<if test="pid!= null">pid = #{pid}, </if>
@ -28,8 +29,9 @@
<if test="sort!= null">sort = #{sort}, </if>
<if test="cropEnable!= null">crop_enable = #{cropEnable}, </if>
<if test="onlyIf!= null">only_if = #{onlyIf}, </if>
<if test="resolution!= null">resolution = #{resolution}, </if>
</set>
where id = #{id}
where id = #{id}
</update>
<update id="updateStatus">
update template