|
@@ -8,6 +8,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -117,6 +118,10 @@ public class ExtractConfigController {
|
|
|
public ResponseEntity<Map<String, Object>> checkIsAllQbjectiveQuestion(String paperId){
|
|
|
Map<String, Object> quesMap = new HashMap<String, Object>();
|
|
|
try{
|
|
|
+ if(StringUtils.isBlank(paperId)){
|
|
|
+ quesMap.put("message","paperId不能为空");
|
|
|
+ return new ResponseEntity<Map<String, Object>>(HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
+ }
|
|
|
boolean result = extractConfigService.checkIsAllQbjectiveQuestion(paperId);
|
|
|
quesMap.put("result", result);
|
|
|
quesMap.put("message", result?"全为客观题":"不全为客观题");
|