添加排序问题

This commit is contained in:
sh
2026-06-26 19:13:40 +08:00
parent c1d57a1737
commit 84926f496d
5 changed files with 22 additions and 75 deletions

View File

@@ -13,10 +13,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="fileName" column="file_name" />
<result property="sortNum" column="sort_num" />
</resultMap>
<sql id="selectFileVo">
select id, file_url, bussinessid, del_flag, create_by, create_time, update_by, update_time from file_job_upload
select id, file_url, bussinessid, del_flag, create_by, create_time, update_by, update_time,file_name,sort_num from file_job_upload
</sql>
<select id="selectFileList" parameterType="FileJobUpload" resultMap="FileResult">
@@ -85,4 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</update>
<select id="selectMaxSortNum" resultType="java.lang.Integer">
SELECT COALESCE(MAX(sort_num), 0) + 1 AS sort_num FROM file_job_upload WHERE del_flag='0'
</select>
</mapper>