1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- package com.redxun.knowledge.album.controller;
- import com.redxun.common.annotation.ClassDefine;
- import com.redxun.common.base.db.BaseService;
- import com.redxun.common.base.entity.JsonResult;
- import com.redxun.knowledge.album.entity.dao.AlbumYelp;
- import com.redxun.knowledge.album.entity.vo.AlbumYelpInfoVo;
- import com.redxun.knowledge.album.entity.vo.AlbumYelpListPcVo;
- import com.redxun.knowledge.album.service.AlbumYelpServiceImpl;
- import com.redxun.web.controller.BaseController;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.List;
- @Slf4j
- @RestController
- @RequestMapping("/api-knowledge/album/yelp")
- @Api(tags = "业务--专辑点评表")
- @ClassDefine(title = "业务--专辑点评表", alias = "AlbumYelpController", path = "/api-knowledge/album/yelp", packages = "album", packageName = "子系统名称")
- public class AlbumYelpController extends BaseController<AlbumYelp> {
- @Autowired
- AlbumYelpServiceImpl albumYelpService;
- @Override
- public BaseService getBaseService() {
- return albumYelpService;
- }
- @Override
- public String getComment() {
- return "业务--专辑点评表";
- }
- @ApiOperation("获取当前登陆人待审核的点评数量")
- @GetMapping("total")
- public JsonResult total(){
- JsonResult jsonResult = JsonResult.getSuccessResult("");
- Long total = albumYelpService.total();
- return jsonResult.setData(total);
- }
- @ApiOperation("根据点评ID获取点评审核信息数据")
- @GetMapping("info")
- public JsonResult info(@RequestParam("pkId") String pkId){
- JsonResult jsonResult = JsonResult.getSuccessResult("");
- AlbumYelpInfoVo albumYelpInfo = albumYelpService.info(pkId);
- return jsonResult.setData(albumYelpInfo);
- }
- @ApiOperation("根据知识专辑ID获取点评信息列表")
- @GetMapping("list")
- public JsonResult list(@RequestParam("albumId") String albumId){
- JsonResult jsonResult = JsonResult.getSuccessResult("");
- List<AlbumYelpListPcVo> albumYelpListPcVo = albumYelpService.listAll(albumId);
- return jsonResult.setData(albumYelpListPcVo);
- }
- }
|