记录app处理图片时长

master
gongzhenkun 2 years ago
parent d2f73da63b
commit 2086b90ce7

@ -417,8 +417,10 @@ public class AppController extends BaseController
@ApiOperation("ai接口") @ApiOperation("ai接口")
@Log(title = "调用ai接口", businessType = BusinessType.OTHER) @Log(title = "调用ai接口", businessType = BusinessType.OTHER)
@Transactional @Transactional
public AjaxResult aiPost(@PathVariable("recordId") Long recordId, @RequestBody AiPostReq aiPostReq) public AjaxResult aiPost(@PathVariable("recordId") Long recordId, @RequestBody AIPostReqEx aiPostReqEx)
{ {
AiPostReq aiPostReq = new AiPostReq();
BeanUtils.copyProperties(aiPostReqEx, aiPostReq);
//删除同一次预约调用多次ai接口的图片数据 //删除同一次预约调用多次ai接口的图片数据
logger.info("aiPost param is {}", aiPostReq); logger.info("aiPost param is {}", aiPostReq);
imageService.deleteTImageByThirdId(recordId); imageService.deleteTImageByThirdId(recordId);
@ -429,6 +431,7 @@ public class AppController extends BaseController
TRecord tRecord = new TRecord(); TRecord tRecord = new TRecord();
tRecord.setId(recordId); tRecord.setId(recordId);
tRecord.setStatus("1"); tRecord.setStatus("1");
tRecord.setAppDealTime(aiPostReqEx.getAppDealTime());
tRecordService.updateTRecord(tRecord); tRecordService.updateTRecord(tRecord);
String result; String result;
Date start; Date start;

@ -133,7 +133,7 @@ public class HttpUtils
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
try try
{ {
// log.info("sendPost - {}", url); log.info("sendPost - {}", url);
URL realUrl = new URL(url); URL realUrl = new URL(url);
URLConnection conn = realUrl.openConnection(); URLConnection conn = realUrl.openConnection();
conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("accept", "*/*");
@ -152,7 +152,7 @@ public class HttpUtils
{ {
result.append(line); result.append(line);
} }
// log.info("recv - {}", result); log.info("recv - {}", result);
} }
catch (ConnectException e) catch (ConnectException e)
{ {

@ -89,6 +89,19 @@ public class TRecord extends BaseEntity
*/ */
private String delFlag; private String delFlag;
/**
* app
*/
private int appDealTime;
public int getAppDealTime() {
return appDealTime;
}
public void setAppDealTime(int appDealTime) {
this.appDealTime = appDealTime;
}
public String getDelFlag() { public String getDelFlag() {
return delFlag; return delFlag;
} }

@ -0,0 +1,25 @@
package com.ruoyi.system.domain.req;
import io.swagger.annotations.ApiModel;
import java.util.Date;
/**
*
*
* @author gongzhenkun
* @date 2022/10/8 11:44
*/
@ApiModel(value = "AIPostReqEx", description = "AI接口请求实体")
public class AIPostReqEx extends AiPostReq{
private int appDealTime;
public int getAppDealTime() {
return appDealTime;
}
public void setAppDealTime(int appDealTime) {
this.appDealTime = appDealTime;
}
}

@ -397,6 +397,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="responseTime != null">response_time = #{responseTime},</if> <if test="responseTime != null">response_time = #{responseTime},</if>
<if test="aiResultReturnTime != null">ai_result_return_time = #{aiResultReturnTime},</if> <if test="aiResultReturnTime != null">ai_result_return_time = #{aiResultReturnTime},</if>
<if test="aiResultModifyTime != null">ai_result_modify_time = #{aiResultModifyTime},</if> <if test="aiResultModifyTime != null">ai_result_modify_time = #{aiResultModifyTime},</if>
<if test="appDealTime != null">app_deal_time = #{appDealTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
</trim> </trim>
where id = #{id} where id = #{id}

Loading…
Cancel
Save