内网永远通过虹软人脸

This commit is contained in:
guoshengxiong 2024-08-15 18:05:14 +08:00
parent b332e61548
commit a093b488ab

View File

@ -56,6 +56,8 @@ public class UfaceRecognitionController {
public static final String LINUX = "linux";
@Value("${basePath}")
private String basePath;
@Value("${hongruanFacePass:}")
private String hongruanFacePass;
@Autowired
private IWorkerInfoService workerInfoService;
@Autowired
@ -75,6 +77,11 @@ public class UfaceRecognitionController {
public Result<Map<String, Object>> checkFace(@RequestBody Map<String, Object> map) {
Map<String, Object> data = new HashMap<>(16);
String os = System.getProperty("os.name");
if (Objects.equals(hongruanFacePass,"1")) {
data.put("checkType", "1");
data.put("message", "成功");
return Result.success(data);
}
if (os.toLowerCase().startsWith(WIN) || os.toLowerCase().startsWith(LINUX)) {
String fileUrl = MapUtils.getString(map, "fileUrl");
if (StringUtils.isNotEmpty(fileUrl)) {