From 496e6f69686ac589ee77812e7224fa1af8f17c2f Mon Sep 17 00:00:00 2001 From: zhangcl Date: Mon, 8 Aug 2022 15:54:32 +0800 Subject: [PATCH] api --- .../web/controller/api/AppController.java | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java new file mode 100644 index 0000000..0840a09 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -0,0 +1,46 @@ +package com.ruoyi.web.controller.api; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.system.domain.TRecord; +import com.ruoyi.system.service.ITRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author zhangcl + * @date 2022/8/5 17:42 + */ +@Api("app接口") +@RestController +@RequestMapping("/api/app") +public class AppController extends BaseController +{ + @Autowired + private ITRecordService tRecordService; + + + /** + * 完成AI诊断 + */ + @ApiOperation("完成AI诊断") + @GetMapping("/ai/finish") + public AjaxResult finish(Long id) + { + TRecord record= tRecordService.selectTRecordById(id); + if(record!=null) + { + record.setStatus("1"); + } + return toAjax(tRecordService.updateTRecord(record)); + + } +}