|
@@ -38,6 +38,8 @@ import cn.com.qmth.examcloud.service.core.service.CourseService;
|
|
import cn.com.qmth.examcloud.service.core.util.ExportUtils;
|
|
import cn.com.qmth.examcloud.service.core.util.ExportUtils;
|
|
import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
|
import org.springframework.web.multipart.commons.CommonsMultipartFile;
|
|
|
|
|
|
|
|
+import com.google.common.collect.Lists;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 课程服务API
|
|
* 课程服务API
|
|
* Created by songyue on 17/1/14.
|
|
* Created by songyue on 17/1/14.
|
|
@@ -118,6 +120,19 @@ public class CourseApi {
|
|
public ResponseEntity getCourseByOrgId(@PathVariable Long orgId){
|
|
public ResponseEntity getCourseByOrgId(@PathVariable Long orgId){
|
|
return new ResponseEntity(courseRepo.findByOrgId(orgId),HttpStatus.OK);
|
|
return new ResponseEntity(courseRepo.findByOrgId(orgId),HttpStatus.OK);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "批量查询课程", notes = "批量查询课程")
|
|
|
|
+ @PostMapping("/batchGetCourses")
|
|
|
|
+ public ResponseEntity<List<Course>> batchGetCourses(@RequestBody String[] funcIds, HttpServletRequest request) {
|
|
|
|
+ List<Course> list = Lists.newArrayList();
|
|
|
|
+ for (String id : funcIds) {
|
|
|
|
+ Course one = courseRepo.findOne(Long.parseLong(id));
|
|
|
|
+ if (null != one) {
|
|
|
|
+ list.add(one);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return new ResponseEntity<List<Course>>(list, HttpStatus.OK);
|
|
|
|
+ }
|
|
|
|
|
|
@ApiOperation(value="新增课程",notes="新增")
|
|
@ApiOperation(value="新增课程",notes="新增")
|
|
@PostMapping
|
|
@PostMapping
|