From ce4169ce1051a6aba5d07e17fcc90053fd3d3e55 Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Thu, 29 Sep 2022 11:21:53 +0800 Subject: [PATCH] =?UTF-8?q?AI=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1=EF=BC=8C=E4=BF=9D=E8=AF=81=E6=95=B0=E6=8D=AE=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/web/controller/api/AppController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 index ba5ee41..562c73a 100644 --- 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 @@ -28,6 +28,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import sun.misc.BASE64Encoder; @@ -415,6 +416,7 @@ public class AppController extends BaseController @PostMapping("/ai/{recordId}") @ApiOperation("ai接口") @Log(title = "调用ai接口", businessType = BusinessType.OTHER) + @Transactional public AjaxResult aiPost(@PathVariable("recordId") Long recordId, @RequestBody AiPostReq aiPostReq) { //删除同一次预约调用多次ai接口的图片数据 @@ -443,7 +445,6 @@ public class AppController extends BaseController } catch (Exception e) { - throw new ServiceException(e.getMessage()); } if (!StringUtils.isEmpty(result))