Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
fbc64c5e37
@ -62,7 +62,7 @@ public class EbikeCoreHandler {
|
||||
ReqEbikeBikeComDto reqEbikeBikeComDto = new ReqEbikeBikeComDto(String.valueOf(bikeId), String.valueOf(staffId), cmdCode, "1", "1");
|
||||
commandRecords.put(tid, reqEbikeBikeComDto);
|
||||
}
|
||||
String command = getCommand(cmdCode, tid);
|
||||
String command = getCommand(cmdCode, tid,true);
|
||||
cmdMsg.setCommand(command);
|
||||
// 注册响应监听
|
||||
pendingRequests.put(tid, future);
|
||||
@ -109,7 +109,7 @@ public class EbikeCoreHandler {
|
||||
|
||||
String tid = UUID.randomUUID().toString().replace("-", "");
|
||||
|
||||
String command = getCommand(cmdCode, tid);
|
||||
String command = getCommand(cmdCode, tid,false);
|
||||
cmdMsg.setCommand(command);
|
||||
// 注册响应监听
|
||||
pendingRequests.put(tid, future);
|
||||
@ -163,7 +163,7 @@ public class EbikeCoreHandler {
|
||||
* @param tid 任务id
|
||||
* @return 命令json字符串
|
||||
*/
|
||||
String getCommand(String cmdCode, String tid) {
|
||||
String getCommand(String cmdCode, String tid,boolean record) {
|
||||
EbikeCmdMapper cmdMapper = SpringContextHolder.getBean(EbikeCmdMapper.class);
|
||||
EbikeParamMapper paramMapper = SpringContextHolder.getBean(EbikeParamMapper.class);
|
||||
EbikeParamValueMapper paramValueMapper = SpringContextHolder.getBean(EbikeParamValueMapper.class);
|
||||
@ -171,7 +171,9 @@ public class EbikeCoreHandler {
|
||||
.where(EBIKE_CMD.CMD_CODE.eq(cmdCode));
|
||||
EbikeCmd ebikeCmd = cmdMapper.selectOneByQuery(queryWrapper);
|
||||
|
||||
if (record){
|
||||
commandRecords.get(tid).setCom(ebikeCmd.getCmdName());
|
||||
}
|
||||
|
||||
queryWrapper.clear();
|
||||
queryWrapper.where(EBIKE_PARAM.CMD_ID.eq(ebikeCmd.getCmdId()))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user