You've already forked FrameTour-BE
模板添加两个参数
This commit is contained in:
@ -19,6 +19,8 @@ import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -28,6 +30,7 @@ import java.util.List;
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/12/5 10:22
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/scenic/v1")
|
||||
@Api(tags = "景区相关接口")
|
||||
@ -71,9 +74,14 @@ public class AppScenicController {
|
||||
|
||||
@ApiOperation("景区视频源素材列表")
|
||||
@GetMapping("/face/{faceId}/contentList")
|
||||
public ApiResponse<List<ContentPageVO>> contentList(@PathVariable Long faceId) {
|
||||
public ApiResponse<List<ContentPageVO>> contentList(@PathVariable String faceId) {
|
||||
if (!StringUtils.isNumeric(faceId)) {
|
||||
log.error("请求异常, faceId: [{}]",faceId);
|
||||
return ApiResponse.fail("请求异常");
|
||||
}
|
||||
Long id = Long.parseLong(faceId);
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
List<ContentPageVO> contentPageVOS = appScenicService.faceContentList(worker.getUserId(), faceId);
|
||||
List<ContentPageVO> contentPageVOS = appScenicService.faceContentList(worker.getUserId(), id);
|
||||
return ApiResponse.success(contentPageVOS);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user