Commit 9536bcc3 by 裴大威

Merge branch 'fix-1021485' into 'master'

fix-1021485:熔断里面配置需求定制单替换符,客户端没有生效

See merge request rays/pcloud-book!507
parents 3be71a0a 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);
......
...@@ -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);
} }
} }
......
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