派生自 projectDept/qhighschool

yn147
2023-10-26 3970ced88b5b456f03fe277c254ca761f05492e0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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<Map<String, Object>> 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);
    }
}