|
|
@@ -1,6 +1,5 @@
|
|
|
package me.zhengjie.dao.mybatis;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
@@ -8,9 +7,9 @@ import me.zhengjie.application.admin.controller.vo.FaceCompareRsp;
|
|
|
import me.zhengjie.base.util.BeanCopyUtils;
|
|
|
import me.zhengjie.base.util.FileUploadUtil;
|
|
|
import me.zhengjie.dao.mybatis.entity.FileInfoEntity;
|
|
|
-import me.zhengjie.dao.mybatis.entity.ThirdPartyInterfaceEntity;
|
|
|
+import me.zhengjie.dao.mybatis.entity.FaceCompareEntity;
|
|
|
import me.zhengjie.dao.mybatis.mapper.FileInfoMapper;
|
|
|
-import me.zhengjie.dao.mybatis.mapper.ThirdPartyInterfaceMapper;
|
|
|
+import me.zhengjie.dao.mybatis.mapper.FaceCompareMapper;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
@@ -19,18 +18,18 @@ import java.util.List;
|
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
@Component
|
|
|
-public class ThirdPartyInterfaceRepository {
|
|
|
- private final ThirdPartyInterfaceMapper thirdPartyInterfaceMapper;
|
|
|
+public class FaceCompareRepository {
|
|
|
+ private final FaceCompareMapper thirdPartyInterfaceMapper;
|
|
|
private final FileInfoMapper fileInfoMapper;
|
|
|
- public void insert(ThirdPartyInterfaceEntity thirdPartyInterfaceEntity){
|
|
|
+ public void insert(FaceCompareEntity thirdPartyInterfaceEntity){
|
|
|
thirdPartyInterfaceEntity.setCreateTime(new Date());
|
|
|
thirdPartyInterfaceMapper.insert(thirdPartyInterfaceEntity);
|
|
|
}
|
|
|
|
|
|
- public List<FaceCompareRsp> page(IPage<ThirdPartyInterfaceEntity> page, QueryWrapper<ThirdPartyInterfaceEntity> qw) {
|
|
|
- IPage<ThirdPartyInterfaceEntity> thirdPartyInterfaceEntityIPage = thirdPartyInterfaceMapper.selectPage(page,qw);
|
|
|
+ public List<FaceCompareRsp> page(IPage<FaceCompareEntity> page, QueryWrapper<FaceCompareEntity> qw) {
|
|
|
+ IPage<FaceCompareEntity> thirdPartyInterfaceEntityIPage = thirdPartyInterfaceMapper.selectPage(page,qw);
|
|
|
List<FaceCompareRsp> faceCompareRspList = new ArrayList<>();
|
|
|
- for (ThirdPartyInterfaceEntity thirdPartyInterfaceEntity:thirdPartyInterfaceEntityIPage.getRecords()){
|
|
|
+ for (FaceCompareEntity thirdPartyInterfaceEntity:thirdPartyInterfaceEntityIPage.getRecords()){
|
|
|
FaceCompareRsp faceCompareRsp = BeanCopyUtils.convertObj(thirdPartyInterfaceEntity, FaceCompareRsp.class);
|
|
|
String fileId = thirdPartyInterfaceEntity.getFileId();
|
|
|
FileInfoEntity fileInfoEntity = fileInfoMapper.selectById(fileId);
|
|
|
@@ -51,11 +50,11 @@ public class ThirdPartyInterfaceRepository {
|
|
|
return url;
|
|
|
}
|
|
|
|
|
|
- public ThirdPartyInterfaceEntity getOne(QueryWrapper<ThirdPartyInterfaceEntity> thirdPartyInterfaceEntityQueryWrapper) {
|
|
|
+ public FaceCompareEntity getOne(QueryWrapper<FaceCompareEntity> thirdPartyInterfaceEntityQueryWrapper) {
|
|
|
return thirdPartyInterfaceMapper.selectOne(thirdPartyInterfaceEntityQueryWrapper);
|
|
|
}
|
|
|
|
|
|
- public List<ThirdPartyInterfaceEntity> getList(QueryWrapper<ThirdPartyInterfaceEntity> thirdPartyInterfaceEntityQueryWrapper) {
|
|
|
+ public List<FaceCompareEntity> getList(QueryWrapper<FaceCompareEntity> thirdPartyInterfaceEntityQueryWrapper) {
|
|
|
return thirdPartyInterfaceMapper.selectList(thirdPartyInterfaceEntityQueryWrapper);
|
|
|
}
|
|
|
}
|