feat:添加筛选页面展示所有标签功能

This commit is contained in:
s2042968 2025-03-03 14:08:12 +08:00
parent 96edc80df9
commit 965831ae6b
3 changed files with 26 additions and 0 deletions

View File

@ -76,5 +76,12 @@ public class EdTagLibraryController {
public ElectromagneticResult<?> listTagTree() {
return ElectromagneticResultUtil.success(edTagLibraryService.listTagTree());
}
// 查看所有标签
@GetMapping ("/listAllTags")
@UserOperation(value="查看了所有标签", modelName = UserOperationModuleEnum.TAG)
public ElectromagneticResult<?> listAllTags() {
return ElectromagneticResultUtil.success(edTagLibraryService.listAllTags());
}
}

View File

@ -5,6 +5,7 @@ import com.electromagnetic.industry.software.common.pojo.TreeNode;
import com.electromagnetic.industry.software.manage.pojo.models.EdTagLibrary;
import com.electromagnetic.industry.software.manage.pojo.resp.TagListVO;
import javax.swing.text.html.HTML;
import java.util.List;
import java.util.Map;
@ -63,4 +64,10 @@ public interface EdTagLibraryService extends IService<EdTagLibrary> {
* @return
*/
List<TreeNode> listTagTree();
/**
* 获取所有标签
* @return
*/
List<EdTagLibrary> listAllTags();
}

View File

@ -300,5 +300,17 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
}
return list;
}
/**
* 获取所有标签
* @return
*/
@Override
public List<EdTagLibrary> listAllTags() {
LambdaQueryWrapper<EdTagLibrary> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(EdTagLibrary::getIsPublished, PublishEnum.PUBLISHED.getCode())
.eq(EdTagLibrary::getType, TagTypeEnum.TAG.getCode());
return this.list(queryWrapper);
}
}