Commit 56f85b14 authored by alex yao's avatar alex yao

fix:【【POE】-【个人空间】删除应用之后,原来的应用链接应不可使用】

    --bug==1009110
parent b8c57487
...@@ -372,7 +372,9 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ ...@@ -372,7 +372,9 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
PrintWriter writer = httpServletResponse.getWriter(); PrintWriter writer = httpServletResponse.getWriter();
StringBuilder output = new StringBuilder(); StringBuilder output = new StringBuilder();
while ((res = bufferedReader.readLine()) != null) { while ((res = bufferedReader.readLine()) != null) {
if (StringUtils.isNotBlank(res)) { if (StringUtils.isBlank(res)) {
continue;
}
LargeModelDemandResult result = JsonUtils.deSerialize(res.replaceFirst(EVENT_STREAM_PREFIX, StringUtils.EMPTY), LargeModelDemandResult.class); LargeModelDemandResult result = JsonUtils.deSerialize(res.replaceFirst(EVENT_STREAM_PREFIX, StringUtils.EMPTY), LargeModelDemandResult.class);
if (!"0".equals(result.getCode())) { if (!"0".equals(result.getCode())) {
logger.error("LLM Error,code:{}", result.getCode()); logger.error("LLM Error,code:{}", result.getCode());
...@@ -385,7 +387,6 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ ...@@ -385,7 +387,6 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
writer.write(res + "\n\n"); writer.write(res + "\n\n");
writer.flush(); writer.flush();
} }
}
writer.write(EVENT_STREAM_PREFIX + "[DONE]\n\n"); writer.write(EVENT_STREAM_PREFIX + "[DONE]\n\n");
// 关闭资源 // 关闭资源
bufferedReader.close(); bufferedReader.close();
......
...@@ -12,6 +12,7 @@ import cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition; ...@@ -12,6 +12,7 @@ import cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition;
import cn.com.poc.agent_application.rest.AgentApplicationInfoRest; import cn.com.poc.agent_application.rest.AgentApplicationInfoRest;
import cn.com.poc.agent_application.service.BizAgentApplicationInfoService; import cn.com.poc.agent_application.service.BizAgentApplicationInfoService;
import cn.com.poc.agent_application.service.BizAgentApplicationLargeModelListService; import cn.com.poc.agent_application.service.BizAgentApplicationLargeModelListService;
import cn.com.poc.agent_application.service.BizAgentApplicationPublishService;
import cn.com.poc.common.utils.BlContext; import cn.com.poc.common.utils.BlContext;
import cn.com.poc.support.security.oauth.entity.UserBaseEntity; import cn.com.poc.support.security.oauth.entity.UserBaseEntity;
import cn.com.yict.framemax.core.exception.BusinessException; import cn.com.yict.framemax.core.exception.BusinessException;
...@@ -39,6 +40,9 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest { ...@@ -39,6 +40,9 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
@Resource @Resource
private AgentApplicationInfoService agentApplicationInfoService; private AgentApplicationInfoService agentApplicationInfoService;
@Resource
private BizAgentApplicationPublishService bizAgentApplicationPublishService;
@Resource @Resource
private BizAgentApplicationLargeModelListService bizAgentApplicationLargeModelListService; private BizAgentApplicationLargeModelListService bizAgentApplicationLargeModelListService;
...@@ -99,6 +103,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest { ...@@ -99,6 +103,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
public void delete(String agentId) throws Exception { public void delete(String agentId) throws Exception {
Assert.notNull(agentId); Assert.notNull(agentId);
bizAgentApplicationInfoService.deletedByAgentId(agentId); bizAgentApplicationInfoService.deletedByAgentId(agentId);
bizAgentApplicationPublishService.deleteByAgentId(agentId);
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment