解决安全事故登记附件问题
parent
4db653df79
commit
18b01cd459
2
ruoyi
2
ruoyi
|
|
@ -1 +1 @@
|
|||
Subproject commit 16e1fc95534519a06bc1dca0df64ffceeb3c9931
|
||||
Subproject commit d456ff189647e16ffaaa170738d785eeee1253c0
|
||||
|
|
@ -35,4 +35,25 @@ public interface FileAssociationsMapper extends BaseMapper<FileAssociations> {
|
|||
</script>
|
||||
""")
|
||||
List<FileAssociations> getFiles(@Param("tableName") String tableName,@Param("businessId") String businessId);
|
||||
|
||||
@Select("""
|
||||
<script>
|
||||
SELECT
|
||||
fa.*,
|
||||
fd.file_name,
|
||||
fd.file_size,
|
||||
fd.file_path
|
||||
FROM
|
||||
file_associations fa
|
||||
LEFT JOIN file_descriptor fd ON fa.file_id = fd.file_id
|
||||
WHERE
|
||||
fa.del = '1'
|
||||
AND fa.business_id = #{businessId}
|
||||
AND fa.type = #{type}
|
||||
AND fa."table_name" = #{tableName}
|
||||
AND fd.group_id = #{tableName}
|
||||
ORDER BY fa.tm desc
|
||||
</script>
|
||||
""")
|
||||
List<FileAssociations> queryFileList(@Param("businessId") String businessId,@Param("tableName") String tableName,@Param("type") String type);
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
package com.gunshi.project.xyt.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gunshi.project.xyt.mapper.FileAssociationsMapper;
|
||||
import com.gunshi.project.xyt.model.FileAssociations;
|
||||
|
|
@ -167,11 +165,7 @@ public class FileAssociationsService extends ServiceImpl<FileAssociationsMapper,
|
|||
}
|
||||
|
||||
public List<FileAssociations> queryFileList(String businessId, String tableName,String type) {
|
||||
LambdaQueryWrapper<FileAssociations> queryWrapper = Wrappers.lambdaQuery();
|
||||
queryWrapper.eq(FileAssociations::getBusinessId,businessId)
|
||||
.eq(FileAssociations::getTableName,tableName)
|
||||
.eq(FileAssociations::getType,type);
|
||||
return this.list(queryWrapper);
|
||||
return this.baseMapper.queryFileList(businessId,tableName,type);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue