serv-控制器
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.news.banner.BannerService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbBanner;
|
||||
|
||||
/**
|
||||
* @description 横幅控制器
|
||||
* @filename BannerController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/banner")
|
||||
public class BannerController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(BannerController.class);
|
||||
|
||||
@Autowired
|
||||
private BannerService bannerService;
|
||||
|
||||
/**
|
||||
* 获取横幅列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbBanner> getBannerList(TbBanner filter) {
|
||||
return null;
|
||||
// return bannerService.getBannerList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取横幅详情
|
||||
*/
|
||||
@GetMapping("/{bannerID}")
|
||||
public ResultDomain<TbBanner> getBannerById(@PathVariable String bannerID) {
|
||||
return bannerService.getBannerById(bannerID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建横幅
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
public ResultDomain<TbBanner> createBanner(@RequestBody TbBanner banner) {
|
||||
return bannerService.createBanner(banner);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新横幅
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public ResultDomain<TbBanner> updateBanner(@RequestBody TbBanner banner) {
|
||||
return bannerService.updateBanner(banner);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除横幅
|
||||
*/
|
||||
@DeleteMapping("/{bannerID}")
|
||||
public ResultDomain<Boolean> deleteBanner(@PathVariable String bannerID) {
|
||||
return bannerService.deleteBanner(bannerID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新横幅状态
|
||||
*/
|
||||
@PutMapping("/{bannerID}/status")
|
||||
public ResultDomain<TbBanner> updateBannerStatus(
|
||||
@PathVariable String bannerID,
|
||||
@RequestParam Integer status) {
|
||||
return bannerService.updateBannerStatus(bannerID, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新横幅排序
|
||||
*/
|
||||
@PutMapping("/{bannerID}/order")
|
||||
public ResultDomain<TbBanner> updateBannerOrder(
|
||||
@PathVariable String bannerID,
|
||||
@RequestParam Integer orderNum) {
|
||||
return bannerService.updateBannerOrder(bannerID, orderNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活跃横幅
|
||||
*/
|
||||
@GetMapping("/active")
|
||||
public ResultDomain<TbBanner> getActiveBanners(@RequestParam(required = false) Integer limit) {
|
||||
return bannerService.getActiveBanners(limit);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.news.collection.DataCollectionService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionConfig;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionLog;
|
||||
|
||||
/**
|
||||
* @description 数据采集控制器
|
||||
* @filename DataCollectionController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/collection")
|
||||
public class DataCollectionController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DataCollectionController.class);
|
||||
|
||||
@Autowired
|
||||
private DataCollectionService dataCollectionService;
|
||||
|
||||
/**
|
||||
* 获取配置列表
|
||||
*/
|
||||
@GetMapping("/config/list")
|
||||
public ResultDomain<TbDataCollectionConfig> getConfigList(TbDataCollectionConfig filter) {
|
||||
return null;
|
||||
// return dataCollectionService.getConfigList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取配置详情
|
||||
*/
|
||||
@GetMapping("/config/{configID}")
|
||||
public ResultDomain<TbDataCollectionConfig> getConfigById(@PathVariable String configID) {
|
||||
return dataCollectionService.getConfigById(configID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建配置
|
||||
*/
|
||||
@PostMapping("/config/create")
|
||||
public ResultDomain<TbDataCollectionConfig> createConfig(@RequestBody TbDataCollectionConfig config) {
|
||||
return dataCollectionService.createConfig(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置
|
||||
*/
|
||||
@PutMapping("/config/update")
|
||||
public ResultDomain<TbDataCollectionConfig> updateConfig(@RequestBody TbDataCollectionConfig config) {
|
||||
return dataCollectionService.updateConfig(config);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除配置
|
||||
*/
|
||||
@DeleteMapping("/config/{configID}")
|
||||
public ResultDomain<Boolean> deleteConfig(@PathVariable String configID) {
|
||||
return dataCollectionService.deleteConfig(configID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置状态
|
||||
*/
|
||||
@PutMapping("/config/{configID}/status")
|
||||
public ResultDomain<TbDataCollectionConfig> updateConfigStatus(
|
||||
@PathVariable String configID,
|
||||
@RequestParam Integer status) {
|
||||
return dataCollectionService.updateConfigStatus(configID, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日志列表
|
||||
*/
|
||||
@GetMapping("/log/list")
|
||||
public ResultDomain<TbDataCollectionLog> getLogList(TbDataCollectionLog filter) {
|
||||
return null;
|
||||
// return dataCollectionService.getLogList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取日志详情
|
||||
*/
|
||||
@GetMapping("/log/{logID}")
|
||||
public ResultDomain<TbDataCollectionLog> getLogById(@PathVariable String logID) {
|
||||
return dataCollectionService.getLogById(logID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日志
|
||||
*/
|
||||
@PostMapping("/log/create")
|
||||
public ResultDomain<TbDataCollectionLog> createLog(@RequestBody TbDataCollectionLog log) {
|
||||
return dataCollectionService.createLog(log);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除日志
|
||||
*/
|
||||
@DeleteMapping("/log/{logID}")
|
||||
public ResultDomain<Boolean> deleteLog(@PathVariable String logID) {
|
||||
return null;
|
||||
// return dataCollectionService.deleteLog(logID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活跃配置
|
||||
*/
|
||||
@GetMapping("/active")
|
||||
public ResultDomain<TbDataCollectionLog> getActiveConfigs() {
|
||||
return null;
|
||||
// return dataCollectionService.getActiveConfigs();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,217 @@
|
||||
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.TbBanner;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description 首页控制器
|
||||
* @filename HomePageController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/homepage")
|
||||
public class HomePageController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(HomePageController.class);
|
||||
|
||||
// ==================== 轮播组件管理 ====================
|
||||
|
||||
/**
|
||||
* 获取轮播组件数据
|
||||
*/
|
||||
@GetMapping("/banner/list")
|
||||
public ResultDomain<TbBanner> getBannerList() {
|
||||
// TODO: 实现获取轮播组件数据(自动轮播核心新闻,支持手动切换)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击轮播跳转新闻详情
|
||||
*/
|
||||
@GetMapping("/banner/click/{bannerID}")
|
||||
public ResultDomain<TbResource> getBannerNewsDetail(@PathVariable String bannerID) {
|
||||
// TODO: 实现点击跳转新闻详情
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活跃轮播列表
|
||||
*/
|
||||
@GetMapping("/banner/active")
|
||||
public ResultDomain<TbBanner> getActiveBanners() {
|
||||
// TODO: 实现获取活跃轮播列表
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== TOP资源推荐 ====================
|
||||
|
||||
/**
|
||||
* 获取TOP资源推荐列表
|
||||
*/
|
||||
@GetMapping("/recommend/top-list")
|
||||
public ResultDomain<TbResource> getTopRecommendList() {
|
||||
// TODO: 实现获取TOP资源推荐列表(按浏览数据展示高热度新闻)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台调控展示顺序
|
||||
*/
|
||||
@PutMapping("/recommend/order")
|
||||
public ResultDomain<Boolean> updateRecommendOrder(@RequestBody Map<String, Object> orderData) {
|
||||
// TODO: 实现后台调控展示顺序与内容
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取高热度新闻
|
||||
*/
|
||||
@GetMapping("/recommend/hot-news")
|
||||
public ResultDomain<TbResource> getHotNews(@RequestParam(required = false) Integer limit) {
|
||||
// TODO: 实现获取高热度新闻
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 思政新闻概览 ====================
|
||||
|
||||
/**
|
||||
* 获取思政新闻概览
|
||||
*/
|
||||
@GetMapping("/news/overview")
|
||||
public ResultDomain<TbResource> getNewsOverview(
|
||||
@RequestParam(required = false) Integer pageNum,
|
||||
@RequestParam(required = false) Integer pageSize) {
|
||||
// TODO: 实现获取思政新闻概览(以卡片形式展示新闻标题、发布时间、简介)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击跳转二级详情页
|
||||
*/
|
||||
@GetMapping("/news/detail/{newsID}")
|
||||
public ResultDomain<TbResource> getNewsDetail(@PathVariable String newsID) {
|
||||
// TODO: 实现点击跳转二级详情页
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取最新思政新闻
|
||||
*/
|
||||
@GetMapping("/news/latest")
|
||||
public ResultDomain<TbResource> getLatestNews(@RequestParam(required = false) Integer limit) {
|
||||
// TODO: 实现获取最新思政新闻
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 顶部菜单栏 ====================
|
||||
|
||||
/**
|
||||
* 获取顶部菜单栏配置
|
||||
*/
|
||||
@GetMapping("/menu/top-menu")
|
||||
public ResultDomain<Map<String, Object>> getTopMenuConfig() {
|
||||
// TODO: 实现获取顶部菜单栏(包含首页、资源中心、学习计划、专题活动、红色常信)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台修改菜单名称
|
||||
*/
|
||||
@PutMapping("/menu/update-name")
|
||||
public ResultDomain<Boolean> updateMenuName(@RequestBody Map<String, Object> menuData) {
|
||||
// TODO: 实现支持后台修改菜单名称
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单项列表
|
||||
*/
|
||||
@GetMapping("/menu/list")
|
||||
public ResultDomain<Map<String, Object>> getMenuList() {
|
||||
// TODO: 实现获取菜单项列表
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 模糊检索 ====================
|
||||
|
||||
/**
|
||||
* 模糊检索资源
|
||||
*/
|
||||
@GetMapping("/search")
|
||||
public ResultDomain<TbResource> searchResources(@RequestParam String keyword) {
|
||||
// TODO: 实现模糊检索(输入关键词实时匹配资源(新闻、课程))
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实时搜索建议
|
||||
*/
|
||||
@GetMapping("/search/suggestions")
|
||||
public ResultDomain<Map<String, Object>> getSearchSuggestions(@RequestParam String keyword) {
|
||||
// TODO: 实现实时搜索建议
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取热门搜索词
|
||||
*/
|
||||
@GetMapping("/search/hot-keywords")
|
||||
public ResultDomain<Map<String, Object>> getHotKeywords() {
|
||||
// TODO: 实现获取热门搜索词
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索新闻
|
||||
*/
|
||||
@GetMapping("/search/news")
|
||||
public ResultDomain<TbResource> searchNews(@RequestParam String keyword) {
|
||||
// TODO: 实现搜索新闻
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索课程
|
||||
*/
|
||||
@GetMapping("/search/courses")
|
||||
public ResultDomain<Map<String, Object>> searchCourses(@RequestParam String keyword) {
|
||||
// TODO: 实现搜索课程
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 首页统计数据 ====================
|
||||
|
||||
/**
|
||||
* 获取首页统计数据
|
||||
*/
|
||||
@GetMapping("/statistics")
|
||||
public ResultDomain<Map<String, Object>> getHomePageStatistics() {
|
||||
// TODO: 实现获取首页统计数据
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取今日访问量
|
||||
*/
|
||||
@GetMapping("/statistics/today-visits")
|
||||
public ResultDomain<Map<String, Object>> getTodayVisits() {
|
||||
// TODO: 实现获取今日访问量
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取资源总数
|
||||
*/
|
||||
@GetMapping("/statistics/total-resources")
|
||||
public ResultDomain<Map<String, Object>> getTotalResources() {
|
||||
// TODO: 实现获取资源总数
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.news.category.ResourceCategoryService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResourceCategory;
|
||||
|
||||
/**
|
||||
* @description 资源分类控制器
|
||||
* @filename ResourceCategoryController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/category")
|
||||
public class ResourceCategoryController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceCategoryController.class);
|
||||
|
||||
@Autowired
|
||||
private ResourceCategoryService resourceCategoryService;
|
||||
|
||||
/**
|
||||
* 获取分类列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbResourceCategory> getCategoryList(TbResourceCategory filter) {
|
||||
return null;
|
||||
// return resourceCategoryService.getCategoryList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取分类详情
|
||||
*/
|
||||
@GetMapping("/{categoryID}")
|
||||
public ResultDomain<TbResourceCategory> getCategoryById(@PathVariable String categoryID) {
|
||||
return resourceCategoryService.getCategoryById(categoryID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建分类
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
public ResultDomain<TbResourceCategory> createCategory(@RequestBody TbResourceCategory category) {
|
||||
return resourceCategoryService.createCategory(category);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新分类
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public ResultDomain<TbResourceCategory> updateCategory(@RequestBody TbResourceCategory category) {
|
||||
return resourceCategoryService.updateCategory(category);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分类
|
||||
*/
|
||||
@DeleteMapping("/{categoryID}")
|
||||
public ResultDomain<Boolean> deleteCategory(@PathVariable String categoryID) {
|
||||
return resourceCategoryService.deleteCategory(categoryID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新分类状态
|
||||
*/
|
||||
@PutMapping("/{categoryID}/status")
|
||||
public ResultDomain<TbResourceCategory> updateCategoryStatus(@PathVariable String categoryID, @RequestParam Integer status) {
|
||||
return null;
|
||||
// return resourceCategoryService.updateCategoryStatus(categoryID, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类树
|
||||
*/
|
||||
@GetMapping("/tree")
|
||||
public ResultDomain<TbResourceCategory> getCategoryTree() {
|
||||
return resourceCategoryService.getCategoryTree();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取子分类
|
||||
*/
|
||||
@GetMapping("/{parentID}/children")
|
||||
public ResultDomain<TbResourceCategory> getChildCategories(@PathVariable String parentID) {
|
||||
return null;
|
||||
// return resourceCategoryService.getChildCategories(parentID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,266 @@
|
||||
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.TbResourceCategory;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description 资源中心控制器
|
||||
* @filename ResourceCenterController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/resource-center")
|
||||
public class ResourceCenterController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceCenterController.class);
|
||||
|
||||
// ==================== 专项分栏管理 ====================
|
||||
|
||||
/**
|
||||
* 获取专项分栏列表
|
||||
*/
|
||||
@GetMapping("/categories")
|
||||
public ResultDomain<TbResourceCategory> getSpecialCategories() {
|
||||
// TODO: 实现获取专项分栏(包含党史学习、领导讲话、政策解读、红色经典、专题报告、思政案例6个分栏)
|
||||
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/{categoryID}/resources")
|
||||
public ResultDomain<TbResource> getResourcesByCategory(
|
||||
@PathVariable String categoryID,
|
||||
@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 categoryID,
|
||||
@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;
|
||||
}
|
||||
|
||||
// ==================== 资源分类管理 ====================
|
||||
|
||||
/**
|
||||
* 获取所有资源分类
|
||||
*/
|
||||
@GetMapping("/categories/all")
|
||||
public ResultDomain<TbResourceCategory> getAllCategories() {
|
||||
// TODO: 实现获取所有资源分类
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.news.resource.ResourceService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResource;
|
||||
|
||||
/**
|
||||
* @description 资源控制器
|
||||
* @filename ResourceController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/resource")
|
||||
public class ResourceController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceController.class);
|
||||
|
||||
@Autowired
|
||||
private ResourceService resourceService;
|
||||
|
||||
/**
|
||||
* 获取资源列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbResource> getResourceList(TbResource filter) {
|
||||
return resourceService.getResourceList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取资源详情
|
||||
*/
|
||||
@GetMapping("/{resourceID}")
|
||||
public ResultDomain<TbResource> getResourceById(@PathVariable String resourceID) {
|
||||
return resourceService.getResourceById(resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建资源
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
public ResultDomain<TbResource> createResource(@RequestBody TbResource resource) {
|
||||
return resourceService.createResource(resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新资源
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public ResultDomain<TbResource> updateResource(@RequestBody TbResource resource) {
|
||||
return resourceService.updateResource(resource);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资源
|
||||
*/
|
||||
@DeleteMapping("/{resourceID}")
|
||||
public ResultDomain<Boolean> deleteResource(@PathVariable String resourceID) {
|
||||
return resourceService.deleteResource(resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新资源状态
|
||||
*/
|
||||
@PutMapping("/{resourceID}/status")
|
||||
public ResultDomain<TbResource> updateResourceStatus(
|
||||
@PathVariable String resourceID,
|
||||
@RequestParam Integer status) {
|
||||
return resourceService.updateResourceStatus(resourceID, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布资源
|
||||
*/
|
||||
@PostMapping("/{resourceID}/publish")
|
||||
public ResultDomain<TbResource> publishResource(@PathVariable String resourceID) {
|
||||
return resourceService.publishResource(resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下架资源
|
||||
*/
|
||||
@PostMapping("/{resourceID}/unpublish")
|
||||
public ResultDomain<TbResource> unpublishResource(@PathVariable String resourceID) {
|
||||
return resourceService.unpublishResource(resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加浏览次数
|
||||
*/
|
||||
@PostMapping("/{resourceID}/view")
|
||||
public ResultDomain<TbResource> incrementViewCount(@PathVariable String resourceID) {
|
||||
return resourceService.incrementViewCount(resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加点赞次数
|
||||
*/
|
||||
@PostMapping("/{resourceID}/like")
|
||||
public ResultDomain<TbResource> incrementLikeCount(@PathVariable String resourceID) {
|
||||
return resourceService.incrementLikeCount(resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加收藏次数
|
||||
*/
|
||||
@PostMapping("/{resourceID}/collect")
|
||||
public ResultDomain<TbResource> incrementCollectCount(@PathVariable String resourceID) {
|
||||
return resourceService.incrementCollectCount(resourceID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置资源推荐
|
||||
*/
|
||||
@PutMapping("/{resourceID}/recommend")
|
||||
public ResultDomain<TbResource> setResourceRecommend(
|
||||
@PathVariable String resourceID,
|
||||
@RequestParam Boolean isRecommend) {
|
||||
return resourceService.setResourceRecommend(resourceID, isRecommend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置资源轮播
|
||||
*/
|
||||
@PutMapping("/{resourceID}/banner")
|
||||
public ResultDomain<TbResource> setResourceBanner(
|
||||
@PathVariable String resourceID,
|
||||
@RequestParam Boolean isBanner) {
|
||||
return resourceService.setResourceBanner(resourceID, isBanner);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取推荐资源列表
|
||||
*/
|
||||
@GetMapping("/recommend")
|
||||
public ResultDomain<TbResource> getRecommendResources(@RequestParam(required = false) Integer limit) {
|
||||
return resourceService.getRecommendResources(limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取轮播资源列表
|
||||
*/
|
||||
@GetMapping("/banner")
|
||||
public ResultDomain<TbResource> getBannerResources(@RequestParam(required = false) Integer limit) {
|
||||
return resourceService.getBannerResources(limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索资源
|
||||
*/
|
||||
@GetMapping("/search")
|
||||
public ResultDomain<TbResource> searchResources(
|
||||
@RequestParam String keyword,
|
||||
@RequestParam(required = false) String categoryID,
|
||||
@RequestParam(required = false) Integer status) {
|
||||
return resourceService.searchResources(keyword, categoryID, status);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,253 @@
|
||||
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.TbDataCollectionConfig;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @description 资源管理控制器
|
||||
* @filename ResourceManagementController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/management")
|
||||
public class ResourceManagementController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceManagementController.class);
|
||||
|
||||
// ==================== 数据采集管理 ====================
|
||||
|
||||
/**
|
||||
* 配置采集来源
|
||||
*/
|
||||
@PostMapping("/collection/config-source")
|
||||
public ResultDomain<TbDataCollectionConfig> configCollectionSource(@RequestBody Map<String, Object> configData) {
|
||||
// TODO: 实现配置采集来源
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置采集频率
|
||||
*/
|
||||
@PutMapping("/collection/frequency")
|
||||
public ResultDomain<Boolean> setCollectionFrequency(@RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现设置采集频率(天/周)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动触发采集
|
||||
*/
|
||||
@PostMapping("/collection/manual-trigger")
|
||||
public ResultDomain<Boolean> manualTriggerCollection(@RequestParam String configID) {
|
||||
// TODO: 实现手动触发采集
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采集配置列表
|
||||
*/
|
||||
@GetMapping("/collection/config-list")
|
||||
public ResultDomain<TbDataCollectionConfig> getCollectionConfigList() {
|
||||
// TODO: 实现获取采集配置列表
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新采集配置
|
||||
*/
|
||||
@PutMapping("/collection/config-update")
|
||||
public ResultDomain<TbDataCollectionConfig> updateCollectionConfig(@RequestBody TbDataCollectionConfig config) {
|
||||
// TODO: 实现更新采集配置
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采集配置
|
||||
*/
|
||||
@DeleteMapping("/collection/config/{configID}")
|
||||
public ResultDomain<Boolean> deleteCollectionConfig(@PathVariable String configID) {
|
||||
// TODO: 实现删除采集配置
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 文章编辑管理 ====================
|
||||
|
||||
/**
|
||||
* 手动新建文章
|
||||
*/
|
||||
@PostMapping("/article/create")
|
||||
public ResultDomain<TbResource> createArticle(@RequestBody Map<String, Object> articleData) {
|
||||
// TODO: 实现手动新建文章(富文本编辑器,插入图片/链接)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑文章内容
|
||||
*/
|
||||
@PutMapping("/article/edit")
|
||||
public ResultDomain<TbResource> editArticle(@RequestBody TbResource article) {
|
||||
// TODO: 实现编辑文章内容
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章
|
||||
*/
|
||||
@DeleteMapping("/article/{articleID}")
|
||||
public ResultDomain<Boolean> deleteArticle(@PathVariable String articleID) {
|
||||
// TODO: 实现删除文章
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置文章状态
|
||||
*/
|
||||
@PutMapping("/article/status")
|
||||
public ResultDomain<Boolean> setArticleStatus(@RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现设置文章状态(草稿/已发布)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文章图片
|
||||
*/
|
||||
@PostMapping("/article/upload-image")
|
||||
public ResultDomain<String> uploadArticleImage(@RequestParam("file") String file) {
|
||||
// TODO: 实现上传文章图片
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入文章链接
|
||||
*/
|
||||
@PutMapping("/article/insert-link")
|
||||
public ResultDomain<Boolean> insertArticleLink(@RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现插入文章链接
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文章编辑历史
|
||||
*/
|
||||
@GetMapping("/article/edit-history/{articleID}")
|
||||
public ResultDomain<Map<String, Object>> getArticleEditHistory(@PathVariable String articleID) {
|
||||
// TODO: 实现获取文章编辑历史
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 数据记录管理 ====================
|
||||
|
||||
/**
|
||||
* 记录数据采集信息
|
||||
*/
|
||||
@PostMapping("/record/collection")
|
||||
public ResultDomain<Boolean> recordCollectionData(@RequestBody Map<String, Object> recordData) {
|
||||
// TODO: 实现记录数据采集时间、采集数量、采集状态
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录文章发布信息
|
||||
*/
|
||||
@PostMapping("/record/publish")
|
||||
public ResultDomain<Boolean> recordPublishData(@RequestBody Map<String, Object> publishData) {
|
||||
// TODO: 实现记录文章发布时间、发布人、修改记录
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采集记录列表
|
||||
*/
|
||||
@GetMapping("/record/collection-list")
|
||||
public ResultDomain<Map<String, Object>> getCollectionRecordList(
|
||||
@RequestParam(required = false) Date startDate,
|
||||
@RequestParam(required = false) Date endDate) {
|
||||
// TODO: 实现获取采集记录列表
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发布记录列表
|
||||
*/
|
||||
@GetMapping("/record/publish-list")
|
||||
public ResultDomain<Map<String, Object>> getPublishRecordList(
|
||||
@RequestParam(required = false) String publisher,
|
||||
@RequestParam(required = false) Date startDate,
|
||||
@RequestParam(required = false) Date endDate) {
|
||||
// TODO: 实现获取发布记录列表
|
||||
return null;
|
||||
}
|
||||
|
||||
// ==================== 自动发布管理 ====================
|
||||
|
||||
/**
|
||||
* 配置文章自动发布时间
|
||||
*/
|
||||
@PutMapping("/auto-publish/schedule")
|
||||
public ResultDomain<Boolean> scheduleAutoPublish(@RequestBody Map<String, Object> scheduleData) {
|
||||
// TODO: 实现配置文章自动发布时间
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置发布前核验规则
|
||||
*/
|
||||
@PutMapping("/auto-publish/verification")
|
||||
public ResultDomain<Boolean> setVerificationRules(@RequestBody Map<String, Object> rules) {
|
||||
// TODO: 实现设置发布前核验规则(如内容审核)
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置通知方式
|
||||
*/
|
||||
@PutMapping("/auto-publish/notification")
|
||||
public ResultDomain<Boolean> configNotification(@RequestBody Map<String, Object> notificationConfig) {
|
||||
// TODO: 实现设置通知方式(邮件/站内信)、提醒格式
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启/关闭自动发布
|
||||
*/
|
||||
@PutMapping("/auto-publish/toggle")
|
||||
public ResultDomain<Boolean> toggleAutoPublish(@RequestBody Map<String, Object> params) {
|
||||
// TODO: 实现支持关闭自动发布
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自动发布配置
|
||||
*/
|
||||
@GetMapping("/auto-publish/config")
|
||||
public ResultDomain<Map<String, Object>> getAutoPublishConfig() {
|
||||
// TODO: 实现获取自动发布配置
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自动发布任务列表
|
||||
*/
|
||||
@GetMapping("/auto-publish/task-list")
|
||||
public ResultDomain<Map<String, Object>> getAutoPublishTaskList() {
|
||||
// TODO: 实现获取自动发布任务列表
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动执行自动发布任务
|
||||
*/
|
||||
@PostMapping("/auto-publish/execute")
|
||||
public ResultDomain<Boolean> executeAutoPublishTask(@RequestParam String taskID) {
|
||||
// TODO: 实现手动执行自动发布任务
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.news.recommend.ResourceRecommendService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResourceRecommend;
|
||||
|
||||
/**
|
||||
* @description 资源推荐控制器
|
||||
* @filename ResourceRecommendController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/recommend")
|
||||
public class ResourceRecommendController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(ResourceRecommendController.class);
|
||||
|
||||
@Autowired
|
||||
private ResourceRecommendService resourceRecommendService;
|
||||
|
||||
/**
|
||||
* 获取推荐列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbResourceRecommend> getRecommendList(TbResourceRecommend filter) {
|
||||
return null;
|
||||
// return resourceRecommendService.getRecommendList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取推荐详情
|
||||
*/
|
||||
@GetMapping("/{recommendID}")
|
||||
public ResultDomain<TbResourceRecommend> getRecommendById(@PathVariable String recommendID) {
|
||||
return null;
|
||||
// return resourceRecommendService.getRecommendById(recommendID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建推荐
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
public ResultDomain<TbResourceRecommend> createRecommend(@RequestBody TbResourceRecommend recommend) {
|
||||
return null;
|
||||
// return resourceRecommendService.createRecommend(recommend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新推荐
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public ResultDomain<TbResourceRecommend> updateRecommend(@RequestBody TbResourceRecommend recommend) {
|
||||
return null;
|
||||
// return resourceRecommendService.updateRecommend(recommend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除推荐
|
||||
*/
|
||||
@DeleteMapping("/{recommendID}")
|
||||
public ResultDomain<Boolean> deleteRecommend(@PathVariable String recommendID) {
|
||||
return null;
|
||||
// return resourceRecommendService.deleteRecommend(recommendID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新推荐状态
|
||||
*/
|
||||
@PutMapping("/{recommendID}/status")
|
||||
public ResultDomain<TbResourceRecommend> updateRecommendStatus(@PathVariable String recommendID, @RequestParam Integer status) {
|
||||
return null;
|
||||
// return resourceRecommendService.updateRecommendStatus(recommendID, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新推荐排序
|
||||
*/
|
||||
@PutMapping("/{recommendID}/order")
|
||||
public ResultDomain<TbResourceRecommend> updateRecommendOrder(@PathVariable String recommendID, @RequestParam Integer orderNum) {
|
||||
return resourceRecommendService.updateRecommendOrder(recommendID, orderNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活跃推荐
|
||||
*/
|
||||
@GetMapping("/active")
|
||||
public ResultDomain<TbResourceRecommend> getActiveRecommends(@RequestParam(required = false) Integer limit) {
|
||||
return null;
|
||||
// return resourceRecommendService.getActiveRecommends(limit);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package org.xyzh.news.controller;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.xyzh.api.news.tag.TagService;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbTag;
|
||||
|
||||
/**
|
||||
* @description 标签控制器
|
||||
* @filename TagController.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/news/tag")
|
||||
public class TagController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(TagController.class);
|
||||
|
||||
@Autowired
|
||||
private TagService tagService;
|
||||
|
||||
/**
|
||||
* 获取标签列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbTag> getTagList(TbTag filter) {
|
||||
return null;
|
||||
// return tagService.getTagList(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID获取标签详情
|
||||
*/
|
||||
@GetMapping("/{tagID}")
|
||||
public ResultDomain<TbTag> getTagById(@PathVariable String tagID) {
|
||||
return tagService.getTagById(tagID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建标签
|
||||
*/
|
||||
@PostMapping("/create")
|
||||
public ResultDomain<TbTag> createTag(@RequestBody TbTag tag) {
|
||||
return tagService.createTag(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新标签
|
||||
*/
|
||||
@PutMapping("/update")
|
||||
public ResultDomain<TbTag> updateTag(@RequestBody TbTag tag) {
|
||||
return tagService.updateTag(tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除标签
|
||||
*/
|
||||
@DeleteMapping("/{tagID}")
|
||||
public ResultDomain<Boolean> deleteTag(@PathVariable String tagID) {
|
||||
return tagService.deleteTag(tagID);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新标签状态
|
||||
*/
|
||||
@PutMapping("/{tagID}/status")
|
||||
public ResultDomain<TbTag> updateTagStatus(@PathVariable String tagID, @RequestParam Integer status) {
|
||||
return null;
|
||||
// return tagService.updateTagStatus(tagID, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取热门标签
|
||||
*/
|
||||
@GetMapping("/hot")
|
||||
public ResultDomain<TbTag> getHotTags(@RequestParam(required = false) Integer limit) {
|
||||
return null;
|
||||
// return tagService.getHotTags(limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索标签
|
||||
*/
|
||||
@GetMapping("/search")
|
||||
public ResultDomain<TbTag> searchTags(@RequestParam String keyword) {
|
||||
return null;
|
||||
// return tagService.searchTags(keyword);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.news.service;
|
||||
|
||||
import org.xyzh.api.news.banner.BannerService;
|
||||
|
||||
/**
|
||||
* @description 横幅服务接口
|
||||
* @filename NCBannerService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface NCBannerService extends BannerService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.news.service;
|
||||
|
||||
import org.xyzh.api.news.collection.DataCollectionService;
|
||||
|
||||
/**
|
||||
* @description 数据采集服务接口
|
||||
* @filename NCDataCollectionService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface NCDataCollectionService extends DataCollectionService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.news.service;
|
||||
|
||||
import org.xyzh.api.news.category.ResourceCategoryService;
|
||||
|
||||
/**
|
||||
* @description 资源分类服务接口
|
||||
* @filename NCResourceCategoryService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface NCResourceCategoryService extends ResourceCategoryService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.news.service;
|
||||
|
||||
import org.xyzh.api.news.recommend.ResourceRecommendService;
|
||||
|
||||
/**
|
||||
* @description 资源推荐服务接口
|
||||
* @filename NCResourceRecommendService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface NCResourceRecommendService extends ResourceRecommendService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.news.service;
|
||||
|
||||
import org.xyzh.api.news.resource.ResourceService;
|
||||
|
||||
/**
|
||||
* @description 资源服务接口
|
||||
* @filename NCResourceService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface NCResourceService extends ResourceService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.xyzh.news.service;
|
||||
|
||||
import org.xyzh.api.news.tag.TagService;
|
||||
|
||||
/**
|
||||
* @description 标签服务接口
|
||||
* @filename NCTagService.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
public interface NCTagService extends TagService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package org.xyzh.news.service.impl;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbBanner;
|
||||
import org.xyzh.news.mapper.BannerMapper;
|
||||
import org.xyzh.api.news.banner.BannerService;
|
||||
|
||||
/**
|
||||
* @description 横幅服务实现类
|
||||
* @filename NCBannerServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class NCBannerServiceImpl implements BannerService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NCBannerServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private BannerMapper bannerMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> batchUpdateBannerOrder(Map<String, Integer> bannerOrders) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbBanner> createBanner(TbBanner banner) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> deleteBanner(String bannerID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbBanner> getActiveBanners(Integer limit) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbBanner> getBannerById(String bannerID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbBanner> getBannerList(Integer status) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbBanner> updateBanner(TbBanner banner) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbBanner> updateBannerOrder(String bannerID, Integer orderNum) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbBanner> updateBannerStatus(String bannerID, Integer status) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package org.xyzh.news.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionConfig;
|
||||
import org.xyzh.common.dto.resource.TbDataCollectionLog;
|
||||
import org.xyzh.news.mapper.DataCollectionConfigMapper;
|
||||
import org.xyzh.news.mapper.DataCollectionLogMapper;
|
||||
import org.xyzh.api.news.collection.DataCollectionService;
|
||||
|
||||
/**
|
||||
* @description 数据采集服务实现类
|
||||
* @filename NCDataCollectionServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class NCDataCollectionServiceImpl implements DataCollectionService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NCDataCollectionServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private DataCollectionConfigMapper dataCollectionConfigMapper;
|
||||
|
||||
@Autowired
|
||||
private DataCollectionLogMapper dataCollectionLogMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> batchExecuteCollection(List<String> configIDs) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> createConfig(TbDataCollectionConfig config) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> createLog(TbDataCollectionLog log) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> deleteConfig(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> executeCollection(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<String> getCollectionStatus(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> getConfigById(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> getConfigList(Integer status) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> getConfigStatistics(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> getLogById(String logID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionLog> getLogList(String configID, Date startDate, Date endDate) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> stopCollection(String configID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> updateConfig(TbDataCollectionConfig config) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> updateConfigStatus(String configID, Integer status) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbDataCollectionConfig> updateLastCollectTime(String configID, Date lastCollectTime) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package org.xyzh.news.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResourceCategory;
|
||||
import org.xyzh.news.mapper.ResourceCategoryMapper;
|
||||
import org.xyzh.api.news.category.ResourceCategoryService;
|
||||
|
||||
/**
|
||||
* @description 资源分类服务实现类
|
||||
* @filename NCResourceCategoryServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class NCResourceCategoryServiceImpl implements ResourceCategoryService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NCResourceCategoryServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private ResourceCategoryMapper resourceCategoryMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceCategory> createCategory(TbResourceCategory category) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> deleteCategory(String categoryID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceCategory> getAllCategories() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceCategory> getCategoriesByParent(String parentID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceCategory> getCategoryById(String categoryID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceCategory> getCategoryTree() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> hasChildCategories(String categoryID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> hasResources(String categoryID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceCategory> updateCategory(TbResourceCategory category) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceCategory> updateCategoryOrder(String categoryID, Integer orderNum) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package org.xyzh.news.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResourceRecommend;
|
||||
import org.xyzh.news.mapper.ResourceRecommendMapper;
|
||||
import org.xyzh.api.news.recommend.ResourceRecommendService;
|
||||
|
||||
/**
|
||||
* @description 资源推荐服务实现类
|
||||
* @filename NCResourceRecommendServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class NCResourceRecommendServiceImpl implements ResourceRecommendService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NCResourceRecommendServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private ResourceRecommendMapper resourceRecommendMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceRecommend> addRecommend(TbResourceRecommend recommend) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceRecommend> batchAddRecommends(List<String> resourceIDs, String reason) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> batchRemoveRecommends(List<String> resourceIDs) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceRecommend> getRecommendDetail(String resourceID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceRecommend> getRecommendList() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> isResourceRecommended(String resourceID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> removeRecommend(String resourceID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceRecommend> updateRecommendOrder(String resourceID, Integer orderNum) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceRecommend> updateRecommendReason(String resourceID, String reason) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package org.xyzh.news.service.impl;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResource;
|
||||
import org.xyzh.news.mapper.ResourceMapper;
|
||||
import org.xyzh.api.news.resource.ResourceService;
|
||||
|
||||
/**
|
||||
* @description 资源服务实现类
|
||||
* @filename NCResourceServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class NCResourceServiceImpl implements ResourceService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NCResourceServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private ResourceMapper resourceMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> getResourceList(TbResource filter) {
|
||||
// TODO: 实现获取资源列表
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> getResourceById(String resourceID) {
|
||||
// TODO: 实现根据ID获取资源详情
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> createResource(TbResource resource) {
|
||||
// TODO: 实现创建资源
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> updateResource(TbResource resource) {
|
||||
// TODO: 实现更新资源
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> deleteResource(String resourceID) {
|
||||
// TODO: 实现删除资源
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> updateResourceStatus(String resourceID, Integer status) {
|
||||
// TODO: 实现更新资源状态
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> publishResource(String resourceID) {
|
||||
// TODO: 实现发布资源
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> unpublishResource(String resourceID) {
|
||||
// TODO: 实现下架资源
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> incrementViewCount(String resourceID) {
|
||||
// TODO: 实现增加浏览次数
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> incrementLikeCount(String resourceID) {
|
||||
// TODO: 实现增加点赞次数
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> incrementCollectCount(String resourceID) {
|
||||
// TODO: 实现增加收藏次数
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> setResourceRecommend(String resourceID, Boolean isRecommend) {
|
||||
// TODO: 实现设置资源推荐
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> setResourceBanner(String resourceID, Boolean isBanner) {
|
||||
// TODO: 实现设置资源轮播
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> getRecommendResources(Integer limit) {
|
||||
// TODO: 实现获取推荐资源列表
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> getBannerResources(Integer limit) {
|
||||
// TODO: 实现获取轮播资源列表
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResource> searchResources(String keyword, String categoryID, Integer status) {
|
||||
// TODO: 实现搜索资源
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package org.xyzh.news.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.dto.resource.TbResourceTag;
|
||||
import org.xyzh.common.dto.resource.TbTag;
|
||||
import org.xyzh.news.mapper.TagMapper;
|
||||
import org.xyzh.api.news.tag.TagService;
|
||||
|
||||
/**
|
||||
* @description 标签服务实现类
|
||||
* @filename NCTagServiceImpl.java
|
||||
* @author system
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-15
|
||||
*/
|
||||
@Service
|
||||
public class NCTagServiceImpl implements TagService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(NCTagServiceImpl.class);
|
||||
|
||||
@Autowired
|
||||
private TagMapper tagMapper;
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceTag> addResourceTag(String resourceID, String tagID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbResourceTag> batchAddResourceTags(String resourceID, List<String> tagIDs) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> clearResourceTags(String resourceID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbTag> createTag(TbTag tag) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> deleteTag(String tagID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbTag> getAllTags() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbTag> getResourceTags(String resourceID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<String> getResourcesByTag(String tagID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbTag> getTagById(String tagID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<Boolean> removeResourceTag(String resourceID, String tagID) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbTag> searchTagsByName(String name) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbTag> updateTag(TbTag tag) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user