servicesReply还原
This commit is contained in:
parent
434726a9af
commit
001e997a26
|
|
@ -23,15 +23,15 @@ public class ServicesReplyHandler implements MessageHandler {
|
|||
log.debug("services reply --> topic: {}, payload: {}", topic, payload);
|
||||
JSONObject message = JsonUtils.parseObject(payload, JSONObject.class);
|
||||
if (message != null) {
|
||||
// 回复仅 bid 与请求一致,tid 为设备新生成的值,不可参与关联匹配,故只按 bid 关联
|
||||
String bid = message.getStr("bid");
|
||||
if (StrUtil.isNotBlank(bid)) {
|
||||
String tid = message.getStr("tid");
|
||||
if (StrUtil.isNotBlank(bid) && StrUtil.isNotBlank(tid)) {
|
||||
JSONObject data = message.getJSONObject(BusinessConstant.DATA);
|
||||
if (data == null) {
|
||||
data = new JSONObject();
|
||||
data.set("result", 0);
|
||||
}
|
||||
CacheUtils.set(bid, data);
|
||||
CacheUtils.set(bid + "_" + tid, data);
|
||||
}
|
||||
} else {
|
||||
log.debug("services reply --> payload解析失败,解析后为null");
|
||||
|
|
|
|||
Loading…
Reference in New Issue