|
@@ -1,5 +1,7 @@
|
|
|
package cn.com.qmth.examcloud.core.basic.api.provider;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -7,12 +9,18 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import com.google.common.collect.Lists;
|
|
|
+
|
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.StudentFaceCloudService;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.bean.FacesetBean;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.GetUsableFacesetListReq;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentFaceReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.GetUsableFacesetListResp;
|
|
|
import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentFaceResp;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentFaceRepo;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
|
+import cn.com.qmth.examcloud.core.basic.dao.entity.FacesetEntity;
|
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentFaceEntity;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.StudentFaceService;
|
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.StudentFaceInfo;
|
|
@@ -61,4 +69,30 @@ public class StudentFaceCloudServiceProvider extends ControllerSupport
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "获取可用的faceset集合")
|
|
|
+ @PostMapping("getUsableFacesetList")
|
|
|
+ @Override
|
|
|
+ public GetUsableFacesetListResp getUsableFacesetList(@RequestBody GetUsableFacesetListReq req) {
|
|
|
+
|
|
|
+ List<FacesetEntity> facesetList = studentFaceService.getUsableFacesetList();
|
|
|
+
|
|
|
+ List<FacesetBean> list = Lists.newArrayList();
|
|
|
+
|
|
|
+ for (FacesetEntity cur : facesetList) {
|
|
|
+ FacesetBean bean = new FacesetBean();
|
|
|
+ list.add(bean);
|
|
|
+
|
|
|
+ bean.setDisplayName(cur.getDisplayName());
|
|
|
+ bean.setFaceCount(cur.getFaceCount());
|
|
|
+ bean.setFacesetToken(cur.getFacesetToken());
|
|
|
+ bean.setId(cur.getId());
|
|
|
+ bean.setOuterId(cur.getOuterId());
|
|
|
+ bean.setTags(cur.getTags());
|
|
|
+ }
|
|
|
+
|
|
|
+ GetUsableFacesetListResp resp = new GetUsableFacesetListResp();
|
|
|
+ resp.setFacesetBeanList(list);
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
}
|