AI接口新增入参

master
gongzhenkun 2 years ago
parent 429ee67e12
commit 5a526c1018

@ -418,6 +418,7 @@ public class AppController extends BaseController
public AjaxResult aiPost(@PathVariable("recordId") Long recordId, @RequestBody AiPostReq aiPostReq) public AjaxResult aiPost(@PathVariable("recordId") Long recordId, @RequestBody AiPostReq aiPostReq)
{ {
//删除同一次预约调用多次ai接口的图片数据 //删除同一次预约调用多次ai接口的图片数据
logger.info("aiPost param is {}", aiPostReq);
imageService.deleteTImageByThirdId(recordId); imageService.deleteTImageByThirdId(recordId);
saveImage(aiPostReq,recordId); saveImage(aiPostReq,recordId);
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
@ -433,6 +434,10 @@ public class AppController extends BaseController
try try
{ {
start = new Date(); 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))); result = HttpUtils.sendPost(URL, mapper.writeValueAsString(delNullData(aiPostReq)));
end = new Date(); end = new Date();
} }

@ -2,14 +2,23 @@ package com.ruoyi.system.domain.req;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import java.util.List;
@ApiModel(value = "AiPostReq", description = "AI接口请求实体") @ApiModel(value = "AiPostReq", description = "AI接口请求实体")
public class AiPostReq public class AiPostReq
{ {
private Base64ResizedRmgSm base64_resized_img_sm; private Base64ResizedRmgSm base64_resized_img_sm;
private Base64ResizedRmgSm base64_resized_img_sx; 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() public Base64ResizedRmgSm getBase64_resized_img_sm()
{ {
return base64_resized_img_sm; return base64_resized_img_sm;
@ -36,6 +45,7 @@ public class AiPostReq
return "{" + return "{" +
"base64_resized_img_sm=" + base64_resized_img_sm + "base64_resized_img_sm=" + base64_resized_img_sm +
", base64_resized_img_sx=" + base64_resized_img_sx + ", base64_resized_img_sx=" + base64_resized_img_sx +
", usr=" + usr +
'}'; '}';
} }
} }

@ -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 +
'}';
}
}
Loading…
Cancel
Save