servicesReply还原

This commit is contained in:
sdy 2026-06-04 18:25:54 +08:00
parent 434726a9af
commit 001e997a26
1 changed files with 3 additions and 3 deletions

View File

@ -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");