Merge pull request 'fix(AI资源广场): 修正zip组件方法调用' (#1152) from otto/microservices:aiResourceMRCS into aiResourceMRCS

This commit is contained in:
otto 2026-06-03 15:05:33 +08:00
commit 48314c1a2b
2 changed files with 26 additions and 8 deletions

View File

@ -64,7 +64,7 @@ public class AiResourceParseServiceImpl implements IAiResourceParseService {
List<FileTreeNode> fileTreeNodes = new ArrayList<>();
// 第一遍遍历收集所有一级和二级目录下的 SKILL.md 路径
while ((entry = zais.getNextZipEntry()) != null) {
while ((entry = zais.getNextEntry()) != null) {
String entryName = entry.getName();
if (entry.isDirectory()) {
continue;
@ -111,7 +111,7 @@ public class AiResourceParseServiceImpl implements IAiResourceParseService {
try (ZipArchiveInputStream zais2 = new ZipArchiveInputStream(zipFile.getInputStream(), "GBK", true)) {
ZipArchiveEntry entry2;
skillMdContent = null;
while ((entry2 = zais2.getNextZipEntry()) != null) {
while ((entry2 = zais2.getNextEntry()) != null) {
if (targetSkillMdPath.equals(entry2.getName())) {
skillMdContent = readEntryContent(zais2);
break;

View File

@ -162,7 +162,20 @@
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
ORDER BY zr.sort DESC
<choose>
<when test="resourceCategory != null and resourceCategory !=''">
ORDER BY
zr.like_count DESC,
(select sum(download_count) from sys_file_info sf where FIND_IN_SET(sf.file_id,zr.file_ids)) desc,
zr.view_count DESC,
zr.update_time DESC,
zr.create_time DESC
</when>
<otherwise>
ORDER BY zr.sort DESC
</otherwise>
</choose>
</where>
</sql>
@ -190,12 +203,17 @@
<!-- 数据范围过滤 -->
${params.dataScope}
<choose>
<when test="orderByDownloadCount != null and orderByDownloadCount">
order by (select sum(download_count) from sys_file_info sf where FIND_IN_SET(sf.file_id,zr.file_ids)) desc
</when>
<when test="orderByDownloadCount = null and orderByColumn = null and orderByColumn =''">
order by zr.sort DESC
<when test="resourceCategory != null and resourceCategory !=''">
ORDER BY
zr.like_count DESC,
(select sum(download_count) from sys_file_info sf where FIND_IN_SET(sf.file_id,zr.file_ids)) desc,
zr.view_count DESC,
zr.update_time DESC,
zr.create_time DESC
</when>
<otherwise>
ORDER BY zr.sort DESC
</otherwise>
</choose>
</where>
</sql>