| | |
| | | package com.thhy.staff.modules.biz.platuser.entity; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.thhy.general.annotations.Idkey; |
| | | import lombok.Data; |
| | |
| | | this.verify = jsonObject.getInteger("capture_status"); |
| | | this.captureScore = jsonObject.getString("capture_score"); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String mess = "{\n" + |
| | | " \"dev_sno\": \" 04:12:53:FA:21:DA\",\n" + |
| | | " \"token\": \"f9k4l8ds3e92w02d9c82013na0s9\",\n" + |
| | | " \"person_id\": 12306,\n" + |
| | | " \"person_name\": \"张三\",\n" + |
| | | " \"person_temperature\": 36.7,\n" + |
| | | " \"person_type\": \"1\",\n" + |
| | | " \"id_card\": \"\",\n" + |
| | | " \"ic_card\": \"\",\n" + |
| | | " \"capture_img\": \"/9i/4aVBORw\",\n" + |
| | | " \"capture_score\": \"85.64\",\n" + |
| | | " \"capture_time\": \"1610967016235\",\n" + |
| | | " \"capture_status\": 1\n" + |
| | | "}"; |
| | | JSONObject jsonObject = JSON.parseObject(mess); |
| | | DoorLis doorLis = new DoorLis(jsonObject); |
| | | System.out.println(doorLis.getName()); |
| | | } |
| | | } |