feat(video): 添加MinIO对象更新和批量删除功能- 新增updateVMinioObject方法支持按ID更新对象信息- 新增selectVMinioObjectList方法用于查询所有对象
- 新增deleteVMinioObjectByIds方法支持批量删除对象 - 完善XML映射文件中的动态SQL配置- 优化删除逻辑以提高执行效率和安全性
This commit is contained in:
@@ -41,6 +41,39 @@
|
||||
#{delFlag}
|
||||
)
|
||||
</insert>
|
||||
<update id="updateVMinioObject">
|
||||
UPDATE v_minio_object
|
||||
<set>
|
||||
<if test="bucketName != null">
|
||||
bucket_name = #{bucketName},
|
||||
</if>
|
||||
<if test="objectName != null">
|
||||
object_name = #{objectName},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url = #{url},
|
||||
</if>
|
||||
<if test="originalName != null">
|
||||
original_name = #{originalName},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="createBy != null">
|
||||
create_by = #{createBy},
|
||||
</if>
|
||||
<if test="updateBy != null">
|
||||
update_by = #{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark}
|
||||
</if>
|
||||
</set>
|
||||
WHERE object_id = #{objectId}
|
||||
</update>
|
||||
|
||||
<select id="selectVMinioObjectById" parameterType="long" resultMap="VMinioObjectResult">
|
||||
SELECT * FROM v_minio_object WHERE object_id = #{id}
|
||||
@@ -53,9 +86,19 @@
|
||||
<select id="selectVMinioObjectByObjectName" parameterType="string" resultMap="VMinioObjectResult">
|
||||
SELECT * FROM v_minio_object WHERE object_name = #{objectName}
|
||||
</select>
|
||||
<select id="selectVMinioObjectList" resultMap="VMinioObjectResult">
|
||||
SELECT * FROM v_minio_object
|
||||
</select>
|
||||
|
||||
<delete id="deleteVMinioObjectByObjectName" parameterType="string">
|
||||
DELETE FROM v_minio_object WHERE object_name = #{objectName}
|
||||
</delete>
|
||||
<delete id="deleteVMinioObjectByIds">
|
||||
DELETE FROM v_minio_object WHERE object_id IN
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user