Browse Source

20210610添加各种消息

pt
zy_Java 4 years ago
parent
commit
61e69de726
  1. 3
      recovery/src/main/java/com/ccsens/recovery/api/PatientController.java
  2. 4
      recovery/src/main/java/com/ccsens/recovery/bean/dto/PatientDto.java
  3. 15
      recovery/src/main/java/com/ccsens/recovery/bean/message/RecoveryWithActionFeedBack.java
  4. 36
      recovery/src/main/java/com/ccsens/recovery/bean/message/RecoveryWithEndDrill.java
  5. 36
      recovery/src/main/java/com/ccsens/recovery/bean/message/RecoveryWithScore.java
  6. 12
      recovery/src/main/java/com/ccsens/recovery/bean/message/RecoveryWithStartDrill.java
  7. 2
      recovery/src/main/java/com/ccsens/recovery/netty/ChannelManager.java
  8. 6
      recovery/src/main/java/com/ccsens/recovery/netty/wsserver/WebSocketHandler.java
  9. 6
      recovery/src/main/java/com/ccsens/recovery/service/IMessageService.java
  10. 2
      recovery/src/main/java/com/ccsens/recovery/service/IPatientService.java
  11. 81
      recovery/src/main/java/com/ccsens/recovery/service/MessageService.java
  12. 100
      recovery/src/main/java/com/ccsens/recovery/service/PatientService.java
  13. 12
      recovery/src/main/java/com/ccsens/recovery/util/Constant.java
  14. 2
      recovery/src/main/resources/application-prod.yml
  15. 2
      util/src/main/java/com/ccsens/util/bean/message/common/MessageConstant.java

3
recovery/src/main/java/com/ccsens/recovery/api/PatientController.java

@ -111,7 +111,6 @@ public class PatientController {
return JsonResponse.newInstance().ok(recipeRecordId);
}
@MustLogin
@ApiOperation(value = "倒计时结束", notes = "zy:")
@RequestMapping(value = "/countdown", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse countdown(@ApiParam @Validated @RequestBody QueryDto<PatientDto.PatientId> params) throws Exception {
@ -122,7 +121,7 @@ public class PatientController {
@ApiOperation(value = "结束训练", notes = "zy:")
@RequestMapping(value = "/end", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse endDrill(@ApiParam @Validated @RequestBody QueryDto<PatientDto.EndDrill> params) {
public JsonResponse endDrill(@ApiParam @Validated @RequestBody QueryDto<PatientDto.EndDrill> params) throws Exception {
log.info("结束训练:{}",params);
patientService.endDrill(params.getParam(),params.getUserId());
log.info("结束训练成功");

4
recovery/src/main/java/com/ccsens/recovery/bean/dto/PatientDto.java

@ -20,6 +20,8 @@ public class PatientDto {
@NotNull(message = "患者id不能为空")
@ApiModelProperty("患者id")
private Long id;
@ApiModelProperty("训练记录id")
private Long recordId;
}
@Data
@ -105,6 +107,8 @@ public class PatientDto {
@Data
@ApiModel("结束训练")
public static class EndDrill{
@ApiModelProperty("患者id")
private Long patientId;
@ApiModelProperty("训练记录id")
private Long id;
@ApiModelProperty("训练的分数")

15
recovery/src/main/java/com/ccsens/recovery/bean/message/RecoveryWithActionFeedBack.java

@ -4,6 +4,8 @@ import com.ccsens.recovery.util.Constant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* @author
*/
@ -15,8 +17,17 @@ public class RecoveryWithActionFeedBack extends BaseMessageDto{
public static class Data{
//本次训练记录id
private Long recordId;
//动作是否正确
private boolean result;
//动作是否正确 0否 1是
private int result;
private List<Info> infoList;
}
@lombok.Data
public static class Info{
private int x;
private int y;
private int z;
private Long time;
}
private RecoveryWithActionFeedBack.Data data;

36
recovery/src/main/java/com/ccsens/recovery/bean/message/RecoveryWithEndDrill.java

@ -0,0 +1,36 @@
package com.ccsens.recovery.bean.message;
import com.ccsens.recovery.util.Constant;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class RecoveryWithEndDrill extends BaseMessageDto{
@lombok.Data
public static class Data{
//本次训练记录id
private Long recordId;
//分数
private int score;
//次数
private int times;
}
private RecoveryWithEndDrill.Data data;
public RecoveryWithEndDrill(){
setType(Constant.Message.SCORE);
setEvent(Constant.Message.SCORE);
setTime(System.currentTimeMillis());
}
public RecoveryWithEndDrill(Data data) {
this.data = data;
}
}

36
recovery/src/main/java/com/ccsens/recovery/bean/message/RecoveryWithScore.java

@ -0,0 +1,36 @@
package com.ccsens.recovery.bean.message;
import com.ccsens.recovery.util.Constant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* @author
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class RecoveryWithScore extends BaseMessageDto{
@lombok.Data
public static class Data{
//训练分数
private int score;
//次数
private int times;
}
private RecoveryWithScore.Data data;
public RecoveryWithScore(){
setType(Constant.Message.SCORE);
setEvent(Constant.Message.SCORE);
setTime(System.currentTimeMillis());
}
public RecoveryWithScore(Data data) {
this.data = data;
}
}

12
recovery/src/main/java/com/ccsens/recovery/bean/message/RecoveryWithStartDrill.java

@ -1,6 +1,7 @@
package com.ccsens.recovery.bean.message;
import com.ccsens.recovery.util.Constant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -17,15 +18,22 @@ public class RecoveryWithStartDrill extends BaseMessageDto{
private Long patientId;
//本次训练记录id
private Long recordId;
//"开始时间"
private Long startTime;
//"时长")
private Long duration = 60000L;
//"分数")
private int score = 11;
//游戏id
private Long gameId;
//项目id
private Long projectId;
//任务详情id
private Long taskDetailId;
//任务id
private Long subTaskId = 1402180562474635420L;
//插件名
private String pluginName = "start_training";
}
private RecoveryWithStartDrill.Data data;

2
recovery/src/main/java/com/ccsens/recovery/netty/ChannelManager.java

@ -240,7 +240,7 @@ public class ChannelManager {
* @param message 消息
*/
public static synchronized boolean sendTo(String userId,Object message){
logger.info("Invoke sendTo({},{})",userId,message);
logger.info("发送消息给某个用户(userId:---{},消息内容:---{})",userId,message);
Set<WrapperedChannel> wChannelSet = authedChannels.get(userId);
if(CollectionUtil.isNotEmpty(wChannelSet)){
for(WrapperedChannel wChannel:wChannelSet){

6
recovery/src/main/java/com/ccsens/recovery/netty/wsserver/WebSocketHandler.java

@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import com.ccsens.recovery.bean.message.AckMessageDto;
import com.ccsens.recovery.bean.message.AuthMessageDto;
import com.ccsens.recovery.bean.message.BaseMessageDto;
import com.ccsens.recovery.bean.message.RecoveryWithActionFeedBack;
import com.ccsens.recovery.netty.ChannelManager;
import com.ccsens.recovery.service.IMessageService;
import com.ccsens.util.JacksonUtil;
@ -119,6 +120,11 @@ public class WebSocketHandler extends SimpleChannelInboundHandler<InMessage> {
theMessage.getData().setChannelId(ctx.channel().id().asLongText());
outMessage = doAuthMessage(ctx, theMessage);
break;
case feedback:
log.info("动作反馈---{}", baseMessage);
RecoveryWithActionFeedBack feedBack = JacksonUtil.jsonToBean(msg.getData(), RecoveryWithActionFeedBack.class);
messageService.manageFeedBack(ctx,feedBack);
break;
default:
break;
}

6
recovery/src/main/java/com/ccsens/recovery/service/IMessageService.java

@ -2,6 +2,7 @@ package com.ccsens.recovery.service;
import com.ccsens.recovery.bean.message.AckMessageDto;
import com.ccsens.recovery.bean.message.AuthMessageDto;
import com.ccsens.recovery.bean.message.RecoveryWithActionFeedBack;
import com.ccsens.util.bean.message.common.OutMessage;
import com.fasterxml.jackson.core.JsonProcessingException;
import io.netty.channel.ChannelHandlerContext;
@ -15,5 +16,10 @@ public interface IMessageService {
OutMessage doAuthMessageWithAuth(ChannelHandlerContext ctx, AuthMessageDto message) throws JsonProcessingException, Exception;
/**
* 处理动作返回的消息
* @param feedBack
*/
void manageFeedBack(ChannelHandlerContext ctx, RecoveryWithActionFeedBack feedBack) throws Exception;
}

2
recovery/src/main/java/com/ccsens/recovery/service/IPatientService.java

@ -61,7 +61,7 @@ public interface IPatientService {
* @param param 训练记录id
* @param userId userId
*/
void endDrill(PatientDto.EndDrill param, Long userId);
void endDrill(PatientDto.EndDrill param, Long userId) throws Exception;
/**
* 动作反馈

81
recovery/src/main/java/com/ccsens/recovery/service/MessageService.java

@ -1,31 +1,44 @@
package com.ccsens.recovery.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.recovery.bean.message.AckMessageDto;
import com.ccsens.recovery.bean.message.AuthMessageDto;
import com.ccsens.recovery.bean.message.AuthMessageWithAnswerDto;
import com.ccsens.recovery.bean.message.*;
import com.ccsens.recovery.bean.po.Patient;
import com.ccsens.recovery.bean.po.PatientExample;
import com.ccsens.recovery.bean.po.RecoveryRobot;
import com.ccsens.recovery.netty.ChannelManager;
import com.ccsens.recovery.persist.dao.PatientDao;
import com.ccsens.recovery.util.Constant;
import com.ccsens.util.JacksonUtil;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.bean.message.common.MessageConstant;
import com.ccsens.util.bean.message.common.OutMessage;
import com.ccsens.util.bean.message.common.OutMessageSet;
import com.ccsens.util.bean.message.server.ChannelStatusMessage;
import com.fasterxml.jackson.core.JsonProcessingException;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static com.ccsens.recovery.netty.ChannelManager.sendTo;
@Slf4j
@Service
public class MessageService implements IMessageService {
@Autowired
private AmqpTemplate rabbitTemplate;
@Autowired
@Resource
private TallFeignClient tallFeignClient;
@Resource
private PatientDao patientDao;
@Resource
private RedisUtil redisUtil;
@Override
@ -47,14 +60,56 @@ public class MessageService implements IMessageService {
userId = tallFeignClient.getUserId(token);
}
ChannelManager.authChannel(ctx.channel(), userId, 1, 1);
AuthMessageWithAnswerDto messageWithAnswerDto = new AuthMessageWithAnswerDto(true, "ok");
OutMessage outMessage = new OutMessage(JacksonUtil.beanToJson(
// AuthMessageWithAnswerDto messageWithAnswerDto = new AuthMessageWithAnswerDto(true, "ok");
return new OutMessage(JacksonUtil.beanToJson(
new ChannelStatusMessage(true,0L, MessageConstant.Error.Ok))
);
// sendTo(ctx.channel(), messageWithAnswerDto);
return outMessage;
}
@Override
public void manageFeedBack(ChannelHandlerContext ctx,RecoveryWithActionFeedBack feedBack) throws Exception {
String userId = ChannelManager.getUserIdByChannel(ctx.channel());
log.info("获取连接的userId:{}",userId);
String robotUserId = null;
if(userId != null){
//查找患者信息
PatientExample patientExample = new PatientExample();
patientExample.createCriteria().andUserIdEqualTo(Long.valueOf(userId));
List<Patient> patients = patientDao.selectByExample(patientExample);
log.info("查找患者信息:{}",patients);
if(CollectionUtil.isNotEmpty(patients)) {
//查找redis内的机器人id
Object o = redisUtil.get(Constant.Redis.PATIENT_ROBOT + patients.get(0).getId());
if(ObjectUtil.isNotNull(o)){
robotUserId = (String) o;
}else {
//没有则查找数据库,查找患者当前对应的机器人id
RecoveryRobot recoveryRobot = patientDao.getRobotByPatientId(patients.get(0).getId());
log.info("查找患者当前对应的机器人信息:{}",recoveryRobot);
robotUserId = recoveryRobot.getUserid().toString();
}
}
}
//将消息转发给机器人
ChannelManager.sendTo(robotUserId, OutMessageSet.newInstance().ackId(null).add(new OutMessage(JacksonUtil.beanToJson(feedBack))));
//处理分数
RecoveryWithActionFeedBack.Data data = feedBack.getData();
if(ObjectUtil.isNotNull(data)){
if(data.getResult() == 1){
redisUtil.incr(Constant.Redis.RECORD_SCORE + data.getRecordId(),5);
redisUtil.incr(Constant.Redis.RECORD_TIMES + data.getRecordId(),5);
//给机器人和患者发送分数消息
RecoveryWithScore.Data data1 = new RecoveryWithScore.Data();
data1.setScore((Integer) redisUtil.get(Constant.Redis.RECORD_SCORE + data.getRecordId()));
data1.setTimes((Integer) redisUtil.get(Constant.Redis.RECORD_TIMES + data.getRecordId()));
RecoveryWithScore recoveryWithScore = new RecoveryWithScore(data1);
//机器人
ChannelManager.sendTo(robotUserId, OutMessageSet.newInstance().ackId(null).add(new OutMessage(JacksonUtil.beanToJson(recoveryWithScore))));
//患者
ChannelManager.sendTo(userId, OutMessageSet.newInstance().ackId(null).add(new OutMessage(JacksonUtil.beanToJson(recoveryWithScore))));
}
}
}
}

100
recovery/src/main/java/com/ccsens/recovery/service/PatientService.java

@ -7,17 +7,20 @@ import com.ccsens.recovery.bean.dto.HospitalDto;
import com.ccsens.recovery.bean.dto.PatientDto;
import com.ccsens.recovery.bean.message.RecoveryWithActionFeedBack;
import com.ccsens.recovery.bean.message.RecoveryWithCountdown;
import com.ccsens.recovery.bean.message.RecoveryWithEndDrill;
import com.ccsens.recovery.bean.message.RecoveryWithStartDrill;
import com.ccsens.recovery.bean.po.*;
import com.ccsens.recovery.bean.vo.PatientVo;
import com.ccsens.recovery.bean.vo.RecipeVo;
import com.ccsens.recovery.netty.ChannelManager;
import com.ccsens.recovery.persist.dao.PatientDao;
import com.ccsens.recovery.persist.dao.RecDrillDao;
import com.ccsens.recovery.persist.mapper.*;
import com.ccsens.recovery.util.Constant;
import com.ccsens.util.JacksonUtil;
import com.ccsens.util.bean.message.common.InMessage;
import com.ccsens.util.bean.message.common.MessageConstant;
import com.ccsens.util.bean.message.common.MessageRule;
import com.ccsens.util.RedisUtil;
import com.ccsens.util.bean.message.common.*;
import com.ccsens.util.bean.message.server.ChannelStatusMessage;
import com.ccsens.util.config.RabbitMQConfig;
import com.ccsens.util.message.SwitchoverProjectUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
@ -63,6 +66,8 @@ public class PatientService implements IPatientService{
private RecipeProjectDecomposeMapper projectDecomposeMapper;
@Resource
private IHospitalService hospitalService;
@Resource
private RedisUtil redisUtil;
@Override
public List<PatientVo.Patient> queryPatientByDoctorId(HospitalDto.DoctorId param, Long userId) {
@ -142,28 +147,27 @@ public class PatientService implements IPatientService{
recRecord.setRemoteDoctorId(param.getRemoteDoctorId());
recRecord.setSubTaskId(param.getSubTaskId());
recipeRecordMapper.insertSelective(recRecord);
//发送消息
//生成消息内容
RecoveryWithStartDrill recoveryWithStartDrill = new RecoveryWithStartDrill();
RecoveryWithStartDrill.Data data = new RecoveryWithStartDrill.Data();
data.setPatientId(param.getPatientId());
data.setRecordId(recRecord.getId());
data.setGameId(param.getGameId());
data.setProjectId(patient.getProjectId());
// data.setTaskDetailId(projectDecompose.getTaskId());
data.setStartTime(recRecord.getStartTime());
Object o = redisUtil.get(Constant.Redis.RECORD_SCORE + recRecord.getId());
data.setScore(o == null ? 0 : (Integer) o);
data.setSubTaskId(projectDecompose.getTaskId());
recoveryWithStartDrill.setData(data);
//用pt的WS发送消息
//查询接收者
Set<String> userIdSet = new HashSet<>();
userIdSet.add(patient.getUserId().toString());
// RecoveryRobot recoveryRobot = patientDao.getRobotByPatientId(param.getPatientId());
// if(ObjectUtil.isNotNull(recoveryRobot)){
// userIdSet.add(recoveryRobot.getUserid().toString());
// }
//封装成inMessage
//消息规则
MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User);
messageRule.setAckRule(MessageRule.AckRule.NONE);
messageRule.setOfflineDiscard((byte) 1);
//封装成inMessage
InMessage inMessage = new InMessage();
inMessage.setToDomain(MessageConstant.DomainType.User);
inMessage.setTos(userIdSet);
@ -172,7 +176,11 @@ public class PatientService implements IPatientService{
log.info("开始训练消息:{}",inMessage);
rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,
JacksonUtil.beanToJson(inMessage));
//给机器人发送消息,用新的WS
RecoveryRobot recoveryRobot = patientDao.getRobotByPatientId(param.getPatientId());
if(ObjectUtil.isNotNull(recoveryRobot)){
ChannelManager.sendTo(recoveryRobot.getUserid().toString(), OutMessageSet.newInstance().ackId(null).add(new OutMessage(JacksonUtil.beanToJson(recoveryWithStartDrill))));
}
//返回
PatientVo.RecipeRecordId recipeRecordId = new PatientVo.RecipeRecordId();
recipeRecordId.setId(recRecord.getId());
@ -180,14 +188,32 @@ public class PatientService implements IPatientService{
}
@Override
public void endDrill(PatientDto.EndDrill param, Long userId) {
public void endDrill(PatientDto.EndDrill param, Long userId) throws Exception {
//查找训练记录
RecipeRecord recipeRecord = recipeRecordMapper.selectByPrimaryKey(param.getId());
if(ObjectUtil.isNotNull(recipeRecord)){
//添加结束时间和分数
Object o = redisUtil.get(Constant.Redis.RECORD_SCORE + param.getPatientId());
int score = ObjectUtil.isNotNull(o) ? (int) o : 0;
recipeRecord.setEndTime(System.currentTimeMillis());
recipeRecord.setScore(param.getScore());
recipeRecord.setScore(score);
recipeRecordMapper.updateByPrimaryKeySelective(recipeRecord);
//TODO 发送结束消息,给患者和机器人发送消息
RecoveryWithEndDrill.Data data = new RecoveryWithEndDrill.Data();
data.setRecordId(param.getId());
data.setScore(score);
RecoveryWithEndDrill recoveryWithEndDrill = new RecoveryWithEndDrill(data);
//查找患者信息
Patient patient = patientDao.selectByPrimaryKey(param.getId());
if(ObjectUtil.isNotNull(patient)) {
ChannelManager.sendTo(patient.getUserId().toString(), OutMessageSet.newInstance().ackId(null).add(new OutMessage(JacksonUtil.beanToJson(recoveryWithEndDrill))));
}
//查找患者关联的机器人信息
RecoveryRobot recoveryRobot = patientDao.getRobotByPatientId(patient.getId());
if(ObjectUtil.isNotNull(recipeRecord)){
ChannelManager.sendTo(recoveryRobot.getUserid().toString(), OutMessageSet.newInstance().ackId(null).add(new OutMessage(JacksonUtil.beanToJson(recoveryWithEndDrill))));
}
}
}
@ -215,7 +241,7 @@ public class PatientService implements IPatientService{
RecoveryWithActionFeedBack actionFeedBack = new RecoveryWithActionFeedBack();
RecoveryWithActionFeedBack.Data data = new RecoveryWithActionFeedBack.Data();
data.setRecordId(param.getRecordId());
data.setResult(param.isResult());
data.setResult(param.isResult() ? 1 : 0);
actionFeedBack.setData(data);
InMessage inMessage = new InMessage();
@ -305,27 +331,39 @@ public class PatientService implements IPatientService{
@Override
public void countdown(PatientDto.PatientId param, Long userId) throws Exception {
Set<String> userIdSet = new HashSet<>();
//用新ws发送消息
String patientUserId = null;
//查询患者信息
Patient patient = patientDao.selectByPrimaryKey(param.getId());
if(ObjectUtil.isNotNull(patient)){
userIdSet.add(patient.getUserId().toString());
patientUserId = patient.getUserId().toString();
}
//消息规则
MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User);
messageRule.setAckRule(MessageRule.AckRule.NONE);
messageRule.setOfflineDiscard((byte) 1);
//生成消息
RecoveryWithCountdown recoveryWithCountdown = new RecoveryWithCountdown();
log.info("倒计时结束消息:{}",recoveryWithCountdown);
ChannelManager.sendTo(patientUserId, OutMessageSet.newInstance().ackId(null).add(new OutMessage(JacksonUtil.beanToJson(recoveryWithCountdown))));
InMessage inMessage = new InMessage();
inMessage.setToDomain(MessageConstant.DomainType.User);
inMessage.setTos(userIdSet);
inMessage.setData(JacksonUtil.beanToJson(recoveryWithCountdown));
inMessage.setRule(messageRule);
log.info("倒计时结束:{}",inMessage);
rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,
JacksonUtil.beanToJson(inMessage));
// Set<String> userIdSet = new HashSet<>();
// //查询患者信息
// Patient patient = patientDao.selectByPrimaryKey(param.getId());
// if(ObjectUtil.isNotNull(patient)){
// userIdSet.add(patient.getUserId().toString());
// }
// //消息规则
// MessageRule messageRule = MessageRule.defaultRule(MessageConstant.DomainType.User);
// messageRule.setAckRule(MessageRule.AckRule.NONE);
// messageRule.setOfflineDiscard((byte) 1);
// //生成消息
// RecoveryWithCountdown recoveryWithCountdown = new RecoveryWithCountdown();
//
// InMessage inMessage = new InMessage();
// inMessage.setToDomain(MessageConstant.DomainType.User);
// inMessage.setTos(userIdSet);
// inMessage.setData(JacksonUtil.beanToJson(recoveryWithCountdown));
// inMessage.setRule(messageRule);
// log.info("倒计时结束:{}",inMessage);
// rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,
// JacksonUtil.beanToJson(inMessage));
}
}

12
recovery/src/main/java/com/ccsens/recovery/util/Constant.java

@ -16,5 +16,17 @@ public class Constant {
public static final String FEEDBACK = "feedback";
/**倒计时结束*/
public static final String COUNTDOWN = "countdown";
/**训练分数消息*/
public static final String SCORE = "score";
}
/**消息*/
public static final class Redis {
/**患者关联的机器人 +患者id*/
public static final String PATIENT_ROBOT = "patientRobot_";
/**某次训练的分数 +训练记录id*/
public static final String RECORD_SCORE = "recordScore_";
/**某次训练的次数 +训练记录id*/
public static final String RECORD_TIMES = "recordTimes_";
}
}

2
recovery/src/main/resources/application-prod.yml

@ -29,7 +29,7 @@ spring:
port: 6379
timeout: 1000ms
swagger:
enable: false
enable: true
eureka:
instance:
ip-address: 119.3.214.36

2
util/src/main/java/com/ccsens/util/bean/message/common/MessageConstant.java

@ -58,6 +58,8 @@ public class MessageConstant {
//客户端认证
Auth(0x01),
feedback(0x01),
//客户端收到消息ACK
Ack(0x02),
//客户端收到消息ACK

Loading…
Cancel
Save