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.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; @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 { @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); } }