张晓波
2023-10-18 01a3add609a65cfe5c066ebc743ea6308d32a053
hd/pipe/StaffManage/src/main/java/com/thhy/staff/modules/biz/platuser/service/impl/PlatUserServiceImpl.java
@@ -21,6 +21,7 @@
import com.thhy.staff.modules.biz.platuser.entity.*;
import com.thhy.staff.modules.biz.platuser.mapper.PlatUserMapper;
import com.thhy.staff.modules.biz.platuser.service.PlatUserService;
import com.thhy.staff.utils.MqUtils;
import com.thhy.staff.utils.ProcessFlag;
import com.thhy.staff.utils.StaffNoUtils;
import io.netty.channel.ChannelHandlerContext;
@@ -398,10 +399,14 @@
            pathParamJson.put("limit",10);
            pathParamJson.put("offset",0);
            pathParamJson.put("total",1);
            pathParamJson.put("person_list","[\""+faceDto.getUserId()+"\"]");
            List<String> userIds = new ArrayList<>();
            userIds.add(faceDto.getUserId());
            pathParamJson.put("person_list",userIds);
            pathParamJson.put("person_type","4");
            jsonObject.put("path_params",pathParamJson);
            mqContent.setData(jsonObject);
            logger.info("下发人脸参数:"+JSON.toJSONString(mqContent));
            MqUtils.createClient(emqxConfig,sns,JSON.toJSONString(mqContent));
            /*Map<String,Object> map = AcsMain.addFace(fd.getJobNum(),filePrefix+"/"+fd.getPhoto());
            if(map.containsKey("code")){
                if(Integer.parseInt(map.get("code").toString())!=0){
@@ -424,7 +429,7 @@
                }
            });*/
            CopyOnWriteArraySet<ChannelHandlerContext> CTXS= NettyServerHandler.CTXS;
            /*CopyOnWriteArraySet<ChannelHandlerContext> CTXS= NettyServerHandler.CTXS;
            if(CTXS.size()<1){
                throw  new BasicException(new BasicMessage("99991","与门禁一体机失去链接"));
            }
@@ -440,7 +445,7 @@
                    ctx.flush();
                    logger.info("成功推送消息到局域网段");
                }
            });
            });*/
        }
    }