|
@@ -658,16 +658,20 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
if (faceId.isEmpty()) {
|
|
|
throw new AjaxError("人脸不匹配");
|
|
|
}
|
|
|
- AppUser appUser = null;
|
|
|
+ boolean result=false;
|
|
|
for (String id : faceId) {
|
|
|
AppUser checkUser = findByFaceId(id);
|
|
|
if (checkUser != null) {
|
|
|
- appUser = checkUser;
|
|
|
+ if (Objects.equals(checkUser.getId(), loginId)) {
|
|
|
+ result=true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- if (appUser == null) {
|
|
|
+ if (!result) {
|
|
|
throw new AjaxError("人员信息未找到");
|
|
|
}
|
|
|
+
|
|
|
return;
|
|
|
}
|
|
|
String faceId = RandomUtil.randomString(32);
|
|
@@ -684,14 +688,17 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
if (faceId.isEmpty()) {
|
|
|
throw new AjaxError("人脸不匹配");
|
|
|
}
|
|
|
- AppUser appUser = null;
|
|
|
+ boolean result=false;
|
|
|
for (String id : faceId) {
|
|
|
AppUser checkUser = findByFaceId(id);
|
|
|
if (checkUser != null) {
|
|
|
- appUser = checkUser;
|
|
|
+ if (Objects.equals(checkUser.getId(), loginId)) {
|
|
|
+ result=true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- if (appUser == null) {
|
|
|
+ if (!result) {
|
|
|
throw new AjaxError("人员信息未找到");
|
|
|
}
|
|
|
return;
|