fix:任务执行文件搜索

This commit is contained in:
2026-02-26 14:08:39 +08:00
parent 5058d92b37
commit 69d91d1660
3 changed files with 7 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ public class SimulationParameterItem {
private String description;
@Schema(description = "创建人")
private Long creatorId;
private String creatorId;
@Schema(description = "创建时间")
private String createTime;

View File

@@ -341,11 +341,11 @@ public class SimulationParameterLibraryServiceImpl extends ServiceImpl<Simulatio
// 将 List<Long> userIds 转成set
Set<Long> userIdsSet = new HashSet<>();
for (Map<String, Object> map : parameterJsonValueFromJsonNode) {
userIdsSet.add((Long) map.get("creatorId"));
userIdsSet.add(Long.valueOf((String) map.get("creatorId")));
}
Map<Long, String> longStringMap = userNameCacheService.batchGetUserNames(userIdsSet);
for (Map<String, Object> map : parameterJsonValueFromJsonNode) {
map.put("createName", longStringMap.get((Long) map.get("creatorId")));
map.put("createName", longStringMap.get(Long.valueOf((String) map.get("creatorId"))));
simulationParameterLibraryCategoryObjectResp.setCreateTime(simulationParameterLibraryCategoryObject.getCreateTime());
}
}
@@ -486,7 +486,7 @@ public class SimulationParameterLibraryServiceImpl extends ServiceImpl<Simulatio
// 给页面上新增的对象参数添加创建人和时间
req.getParameterList().forEach(item -> {
if (item.getCreatorId() == null) {
item.setCreatorId(ThreadLocalContext.getUserId());
item.setCreatorId(String.valueOf(ThreadLocalContext.getUserId()));
item.setCreateTime(DateUtils.format(new Date(), DateUtils.PATTERN_DEFAULT));
}
});

View File

@@ -157,8 +157,7 @@
<select id="selectBigFiles" resultType="com.sdm.data.model.entity.FileStorage">
SELECT
distinct
file_storage.fileName,file_storage.fileId,file_storage.userGroupId,file_storage.userId,file_storage.fileSuffix,file_storage.updateTime
file_storage.fileName,file_storage.fileId,file_storage.userGroupId,file_storage.userId,file_storage.fileSuffix
FROM file_metadata_info
inner join file_storage on file_storage.fileId = file_metadata_info.id
<where>
@@ -208,7 +207,8 @@
#{userId}
</foreach>
</if>
order by file_storage.updateTime desc
</where>
GROUP BY file_storage.fileName, file_storage.fileId, file_storage.userGroupId, file_storage.userId, file_storage.fileSuffix
order by MAX(file_storage.updateTime) desc
</select>
</mapper>