Commit a392cc7a authored by 廖旭伟's avatar 廖旭伟

修改办事情形接口

parent 23ed23d9
...@@ -133,7 +133,7 @@ public class ComplexApiController { ...@@ -133,7 +133,7 @@ public class ComplexApiController {
rsp.setMsg(ApiRespCodeEnum.SUCCESS.getLabel()); rsp.setMsg(ApiRespCodeEnum.SUCCESS.getLabel());
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue()); rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
try { try {
req.setNonce(RandomUtil.randomNumbers(6)); req.setNonce(RandomUtil.randomNumbers(8));
cacheService.lpush(KEY_COMPLEX_REQ, JSONObject.toJSONString(req)); cacheService.lpush(KEY_COMPLEX_REQ, JSONObject.toJSONString(req));
String rest = cacheService.blpop(KEY_EVENT_IMPLEMENTATION_RESP + req.getNonce(), HTTP_TIMEOUT, String.class); String rest = cacheService.blpop(KEY_EVENT_IMPLEMENTATION_RESP + req.getNonce(), HTTP_TIMEOUT, String.class);
if (ObjectUtil.isEmpty(rest)) { if (ObjectUtil.isEmpty(rest)) {
......
...@@ -79,6 +79,10 @@ public class SendThread extends AbstractThread { ...@@ -79,6 +79,10 @@ public class SendThread extends AbstractThread {
ComplexAcceptReq complexAcceptReq = JSONObject.parseObject(reqStr, ComplexAcceptReq.class); ComplexAcceptReq complexAcceptReq = JSONObject.parseObject(reqStr, ComplexAcceptReq.class);
ImplementAcceptSendTask acceptSendTask = new ImplementAcceptSendTask(deviceCode, complexAcceptReq); ImplementAcceptSendTask acceptSendTask = new ImplementAcceptSendTask(deviceCode, complexAcceptReq);
ThreadPool.getInstance().execute(acceptSendTask); ThreadPool.getInstance().execute(acceptSendTask);
} else if ("bus-situation-material/judgmentExist".equals(urlPath)) {
ComplexAcceptReq complexAcceptReq = JSONObject.parseObject(reqStr, ComplexAcceptReq.class);
ImplementAcceptSendTask acceptSendTask = new ImplementAcceptSendTask(deviceCode, complexAcceptReq);
ThreadPool.getInstance().execute(acceptSendTask);
} }
......
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