AlbumYelpController.java 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package com.redxun.knowledge.album.controller;
  2. import com.redxun.common.annotation.ClassDefine;
  3. import com.redxun.common.base.db.BaseService;
  4. import com.redxun.common.base.entity.JsonResult;
  5. import com.redxun.knowledge.album.entity.dao.AlbumYelp;
  6. import com.redxun.knowledge.album.entity.vo.AlbumYelpInfoVo;
  7. import com.redxun.knowledge.album.service.AlbumYelpServiceImpl;
  8. import com.redxun.web.controller.BaseController;
  9. import io.swagger.annotations.Api;
  10. import io.swagger.annotations.ApiOperation;
  11. import lombok.extern.slf4j.Slf4j;
  12. import org.springframework.beans.factory.annotation.Autowired;
  13. import org.springframework.web.bind.annotation.GetMapping;
  14. import org.springframework.web.bind.annotation.RequestMapping;
  15. import org.springframework.web.bind.annotation.RequestParam;
  16. import org.springframework.web.bind.annotation.RestController;
  17. @Slf4j
  18. @RestController
  19. @RequestMapping("/api-knowledge/album/yelp")
  20. @Api(tags = "业务--专辑点评表")
  21. @ClassDefine(title = "业务--专辑点评表", alias = "AlbumYelpController", path = "/api-knowledge/album/yelp", packages = "album", packageName = "子系统名称")
  22. public class AlbumYelpController extends BaseController<AlbumYelp> {
  23. @Autowired
  24. AlbumYelpServiceImpl albumYelpService;
  25. @Override
  26. public BaseService getBaseService() {
  27. return albumYelpService;
  28. }
  29. @Override
  30. public String getComment() {
  31. return "业务--专辑点评表";
  32. }
  33. @ApiOperation("获取当前登陆人待审核的点评数量")
  34. @GetMapping("total")
  35. public JsonResult total(){
  36. JsonResult jsonResult = JsonResult.getSuccessResult("");
  37. Long total = albumYelpService.total();
  38. return jsonResult.setData(total);
  39. }
  40. @ApiOperation("根据点评ID获取点评审核信息数据")
  41. @GetMapping("info")
  42. public JsonResult info(@RequestParam("pkId") String pkId){
  43. JsonResult jsonResult = JsonResult.getSuccessResult("");
  44. AlbumYelpInfoVo albumYelpInfo = albumYelpService.info(pkId);
  45. return jsonResult.setData(albumYelpInfo);
  46. }
  47. }