|
@@ -3,7 +3,9 @@ package cn.efunbox.audio.controller.res;
|
|
|
import cn.efunbox.audio.entity.res.ResAlbum;
|
|
|
import cn.efunbox.audio.page.ResOnePage;
|
|
|
import cn.efunbox.audio.service.res.ResAlbumService;
|
|
|
+import cn.efunbox.audio.utils.ResApiCode;
|
|
|
import cn.efunbox.audio.utils.ResApiResult;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -12,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping
|
|
|
+@Slf4j
|
|
|
public class ResAlbumController {
|
|
|
|
|
|
@Autowired
|
|
@@ -20,8 +23,25 @@ public class ResAlbumController {
|
|
|
@RequestMapping(value = "/getTypeContentList")
|
|
|
public ResApiResult<ResOnePage<ResAlbum>> getResCategoryList(@RequestHeader(value = "USERID",required = false) String USERID,
|
|
|
@RequestParam(name="typeId",required = false) String typeId,
|
|
|
- @RequestParam(name="pageNum",required = false) int pageNum,
|
|
|
- @RequestParam(name="pageSize",required = false) int pageSize){
|
|
|
- return resAlbumService.getResAlbumList(typeId,pageNum,pageSize);
|
|
|
+ @RequestParam(name="pageNum",required = false) Integer pageNum,
|
|
|
+ @RequestParam(name="pageSize",required = false) Integer pageSize){
|
|
|
+
|
|
|
+ try {
|
|
|
+ return resAlbumService.getResAlbumList(typeId,pageNum,pageSize);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("getTypeContentList接口异常:{}",e.getMessage());
|
|
|
+ return ResApiResult.error(ResApiCode.UNKNOWN_ERROR);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @RequestMapping(value = "/getContentDetail")
|
|
|
+ public ResApiResult<ResAlbum> getResCategoryList(@RequestHeader(value = "USERID",required = false) String USERID,
|
|
|
+ @RequestParam(name="contentId",required = false) String contentId) {
|
|
|
+ try {
|
|
|
+ return resAlbumService.getResAlbumById(contentId);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("getContentDetail接口异常:{}", e.getMessage());
|
|
|
+ return ResApiResult.error(ResApiCode.UNKNOWN_ERROR);
|
|
|
+ }
|
|
|
}
|
|
|
}
|