Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
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
徐少华
midjourney-proxy
Commits
8325bece
Commit
8325bece
authored
Mar 05, 2020
by
zhangdongwei-intern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix-1021485:熔断里面配置需求定制单替换符,客户端没有生效
parent
3be71a0a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
PersonalStageBiz.java
...a/com/pcloud/book/personalstage/biz/PersonalStageBiz.java
+1
-1
PersonalStageBizImpl.java
...oud/book/personalstage/biz/impl/PersonalStageBizImpl.java
+6
-4
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/PersonalStageBiz.java
View file @
8325bece
...
@@ -53,7 +53,7 @@ public interface PersonalStageBiz {
...
@@ -53,7 +53,7 @@ public interface PersonalStageBiz {
void
sendNotKeywordReply
(
String
robotId
,
String
userWxId
,
String
ip
,
Long
personalStageId
,
Long
personalStageUserId
,
String
userSendContent
,
Integer
sendMode
,
Integer
notKeywordSendCount
);
void
sendNotKeywordReply
(
String
robotId
,
String
userWxId
,
String
ip
,
Long
personalStageId
,
Long
personalStageUserId
,
String
userSendContent
,
Integer
sendMode
,
Integer
notKeywordSendCount
);
void
sendNotKeywordFusingReply
(
String
robotId
,
String
userWxId
,
String
ip
,
Long
personalStageId
,
Long
personalStageUserId
);
void
sendNotKeywordFusingReply
(
String
robotId
,
String
userWxId
,
String
ip
,
Long
personalStageId
,
Long
personalStageUserId
,
Long
paperId
);
String
replaceProjectProgressUrl
(
String
content
,
String
robotId
,
String
userWxId
,
Long
personalStageUserId
);
String
replaceProjectProgressUrl
(
String
content
,
String
robotId
,
String
userWxId
,
Long
personalStageUserId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/personalstage/biz/impl/PersonalStageBizImpl.java
View file @
8325bece
...
@@ -369,7 +369,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -369,7 +369,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
||
PersonalStageUserStateEnum
.
FUSING
.
value
.
equals
(
last
.
getState
())){
||
PersonalStageUserStateEnum
.
FUSING
.
value
.
equals
(
last
.
getState
())){
// 走熔断
// 走熔断
LOGGER
.
info
(
"走熔断"
);
LOGGER
.
info
(
"走熔断"
);
handleFusingReply
(
robotId
,
userWxId
,
ip
,
personalStage
,
last
);
handleFusingReply
(
robotId
,
userWxId
,
ip
,
personalStage
,
last
,
personalStage
.
getPaperId
()
);
}
else
{
}
else
{
//走正常逻辑非关键词回复并且更新记录
//走正常逻辑非关键词回复并且更新记录
if
(
PersonalStageUserStateEnum
.
NORMAL
.
value
.
equals
(
last
.
getState
())
if
(
PersonalStageUserStateEnum
.
NORMAL
.
value
.
equals
(
last
.
getState
())
...
@@ -501,6 +501,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -501,6 +501,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
String
robotId
=
wakeupDelayDTO
.
getRobotId
();
String
robotId
=
wakeupDelayDTO
.
getRobotId
();
String
userWxId
=
wakeupDelayDTO
.
getWxId
();
String
userWxId
=
wakeupDelayDTO
.
getWxId
();
String
ip
=
wakeupDelayDTO
.
getIp
();
String
ip
=
wakeupDelayDTO
.
getIp
();
this
.
replacePaperUrl
(
replyItems
,
robotId
,
userWxId
,
personalStage
.
getPaperId
());
sendReplyItems
(
replyItems
,
robotId
,
userWxId
,
ip
,
wakeupDelayDTO
.
getPersonalStageUserId
());
sendReplyItems
(
replyItems
,
robotId
,
userWxId
,
ip
,
wakeupDelayDTO
.
getPersonalStageUserId
());
//下一个延时
//下一个延时
List
<
PersonalStageWakeup
>
wakeups
=
personalStageWakeupDao
.
getListByPersonalStageId
(
personalStageId
);
List
<
PersonalStageWakeup
>
wakeups
=
personalStageWakeupDao
.
getListByPersonalStageId
(
personalStageId
);
...
@@ -735,7 +736,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -735,7 +736,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
@ParamLog
(
"非关键词熔断回复"
)
@ParamLog
(
"非关键词熔断回复"
)
@Override
@Override
public
void
sendNotKeywordFusingReply
(
String
robotId
,
String
userWxId
,
String
ip
,
Long
personalStageId
,
Long
personalStageUserId
)
{
public
void
sendNotKeywordFusingReply
(
String
robotId
,
String
userWxId
,
String
ip
,
Long
personalStageId
,
Long
personalStageUserId
,
Long
paperId
)
{
List
<
Long
>
ids
=
personalStageReplyDao
.
getIdsByRelevance
(
StageReplyRelevEnum
.
FUSING_NOT_KEYWORD
.
value
,
personalStageId
);
List
<
Long
>
ids
=
personalStageReplyDao
.
getIdsByRelevance
(
StageReplyRelevEnum
.
FUSING_NOT_KEYWORD
.
value
,
personalStageId
);
if
(
ListUtils
.
isEmpty
(
ids
))
{
if
(
ListUtils
.
isEmpty
(
ids
))
{
return
;
return
;
...
@@ -746,6 +747,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -746,6 +747,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
if
(
ListUtils
.
isEmpty
(
items
)){
if
(
ListUtils
.
isEmpty
(
items
)){
return
;
return
;
}
}
this
.
replacePaperUrl
(
items
,
robotId
,
userWxId
,
paperId
);
sendReplyItems
(
items
,
robotId
,
userWxId
,
ip
,
personalStageUserId
);
sendReplyItems
(
items
,
robotId
,
userWxId
,
ip
,
personalStageUserId
);
}
}
...
@@ -795,7 +797,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -795,7 +797,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
}
}
@ParamLog
(
"处理熔断回复情况"
)
@ParamLog
(
"处理熔断回复情况"
)
private
void
handleFusingReply
(
String
robotId
,
String
userWxId
,
String
ip
,
PersonalStage
personalStage
,
PersonalStageUser
last
)
{
private
void
handleFusingReply
(
String
robotId
,
String
userWxId
,
String
ip
,
PersonalStage
personalStage
,
PersonalStageUser
last
,
Long
paperId
)
{
if
(!
PersonalStageUserStateEnum
.
FUSING
.
value
.
equals
(
last
.
getState
()))
{
if
(!
PersonalStageUserStateEnum
.
FUSING
.
value
.
equals
(
last
.
getState
()))
{
// 置为熔断状态
// 置为熔断状态
PersonalStageUser
user
=
new
PersonalStageUser
();
PersonalStageUser
user
=
new
PersonalStageUser
();
...
@@ -818,7 +820,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
...
@@ -818,7 +820,7 @@ public class PersonalStageBizImpl implements PersonalStageBiz {
if
(!
JedisClusterUtils
.
exists
(
key
))
{
if
(!
JedisClusterUtils
.
exists
(
key
))
{
// 发送熔断回复消息
// 发送熔断回复消息
JedisClusterUtils
.
set
(
key
,
"true"
,
60
);
JedisClusterUtils
.
set
(
key
,
"true"
,
60
);
sendNotKeywordFusingReply
(
robotId
,
userWxId
,
ip
,
personalStage
.
getId
(),
last
.
getId
());
sendNotKeywordFusingReply
(
robotId
,
userWxId
,
ip
,
personalStage
.
getId
(),
last
.
getId
()
,
paperId
);
}
}
}
}
...
...
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