Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
6e1cc5e4
Commit
6e1cc5e4
authored
Nov 04, 2024
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:【POE】-【应用创建】AI自动配置 随机自动和AI生成 都会报错java.lang.NullPointerException
parent
c964b8c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
Variable.java
...in/java/cn/com/poc/agent_application/entity/Variable.java
+16
-0
AgentApplicationInfoRestImpl.java
...t_application/rest/impl/AgentApplicationInfoRestImpl.java
+2
-5
No files found.
src/main/java/cn/com/poc/agent_application/entity/Variable.java
View file @
6e1cc5e4
...
...
@@ -20,6 +20,22 @@ public class Variable {
this
.
variableDefault
=
variableDefault
;
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
Variable
variable
=
(
Variable
)
o
;
if
(!
key
.
equals
(
variable
.
key
))
return
false
;
return
variableDefault
.
equals
(
variable
.
variableDefault
);
}
@Override
public
int
hashCode
()
{
int
result
=
key
.
hashCode
();
result
=
31
*
result
+
variableDefault
.
hashCode
();
return
result
;
}
@Override
public
String
toString
()
{
return
"Variable{"
+
...
...
src/main/java/cn/com/poc/agent_application/rest/impl/AgentApplicationInfoRestImpl.java
View file @
6e1cc5e4
...
...
@@ -152,11 +152,8 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
// 如果存在agentId,则判断变量结构是否有变化,如果有变化,则删除redis中的数据
if
(
StringUtils
.
isNotBlank
(
entity
.
getAgentId
()))
{
BizAgentApplicationInfoEntity
infoEntity
=
bizAgentApplicationInfoService
.
getByAgentId
(
entity
.
getAgentId
());
if
(
infoEntity
.
getVariableStructure
()
!=
null
||
!
infoEntity
.
getVariableStructure
().
equals
(
entity
.
getVariableStructure
()))
{
String
contentKey
=
SetValueMemoryConstants
.
REDIS_PREFIX
+
dto
.
getBaseInfo
().
getAgentId
()
+
":"
+
BlContext
.
getCurrentUserNotException
().
getUserId
().
toString
();
redisService
.
del
(
contentKey
);
}
String
contentKey
=
SetValueMemoryConstants
.
REDIS_PREFIX
+
dto
.
getBaseInfo
().
getAgentId
()
+
":"
+
BlContext
.
getCurrentUserNotException
().
getUserId
().
toString
();
redisService
.
del
(
contentKey
);
}
return
AgentApplicationInfoConvert
.
entityToDto
(
StringUtils
.
isEmpty
(
entity
.
getAgentId
())
?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment