|
|
@ -4,9 +4,11 @@ import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.jeecg.common.api.vo.Result; |
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
|
|
import org.jeecg.common.constant.YaoDuCacheConstant; |
|
|
import org.jeecg.modules.api.bean.PageBean; |
|
|
import org.jeecg.modules.api.bean.PageBean; |
|
|
import org.jeecg.modules.api.service.WebApiService; |
|
|
import org.jeecg.modules.api.service.WebApiService; |
|
|
import org.jeecg.modules.api.service.YaoDuApiService; |
|
|
import org.jeecg.modules.api.service.YaoDuApiService; |
|
|
|
|
|
import org.springframework.cache.annotation.Cacheable; |
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
import org.springframework.web.bind.annotation.RequestHeader; |
|
|
import org.springframework.web.bind.annotation.RequestHeader; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
@ -43,6 +45,7 @@ public class YaoDuApiController { |
|
|
//获取首页头部信息 |
|
|
//获取首页头部信息 |
|
|
@ApiOperation(value="获取首页头部信息") |
|
|
@ApiOperation(value="获取首页头部信息") |
|
|
@GetMapping(value = "/getIndexHeaderInfo") |
|
|
@GetMapping(value = "/getIndexHeaderInfo") |
|
|
|
|
|
@Cacheable(value = YaoDuCacheConstant.YAODU_INDEX_HEADER_CACHE) |
|
|
public Result<?> getIndexHeaderInfo() { |
|
|
public Result<?> getIndexHeaderInfo() { |
|
|
return yaoDuApiService.getIndexHeaderInfo(); |
|
|
return yaoDuApiService.getIndexHeaderInfo(); |
|
|
} |
|
|
} |
|
|
@ -67,6 +70,7 @@ public class YaoDuApiController { |
|
|
//根据分类获取动态帖子列表带分页 |
|
|
//根据分类获取动态帖子列表带分页 |
|
|
@ApiOperation(value="根据分类获取动态帖子列表带分页") |
|
|
@ApiOperation(value="根据分类获取动态帖子列表带分页") |
|
|
@GetMapping(value = "/getPostPage") |
|
|
@GetMapping(value = "/getPostPage") |
|
|
|
|
|
@Cacheable(value = YaoDuCacheConstant.YAODU_POST_PAGE_CACHE, key = "#classId + '_' + #pageBean.pageNo + '_' + #pageBean.pageSize") |
|
|
public Result<?> getPostPage(String classId,PageBean pageBean) { |
|
|
public Result<?> getPostPage(String classId,PageBean pageBean) { |
|
|
return yaoDuApiService.getPostPage(classId,pageBean); |
|
|
return yaoDuApiService.getPostPage(classId,pageBean); |
|
|
} |
|
|
} |
|
|
@ -146,6 +150,7 @@ public class YaoDuApiController { |
|
|
//发布按钮列表 |
|
|
//发布按钮列表 |
|
|
@ApiOperation(value="发布按钮列表") |
|
|
@ApiOperation(value="发布按钮列表") |
|
|
@GetMapping(value = "/getPublishList") |
|
|
@GetMapping(value = "/getPublishList") |
|
|
|
|
|
@Cacheable(value = YaoDuCacheConstant.YAODU_PUBLISH_LIST_CACHE) |
|
|
public Result<?> getPublishList() { |
|
|
public Result<?> getPublishList() { |
|
|
return yaoDuApiService.getPublishButtonList(); |
|
|
return yaoDuApiService.getPublishButtonList(); |
|
|
} |
|
|
} |
|
|
|