|
@@ -0,0 +1,41 @@
|
|
|
+package cn.com.qmth.examcloud.service.core.api;
|
|
|
+
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import cn.com.qmth.examcloud.common.util.ErrorMsg;
|
|
|
+import cn.com.qmth.examcloud.service.core.service.FaceSetTokenService;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author chenken
|
|
|
+ * @date 2018年1月23日 上午11:21:39
|
|
|
+ * @company QMTH
|
|
|
+ * @description FaceSetTokenApi.java
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("${app.api.root}/faceSet")
|
|
|
+public class FaceSetTokenApi {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private FaceSetTokenService faceSetTokenService;
|
|
|
+
|
|
|
+ @ApiOperation(value="查询可用的faceSet",notes="查询可用的faceSet")
|
|
|
+ @GetMapping("/enableFaceSet")
|
|
|
+ public ResponseEntity<Object> getEnableFaceSet(){
|
|
|
+ try{
|
|
|
+ String faceSet = faceSetTokenService.getEnableFaceSet();
|
|
|
+ return new ResponseEntity<Object>(faceSet, HttpStatus.OK);
|
|
|
+ }catch(Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ return new ResponseEntity<Object>(HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|