|
|
@@ -33,6 +33,7 @@ import cn.iocoder.byzs.module.ai.service.model.AiChatRoleService;
|
|
|
import cn.iocoder.byzs.module.ai.service.model.AiModelService;
|
|
|
import cn.iocoder.byzs.module.ai.service.video.AiVideoService;
|
|
|
import cn.iocoder.byzs.module.ai.service.virtualdevice.VirtualDeviceService;
|
|
|
+import cn.iocoder.byzs.module.web.controller.admin.ai.vo.MapGameVO;
|
|
|
import cn.iocoder.byzs.module.web.controller.admin.ai.vo.WebAiChatRoleVO;
|
|
|
import cn.iocoder.byzs.module.web.service.ai.WebAiServiceImpl;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
@@ -203,11 +204,22 @@ public class WebAiController {
|
|
|
@Operation(summary = "获得AI-blockly地图编程游戏分页")
|
|
|
@PermitAll
|
|
|
@TenantIgnore
|
|
|
- public CommonResult<PageResult<MapGameRespVO>> selectMapGame(@Valid MapGamePageReqVO pageReqVO) {
|
|
|
+ public CommonResult<PageResult<MapGameVO>> selectMapGame(@Valid MapGamePageReqVO pageReqVO) {
|
|
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
|
pageReqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
|
|
|
|
|
PageResult<MapGameDO> pageResult = mapGameService.getMapGamePage(pageReqVO);
|
|
|
- return success(BeanUtils.toBean(pageResult, MapGameRespVO.class));
|
|
|
+ return success(BeanUtils.toBean(pageResult, MapGameVO.class));
|
|
|
+ }
|
|
|
+ @GetMapping("/getMapGameById")
|
|
|
+ @Operation(summary = "获得AI-blockly地图编程游戏详情")
|
|
|
+ @PermitAll
|
|
|
+ @TenantIgnore
|
|
|
+ public CommonResult<MapGameRespVO> getMapGameById(@RequestParam("id") Integer id) {
|
|
|
+ MapGameDO mapGame = mapGameService.getMapGame(id);
|
|
|
+ if (mapGame == null) {
|
|
|
+ return success(null);
|
|
|
+ }
|
|
|
+ return success(BeanUtils.toBean(mapGame, MapGameRespVO.class));
|
|
|
}
|
|
|
}
|