|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.yx.face.boot.core.SnowflakeIdWorker;
|
|
|
import com.yx.face.boot.uitls.JsonUtils;
|
|
|
+import com.yx.face.boot.uitls.RedisUtil;
|
|
|
import com.yx.face.service.FaceTBService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -15,6 +16,7 @@ import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import javax.persistence.Id;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.io.BufferedInputStream;
|
|
|
import java.io.IOException;
|
|
@@ -150,23 +152,23 @@ public class TBFaceController {
|
|
|
@ApiOperation("获取设备人员列表")
|
|
|
@PostMapping("pushUsersOnline")
|
|
|
public Map<String, Object> pushUsersOnline(HttpServletRequest request) {
|
|
|
- List<Map<String, String>> list = new ArrayList<>();
|
|
|
- try {
|
|
|
- JSONObject paramJson = getParamJson(request);
|
|
|
- JSONArray data = paramJson.getJSONArray("data");
|
|
|
- System.out.println(data);
|
|
|
- for (Object datum : data) {
|
|
|
- Map<String, String> map = new HashMap<>();
|
|
|
- map.put(JSONObject.parseObject(datum.toString()).getString("cardid"), paramJson.getString("SN"));
|
|
|
- map.put("SN", paramJson.getString("SN"));
|
|
|
- list.add(map);
|
|
|
- }
|
|
|
- if (!list.isEmpty()){
|
|
|
- faceTBService.pushUsersOnline(list);
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- log.info("推送刷脸刷卡记录 异常={}", e.getMessage());
|
|
|
- }
|
|
|
+// List<Map<String, String>> list = new ArrayList<>();
|
|
|
+// try {
|
|
|
+// JSONObject paramJson = getParamJson(request);
|
|
|
+// JSONArray data = paramJson.getJSONArray("data");
|
|
|
+// for (Object datum : data) {
|
|
|
+// Map<String, String> map = new HashMap<>();
|
|
|
+// map.put(JSONObject.parseObject(datum.toString()).getString("cardid"), paramJson.getString("SN"));
|
|
|
+// map.put("SN", paramJson.getString("SN"));
|
|
|
+// map.put("taskId", paramJson.getString("taskId"));
|
|
|
+// list.add(map);
|
|
|
+// }
|
|
|
+// if (!list.isEmpty()){
|
|
|
+// faceTBService.pushUsersOnline(list);
|
|
|
+// }
|
|
|
+// } catch (Exception e) {
|
|
|
+// log.info("推送刷脸刷卡记录 异常={}", e.getMessage());
|
|
|
+// }
|
|
|
Map<String, Object> result = Maps.newHashMapWithExpectedSize(1);
|
|
|
result.put("errCode", "00");
|
|
|
return result;
|