|
|
@@ -14,6 +14,7 @@ import com.github.microservice.auth.server.core.domain.UserFace;
|
|
|
import com.github.microservice.auth.server.core.model.ResultsModel;
|
|
|
import com.github.microservice.auth.server.core.util.FaceUtil;
|
|
|
import com.github.microservice.core.util.JsonUtil;
|
|
|
+import com.github.microservice.core.util.bean.BeanUtil;
|
|
|
import com.mongodb.client.gridfs.GridFSFindIterable;
|
|
|
import com.mongodb.client.gridfs.model.GridFSFile;
|
|
|
import jakarta.validation.constraints.NotNull;
|
|
|
@@ -22,8 +23,10 @@ import lombok.SneakyThrows;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.kafka.common.protocol.types.Field;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.cglib.beans.BeanMap;
|
|
|
import org.springframework.data.mongodb.core.query.Criteria;
|
|
|
import org.springframework.data.mongodb.core.query.Query;
|
|
|
import org.springframework.data.mongodb.gridfs.GridFsTemplate;
|
|
|
@@ -373,7 +376,8 @@ public class UserFaceServiceImpl implements UserFaceService {
|
|
|
String dataKey = redisearchResultModel.getDataKey();
|
|
|
dataKey = dataKey.replace(prefix, "");
|
|
|
String userId = dataKey.substring(0, 24);
|
|
|
- return ResultContent.buildContent(userId);
|
|
|
+ redisearchResultModel.setUserId(userId);
|
|
|
+ return ResultContent.buildContent(BeanUtil.bean2Map(redisearchResultModel));
|
|
|
}else {
|
|
|
return ResultContent.build(ResultState.FaceNoMatches);
|
|
|
}
|