模板添加两个参数

This commit is contained in:
2025-02-19 14:36:27 +08:00
parent e87ce424fb
commit 373922bbbf
6 changed files with 21 additions and 16 deletions

View File

@ -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;
* @Authorlongbinbin
* @Date2024/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);
}