张晓波
2023-10-19 3e9199c1d0135f92544e811655e0856ca4df6e39
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/face/service/impl/FaceServerImpl.java
@@ -12,6 +12,7 @@
import com.thhy.staff.modules.biz.face.service.FaceServer;
import com.thhy.staff.modules.biz.platuser.entity.DoorLis;
import com.thhy.staff.modules.biz.platuser.mapper.PlatUserMapper;
import com.thhy.staff.utils.MqUtils;
import org.checkerframework.checker.units.qual.A;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -113,7 +114,8 @@
                    JSONObject failUserInfo = JSON.parseObject(obj.toString());
                    String userId = failUserInfo.getString("person_id");
                    JSONArray failInfoArray = failUserInfo.getJSONArray("info");
                    String failReason = failInfoArray.getJSONObject(0).getString("reason");
                    String failReason = "";
                    if(failInfoArray.size()>0) failReason = failInfoArray.getJSONObject(0).getString("reason");
                    userMapper.syncFail(userId,failReason);
                }
            }
@@ -127,4 +129,17 @@
        DoorLis doorLis = new DoorLis(jsonObject);
        userMapper.insertDoorLis(doorLis);
    }
    @Override
    public void queryPer(String perId) {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("method","get_person");
        jsonObject.put("params",new JSONObject());
        JSONObject dataJson = new JSONObject();
        dataJson.put("path",vfPrefix+"/"+"getPersonDetail");
        dataJson.put("person_id",perId);
        jsonObject.put("data",dataJson);
        List<String> sns = faceDeviceMapper.queryDevSn();
        MqUtils.createClient(emqxConfig,sns,jsonObject.toJSONString());
    }
}