对比新文件 |
| | |
| | | package com.thhy.staff.modules.biz.face.entity; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.thhy.general.utils.DeepCopyUtils; |
| | | import com.thhy.general.utils.UUIDUtils; |
| | | import com.thhy.staff.config.EmqxConfig; |
| | | import com.thhy.staff.config.EmqxProperties; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | public class FaceResult implements Serializable { |
| | | |
| | | private int code; |
| | | |
| | | private String msg; |
| | | |
| | | private boolean success; |
| | | |
| | | private String dev_sno; |
| | | |
| | | private String token; |
| | | |
| | | private JSONObject mqinfo; |
| | | |
| | | public FaceResult() { |
| | | } |
| | | |
| | | public FaceResult(boolean success,FaceDevice faceDevice,String emqxConfig){ |
| | | this.success = success; |
| | | this.code = 0; |
| | | this.msg = "登录成功"; |
| | | this.dev_sno = faceDevice.getDevSno(); |
| | | this.mqinfo = JSON.parseObject(emqxConfig); |
| | | this.mqinfo.put("topic",faceDevice.getDevSno()); |
| | | this.mqinfo.put("willTopic",faceDevice.getDevSno()+"-W"); |
| | | this.mqinfo.put("willContent",faceDevice.getDevSno()+"-offline"); |
| | | this.token = UUIDUtils.create(); |
| | | } |
| | | } |