From 5a526c10180215c56eb98e6b52affacce6462b35 Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Wed, 28 Sep 2022 17:04:40 +0800 Subject: [PATCH] =?UTF-8?q?AI=E6=8E=A5=E5=8F=A3=E6=96=B0=E5=A2=9E=E5=85=A5?= =?UTF-8?q?=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/api/AppController.java | 5 ++ .../ruoyi/system/domain/req/AiPostReq.java | 14 +++- .../java/com/ruoyi/system/domain/req/Usr.java | 70 +++++++++++++++++++ 3 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/req/Usr.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 index 5f1e653..ba5ee41 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 @@ -418,6 +418,7 @@ public class AppController extends BaseController public AjaxResult aiPost(@PathVariable("recordId") Long recordId, @RequestBody AiPostReq aiPostReq) { //删除同一次预约调用多次ai接口的图片数据 + logger.info("aiPost param is {}", aiPostReq); imageService.deleteTImageByThirdId(recordId); saveImage(aiPostReq,recordId); ObjectMapper mapper = new ObjectMapper(); @@ -433,6 +434,10 @@ public class AppController extends BaseController try { start = new Date(); + if (aiPostReq.getUsr() != null) { + aiPostReq.getUsr().setTs_submit_ai(start.getTime()); + } + logger.info("ai param is {}", aiPostReq); result = HttpUtils.sendPost(URL, mapper.writeValueAsString(delNullData(aiPostReq))); end = new Date(); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AiPostReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AiPostReq.java index 28b8b1d..b5f4efe 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AiPostReq.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AiPostReq.java @@ -2,14 +2,23 @@ package com.ruoyi.system.domain.req; import io.swagger.annotations.ApiModel; -import java.util.List; - @ApiModel(value = "AiPostReq", description = "AI接口请求实体") public class AiPostReq { private Base64ResizedRmgSm base64_resized_img_sm; + private Base64ResizedRmgSm base64_resized_img_sx; + private Usr usr; + + public Usr getUsr() { + return usr; + } + + public void setUsr(Usr usr) { + this.usr = usr; + } + public Base64ResizedRmgSm getBase64_resized_img_sm() { return base64_resized_img_sm; @@ -36,6 +45,7 @@ public class AiPostReq return "{" + "base64_resized_img_sm=" + base64_resized_img_sm + ", base64_resized_img_sx=" + base64_resized_img_sx + + ", usr=" + usr + '}'; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/Usr.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/Usr.java new file mode 100644 index 0000000..74354a3 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/Usr.java @@ -0,0 +1,70 @@ +package com.ruoyi.system.domain.req; + +/** + * AI入参 + * + * @author gongzhenkun + * @date 2022/9/28 15:13 + */ +public class Usr { + private String name; + + private String sex; + + private String doctor; + + private Long ts_app_upload; + + private Long ts_submit_ai; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getSex() { + return sex; + } + + public void setSex(String sex) { + this.sex = sex; + } + + public String getDoctor() { + return doctor; + } + + public void setDoctor(String doctor) { + this.doctor = doctor; + } + + public Long getTs_app_upload() { + return ts_app_upload; + } + + public void setTs_app_upload(Long ts_app_upload) { + this.ts_app_upload = ts_app_upload; + } + + public Long getTs_submit_ai() { + return ts_submit_ai; + } + + public void setTs_submit_ai(Long ts_submit_ai) { + this.ts_submit_ai = ts_submit_ai; + } + + @Override + public String toString() { + return "Usr{" + + "name='" + name + '\'' + + ", sex='" + sex + '\'' + + ", doctor='" + doctor + '\'' + + ", ts_app_upload=" + ts_app_upload + + ", ts_submit_ai=" + ts_submit_ai + + '}'; + } +}