|
|
|
@ -5,6 +5,7 @@ import java.util.List; |
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
@ -51,16 +52,21 @@ public class ExperimentalClassController { |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/queryExperimentalClass") |
|
|
|
|
Response queryExperimentalClass(@RequestParam Integer schoolId) { |
|
|
|
|
Response queryExperimentalClass(@RequestParam Integer schoolId,@RequestParam Integer courseId) { |
|
|
|
|
Response resp = new Response(); |
|
|
|
|
HashMap<String, Object> ret=classService.queryExperimentalClass(schoolId); |
|
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
|
if (200 == status) { |
|
|
|
|
resp.setStatus(status); |
|
|
|
|
resp.setMessage(ret.get("retvalue")); |
|
|
|
|
} else { |
|
|
|
|
resp.setStatus(status); |
|
|
|
|
resp.setErrmessage(ret.get("retvalue").toString()); |
|
|
|
|
if(StringUtils.isEmpty(schoolId)){ |
|
|
|
|
resp.setStatus(300); |
|
|
|
|
resp.setErrmessage("学校信息为空"); |
|
|
|
|
}else{ |
|
|
|
|
HashMap<String, Object> ret=classService.queryExperimentalClass(schoolId,courseId); |
|
|
|
|
int status = (int) ret.get("retcode"); |
|
|
|
|
if (200 == status) { |
|
|
|
|
resp.setStatus(status); |
|
|
|
|
resp.setMessage(ret.get("retvalue")); |
|
|
|
|
} else { |
|
|
|
|
resp.setStatus(status); |
|
|
|
|
resp.setErrmessage(ret.get("retvalue").toString()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return resp; |
|
|
|
|
} |
|
|
|
|