Compare commits

..

No commits in common. "c84e58d5895562aeaf0840c4bcb2a196be3eb107" and "05d6e2849630cca9322f549388904548357fb33a" have entirely different histories.

View File

@ -62,7 +62,7 @@ public class EbikeCoreHandler {
ReqEbikeBikeComDto reqEbikeBikeComDto = new ReqEbikeBikeComDto(String.valueOf(bikeId), String.valueOf(staffId), cmdCode, "1", "1"); ReqEbikeBikeComDto reqEbikeBikeComDto = new ReqEbikeBikeComDto(String.valueOf(bikeId), String.valueOf(staffId), cmdCode, "1", "1");
commandRecords.put(tid, reqEbikeBikeComDto); commandRecords.put(tid, reqEbikeBikeComDto);
} }
String command = getCommand(cmdCode, tid,true); String command = getCommand(cmdCode, tid);
cmdMsg.setCommand(command); cmdMsg.setCommand(command);
// 注册响应监听 // 注册响应监听
pendingRequests.put(tid, future); pendingRequests.put(tid, future);
@ -109,7 +109,7 @@ public class EbikeCoreHandler {
String tid = UUID.randomUUID().toString().replace("-", ""); String tid = UUID.randomUUID().toString().replace("-", "");
String command = getCommand(cmdCode, tid,false); String command = getCommand(cmdCode, tid);
cmdMsg.setCommand(command); cmdMsg.setCommand(command);
// 注册响应监听 // 注册响应监听
pendingRequests.put(tid, future); pendingRequests.put(tid, future);
@ -163,7 +163,7 @@ public class EbikeCoreHandler {
* @param tid 任务id * @param tid 任务id
* @return 命令json字符串 * @return 命令json字符串
*/ */
String getCommand(String cmdCode, String tid,boolean record) { String getCommand(String cmdCode, String tid) {
EbikeCmdMapper cmdMapper = SpringContextHolder.getBean(EbikeCmdMapper.class); EbikeCmdMapper cmdMapper = SpringContextHolder.getBean(EbikeCmdMapper.class);
EbikeParamMapper paramMapper = SpringContextHolder.getBean(EbikeParamMapper.class); EbikeParamMapper paramMapper = SpringContextHolder.getBean(EbikeParamMapper.class);
EbikeParamValueMapper paramValueMapper = SpringContextHolder.getBean(EbikeParamValueMapper.class); EbikeParamValueMapper paramValueMapper = SpringContextHolder.getBean(EbikeParamValueMapper.class);
@ -171,9 +171,7 @@ public class EbikeCoreHandler {
.where(EBIKE_CMD.CMD_CODE.eq(cmdCode)); .where(EBIKE_CMD.CMD_CODE.eq(cmdCode));
EbikeCmd ebikeCmd = cmdMapper.selectOneByQuery(queryWrapper); EbikeCmd ebikeCmd = cmdMapper.selectOneByQuery(queryWrapper);
if (record){ commandRecords.get(tid).setCom(ebikeCmd.getCmdName());
commandRecords.get(tid).setCom(ebikeCmd.getCmdName());
}
queryWrapper.clear(); queryWrapper.clear();
queryWrapper.where(EBIKE_PARAM.CMD_ID.eq(ebikeCmd.getCmdId())) queryWrapper.where(EBIKE_PARAM.CMD_ID.eq(ebikeCmd.getCmdId()))