|
@@ -137,7 +137,7 @@ public class KfAppletMsgServiceImpl implements IKfAppletMsgService {
|
|
|
kfRoomMsgService.save(kfRoomMsg);
|
|
|
return;
|
|
|
}
|
|
|
- //客服休息时间, 发送自动回复
|
|
|
+ //发送自动回复
|
|
|
this.systemReplyHandle(gameApplet.getGameId(), kfAppletMsgDTO.getFromUserName(), kfRoom);
|
|
|
//消息报警监测
|
|
|
this.monitorWordHandle(gameApplet, kfAppletMsgDTO);
|
|
@@ -188,12 +188,11 @@ public class KfAppletMsgServiceImpl implements IKfAppletMsgService {
|
|
|
LocalTime nowTime = LocalTime.now();
|
|
|
LocalTime startTime = LocalTime.parse(kfSystemReply.getStartTime());
|
|
|
LocalTime endTime = LocalTime.parse(kfSystemReply.getEndTime());
|
|
|
- if (nowTime.isAfter(startTime) && nowTime.isBefore(endTime)) {
|
|
|
- return;
|
|
|
- }
|
|
|
- //休息时间, 发送指定消息
|
|
|
+ //判断要发送的消息内容
|
|
|
+ String content = nowTime.isAfter(startTime) && nowTime.isBefore(endTime) ? kfSystemReply.getWorkSysReply() : kfSystemReply.getSysReply();
|
|
|
+ //发送消息
|
|
|
Map<String, Object> textMap = new HashMap<>(1);
|
|
|
- textMap.put("content", kfSystemReply.getSysReply());
|
|
|
+ textMap.put("content", content);
|
|
|
Map<String, Object> msgParamMap = new HashMap<>(3);
|
|
|
msgParamMap.put("touser", openId);
|
|
|
msgParamMap.put("msgtype", KfRoomMsgTypeEnum.KF_MSG_TYPE_TEXT.getValue());
|
|
@@ -201,7 +200,7 @@ public class KfAppletMsgServiceImpl implements IKfAppletMsgService {
|
|
|
kfWxApiService.sendCustomMessageApi(gameId, msgParamMap);
|
|
|
//保存消息
|
|
|
Map<String, Object> kfRoomMsgMap = new HashMap<>(1);
|
|
|
- kfRoomMsgMap.put("text", kfSystemReply.getSysReply());
|
|
|
+ kfRoomMsgMap.put("text", content);
|
|
|
kfRoomMsgService.save(this.transform(openId, gameId, kfRoom, KfRoomMsgTypeEnum.KF_MSG_TYPE_TEXT, JsonUtil.toString(kfRoomMsgMap)));
|
|
|
}
|
|
|
|