package com.qxueyou.scc.controller; import com.qxueyou.scc.admin.studentFiles.StudentFilesService; import com.qxueyou.scc.base.model.Pager; import com.qxueyou.scc.base.model.Result; import com.qxueyou.scc.base.util.CollectionUtils; import com.qxueyou.scc.base.util.QBeanUtils; import com.qxueyou.scc.teach.student.model.StuStudent; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; @Api(tags="学生档案管理接口") @RestController @RequestMapping("/admin/StudentFiles") public class StudentFilesController { @Autowired private StudentFilesService studentFilesService; @ApiOperation(value = "学生档案", notes = "") @GetMapping(value = "/studentFilesList") public Result studentFilesList(String classId, @RequestParam(defaultValue = "10") Integer limit, @RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "") String keyword) { List> students = studentFilesService.getStudentLst(classId, keyword, new Pager(limit, pageNum)); int studentCount = studentFilesService.getStudentsCount(classId, keyword); return new Result(true, "success", CollectionUtils.newObjectMap("studentCount", studentCount, "studentLst", students)); } @ApiOperation(value = "学生评语", notes = "") @PostMapping(value = "/studentCommentAddAndUp") public String studentCommentAddAndUp(String[] studentIds, String comment) { return studentFilesService.studentCommentAddAndUp(studentIds,comment); } }