|
@@ -1,13 +1,13 @@
|
|
package com.qmth.cqb.paper.web;
|
|
package com.qmth.cqb.paper.web;
|
|
|
|
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -98,4 +98,16 @@ public class ExtractConfigController {
|
|
return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
|
|
return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "抽取单个试题", notes = "抽取单个试题")
|
|
|
|
+ @GetMapping(value = "/extractQues/{ques_id}")
|
|
|
|
+ public ResponseEntity extractQuestion(@PathVariable String ques_id) {
|
|
|
|
+ Map<String, Object> quesMap = new HashMap<String, Object>();
|
|
|
|
+ quesMap = extractConfigService.getQuestionById(ques_id);
|
|
|
|
+ if (quesMap.get("msg").equals("success")) {
|
|
|
|
+ return new ResponseEntity(quesMap.get("quesDto"), HttpStatus.OK);
|
|
|
|
+ } else {
|
|
|
|
+ return new ResponseEntity(quesMap.get("msg"), HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|