提交代码

This commit is contained in:
jiang 2024-11-21 09:07:49 +08:00
parent 239a140b6a
commit b15436debf
4 changed files with 25 additions and 19 deletions

View File

@ -11,7 +11,6 @@ import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.annotation.RequiresPermissions;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

View File

@ -282,7 +282,7 @@ public class DataSetBasicFileServiceImpl implements DataSetBasicFileService {
dataSetBasicFileMapper.updateSharedFilesByIds(isPublic,entity.getIsPublic());
}
}
return null;
return AjaxResult.success();
}
/**

View File

@ -20,44 +20,51 @@
</resultMap>
<sql id="selectDataSetBasicFileVo">
select file_id, parent_id, ancestors, file_name, file_url, file_size, file_last_modifytime, upload_time, is_directory, is_public, del_flag, create_by, create_time, update_by, update_time from ai_basic_file
select abf.file_id, abf.parent_id, abf.ancestors, abf.file_name, abf.file_url,
abf.file_size, abf.file_last_modifytime, abf.upload_time, abf.is_directory, abf.is_public,
abf.del_flag, su.user_name AS create_by , abf.create_time, abf.update_by, abf.update_time
from ai_basic_file abf
LEFT JOIN sys_user su ON abf.create_by = su.user_id
</sql>
<select id="selectDataSetBasicFileList" parameterType="com.bonus.ai.domain.DataSetBasicFileEntity" resultMap="DataSetBasicFileResult">
<include refid="selectDataSetBasicFileVo"/>
where
del_flag ='0' and create_by = #{createBy}
<if test="isDirectory != null and isDirectory != ''"> and is_directory = #{isDirectory}</if>
<if test="parentId != null"> and parent_id = #{parentId}</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="isPublic != null and isPublic != ''"> and is_public =#{isPublic}</if>
abf.del_flag ='0' and abf.create_by = #{createBy}
<if test="isDirectory != null and isDirectory != ''"> and abf.is_directory = #{isDirectory}</if>
<if test="parentId != null"> and abf.parent_id = #{parentId}</if>
<if test="fileName != null and fileName != ''"> and abf.file_name like concat('%', #{fileName}, '%')</if>
<if test="isPublic != null and isPublic != ''"> and abf.is_public =#{isPublic}</if>
ORDER BY is_directory DESC ,create_time DESC
</select>
<select id="selectDataSetBasicFileByFileId" parameterType="Long" resultMap="DataSetBasicFileResult">
<include refid="selectDataSetBasicFileVo"/>
where file_id = #{fileId}
ORDER BY is_directory DESC ,create_time DESC
where abf.file_id = #{fileId}
ORDER BY abf.is_directory DESC ,abf.create_time DESC
</select>
<select id="selectDataSetBasicFileByParentId" resultMap="DataSetBasicFileResult">
<include refid="selectDataSetBasicFileVo"/>
where parent_id = #{parentId}
ORDER BY is_directory DESC ,create_time DESC
where abf.parent_id = #{parentId}
ORDER BY abf.is_directory DESC ,abf.create_time DESC
</select>
<select id="selectDataSetBasicDelFileList" parameterType="com.bonus.ai.domain.DataSetBasicFileEntity" resultMap="DataSetBasicFileResult">
<include refid="selectDataSetBasicFileVo"/>
<where>
del_flag ='1' and create_by = #{createBy}
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
abf.del_flag ='1' and abf.create_by = #{createBy}
<if test="fileName != null and fileName != ''"> and abf.file_name like concat('%', #{fileName}, '%')</if>
AND abf.update_time >= DATE_SUB(NOW(), INTERVAL 30 DAY)
</where>
</select>
<select id="selectDataSetBasicFileIsPublicList" parameterType="com.bonus.ai.domain.DataSetBasicFileEntity" resultMap="DataSetBasicFileResult">
<include refid="selectDataSetBasicFileVo"/>
<where>
del_flag ='0' and is_public = '1' and parent_id = #{parentId}
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
abf.del_flag ='0' and abf.is_public = '1' and abf.parent_id = #{parentId}
<if test="fileName != null and fileName != ''"> and abf.file_name like concat('%', #{fileName}, '%')</if>
</where>
</select>
@ -132,14 +139,14 @@
</update>
<update id="dataRecoveryFileByFileIds">
update ai_basic_file set del_flag='0' where file_id in
update ai_basic_file set del_flag='0' where file_id in
<foreach item="fileId" collection="array" open="(" separator="," close=")">
#{fileId}
</foreach>
</update>
<delete id="deleteDataSetBasicFileByFileIds" parameterType="String">
update ai_basic_file set del_flag='1' where file_id in
update ai_basic_file set del_flag='1' , update_time = now() where file_id in
<foreach item="fileId" collection="array" open="(" separator="," close=")">
#{fileId}
</foreach>

View File

@ -27,7 +27,7 @@
<where>
AT.del_flag='0'
<if test="userName != null and userName != ''"> and su.nick_name like concat('%', #{userName}, '%')</if>
<if test="roleId != null and roleId != ''"> and AT.role_id = #{roleId}</if>
<if test="roleId != null and roleId != ''"> and AT.role_id like concat('%', #{roleId}, '%') </if>
<if test="sex != null and sex != ''"> and su.sex = #{sex}</if>
</where>
ORDER BY AT.create_time DESC