You've already forked FrameTour-BE
feat(source): 添加缩略图字段支持
- 在SourceEntity中新增thumbUrl字段用于存储缩略图地址- 在ZTSourceDataService中设置缩略图URL并优化裁剪配置逻辑 - 更新SourceMapper.xml中的SQL语句以支持缩略图字段的插入和更新 - 移除不必要的URL查询条件以提高查询灵活性
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ycwl.basic.mapper.SourceMapper">
|
||||
<insert id="add">
|
||||
insert into source(id, scenic_id, device_id, url, video_url, `type`, face_sample_id, pos_json, create_time)
|
||||
values (#{id}, #{scenicId}, #{deviceId}, #{url}, #{videoUrl}, #{type}, #{faceSampleId}, #{posJson}, #{createTime})
|
||||
insert into source(id, scenic_id, device_id, url, video_url, thumb_url, `type`, face_sample_id, pos_json, create_time)
|
||||
values (#{id}, #{scenicId}, #{deviceId}, #{url}, #{videoUrl}, #{thumbUrl}, #{type}, #{faceSampleId}, #{posJson}, #{createTime})
|
||||
</insert>
|
||||
<insert id="addFromZTSource">
|
||||
insert into source(id, scenic_id, device_id, url, `type`, face_sample_id, pos_json, create_time)
|
||||
values (#{id}, #{scenicId}, #{deviceId}, #{url}, #{type}, #{faceSampleId}, #{posJson}, #{createTime})
|
||||
insert into source(id, scenic_id, device_id, url, thumb_url, `type`, face_sample_id, pos_json, create_time)
|
||||
values (#{id}, #{scenicId}, #{deviceId}, #{url}, #{thumbUrl}, #{type}, #{faceSampleId}, #{posJson}, #{createTime})
|
||||
</insert>
|
||||
<insert id="addRelation">
|
||||
replace member_source(scenic_id, face_id, member_id, source_id, is_buy, type, order_id<if test="isFree">, is_free</if>)
|
||||
@@ -130,6 +130,7 @@
|
||||
<if test="deviceId!= null">device_id = #{deviceId}, </if>
|
||||
<if test="url!= null">url = #{url}, </if>
|
||||
<if test="videoUrl!= null">video_url = #{videoUrl}, </if>
|
||||
<if test="thumbUrl!= null">thumb_url = #{thumbUrl}, </if>
|
||||
<if test="isBuy!=null">is_buy = #{isBuy}, </if>
|
||||
<if test="type!=null">`type` = #{type}, </if>
|
||||
<if test="faceSampleId!= null">face_sample_id = #{faceSampleId}, </if>
|
||||
@@ -180,7 +181,6 @@
|
||||
<where>
|
||||
<if test="scenicId!= null">and so.scenic_id = #{scenicId} </if>
|
||||
<if test="deviceId!= null">and device_id = #{deviceId} </if>
|
||||
<if test="url!= null">and url = #{url} </if>
|
||||
<if test="isBuy!=null">
|
||||
and is_buy = #{isBuy}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user