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))