修改
This commit is contained in:
@@ -1,266 +0,0 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResource;
|
||||
import org.xyzh.common.dto.resource.TbTag;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description 资源中心控制器
|
||||
* @filename ResourceCenterController.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/resource-center")
|
||||
public class ResourceCenterController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceCenterController.class);
|
||||
|
||||
// ==================== 专项分栏管理 ====================
|
||||
|
||||
/**
|
||||
* 获取专项分栏列表(使用标签 tag_type=1)
|
||||
*/
|
||||
@GetMapping("/categories")
|
||||
public ResultDomain<TbTag> getSpecialCategories() {
|
||||
// TODO: 实现获取专项分栏,使用 TagService.getTagsByType(1) 获取文章分类标签
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取党史学习资源
|
||||
*/
|
||||
@GetMapping("/category/party-history")
|
||||
public ResultDomain<TbResource> getPartyHistoryResources(
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现获取党史学习资源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取领导讲话资源
|
||||
*/
|
||||
@GetMapping("/category/leadership-speech")
|
||||
public ResultDomain<TbResource> getLeadershipSpeechResources(
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现获取领导讲话资源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取政策解读资源
|
||||
*/
|
||||
@GetMapping("/category/policy-interpretation")
|
||||
public ResultDomain<TbResource> getPolicyInterpretationResources(
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现获取政策解读资源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取红色经典资源
|
||||
*/
|
||||
@GetMapping("/category/red-classics")
|
||||
public ResultDomain<TbResource> getRedClassicsResources(
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现获取红色经典资源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专题报告资源
|
||||
*/
|
||||
@GetMapping("/category/special-reports")
|
||||
public ResultDomain<TbResource> getSpecialReportsResources(
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现获取专题报告资源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取思政案例资源
|
||||
*/
|
||||
@GetMapping("/category/ideological-cases")
|
||||
public ResultDomain<TbResource> getIdeologicalCasesResources(
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现获取思政案例资源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分类ID获取资源
|
||||
*/
|
||||
@GetMapping("/category/{tagID}/resources")
|
||||
public ResultDomain<TbResource> getResourcesByCategory(
|
||||
@PathVariable String tagID,
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现根据分类ID获取资源
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 资源检索管理 ====================
|
||||
|
||||
/**
|
||||
* 资源模糊关键词检索
|
||||
*/
|
||||
@GetMapping("/search")
|
||||
public ResultDomain<TbResource> searchResources(
|
||||
@RequestParam String keyword,
|
||||
@RequestParam(required = false) String tagID,
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现支持模糊关键词检索,快速定位资源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 高级搜索
|
||||
*/
|
||||
@PostMapping("/search/advanced")
|
||||
public ResultDomain<TbResource> advancedSearch(@RequestBody Map<String, Object> searchParams) {
|
||||
// TODO: 实现高级搜索功能
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索建议
|
||||
*/
|
||||
@GetMapping("/search/suggestions")
|
||||
public ResultDomain<Map<String, Object>> getSearchSuggestions(@RequestParam String keyword) {
|
||||
// TODO: 实现搜索建议
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索历史
|
||||
*/
|
||||
@GetMapping("/search/history")
|
||||
public ResultDomain<Map<String, Object>> getSearchHistory(@RequestParam String userID) {
|
||||
// TODO: 实现搜索历史
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除搜索历史
|
||||
*/
|
||||
@DeleteMapping("/search/history/clear")
|
||||
public ResultDomain<Boolean> clearSearchHistory(@RequestParam String userID) {
|
||||
// TODO: 实现清除搜索历史
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 资源详情管理 ====================
|
||||
|
||||
/**
|
||||
* 获取资源详情
|
||||
*/
|
||||
@GetMapping("/resource/{resourceID}")
|
||||
public ResultDomain<TbResource> getResourceDetail(@PathVariable String resourceID) {
|
||||
// TODO: 实现展示资源完整内容(文字、图片)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 收藏资源
|
||||
*/
|
||||
@PostMapping("/resource/{resourceID}/collect")
|
||||
public ResultDomain<Boolean> collectResource(
|
||||
@PathVariable String resourceID,
|
||||
@RequestParam String userID) {
|
||||
// TODO: 实现支持收藏
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消收藏资源
|
||||
*/
|
||||
@DeleteMapping("/resource/{resourceID}/collect")
|
||||
public ResultDomain<Boolean> uncollectResource(
|
||||
@PathVariable String resourceID,
|
||||
@RequestParam String userID) {
|
||||
// TODO: 实现取消收藏
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查资源收藏状态
|
||||
*/
|
||||
@GetMapping("/resource/{resourceID}/collect-status")
|
||||
public ResultDomain<Boolean> getCollectStatus(
|
||||
@PathVariable String resourceID,
|
||||
@RequestParam String userID) {
|
||||
// TODO: 实现检查资源收藏状态
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户收藏的资源列表
|
||||
*/
|
||||
@GetMapping("/user/{userID}/collections")
|
||||
public ResultDomain<TbResource> getUserCollections(
|
||||
@PathVariable String userID,
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现获取用户收藏的资源列表
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加资源浏览次数
|
||||
*/
|
||||
@PostMapping("/resource/{resourceID}/view")
|
||||
public ResultDomain<Boolean> incrementResourceView(@PathVariable String resourceID) {
|
||||
// TODO: 实现增加资源浏览次数
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资源统计信息
|
||||
*/
|
||||
@GetMapping("/resource/{resourceID}/statistics")
|
||||
public ResultDomain<Map<String, Object>> getResourceStatistics(@PathVariable String resourceID) {
|
||||
// TODO: 实现获取资源统计信息
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 资源分类管理 ====================
|
||||
|
||||
/**
|
||||
* 获取所有资源分类(使用标签 tag_type=1)
|
||||
*/
|
||||
@GetMapping("/categories/all")
|
||||
public ResultDomain<TbTag> getAllCategories() {
|
||||
// TODO: 实现获取所有资源分类,使用 TagService.getTagsByType(1) 获取文章分类标签
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类树形结构
|
||||
*/
|
||||
@GetMapping("/categories/tree")
|
||||
public ResultDomain<Map<String, Object>> getCategoryTree() {
|
||||
// TODO: 实现获取分类树形结构
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类统计信息
|
||||
*/
|
||||
@GetMapping("/categories/statistics")
|
||||
public ResultDomain<Map<String, Object>> getCategoryStatistics() {
|
||||
// TODO: 实现获取分类统计信息
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -933,10 +933,6 @@ public class NCResourceServiceImpl implements ResourceService {
|
||||
try {
|
||||
List<UserDeptRoleVO> userDeptRoles = LoginUtil.getCurrentDeptRole();
|
||||
List<TaskItemVO> list = resourceMapper.selectItem(filter.getFilter(), filter.getPageParam(), userDeptRoles);
|
||||
if (list == null || list.isEmpty()) {
|
||||
resultDomain.fail("搜索资源失败: 没有找到资源");
|
||||
return resultDomain;
|
||||
}
|
||||
resultDomain.success("搜索资源成功", list);
|
||||
return resultDomain;
|
||||
} catch (Exception e) {
|
||||
|
||||
5
schoolNewsWeb/移动端适配.md
Normal file
5
schoolNewsWeb/移动端适配.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# 需要适配的vue
|
||||
user下的所有View.vue
|
||||
public下的login/Login.vue\ForgotPasswrod.vue\Register.vue
|
||||
以及所有相关user的vue
|
||||
|
||||
Reference in New Issue
Block a user