派生自 projectDept/qhighschool

yn147
2023-11-23 42c48ce1d64e941d28c7bfe4093f9659e77bd523
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
package com.qxueyou.scc.admin.studentFiles.Impl;
 
import com.qxueyou.scc.admin.studentFiles.StudentFilesService;
import com.qxueyou.scc.base.model.Pager;
import com.qxueyou.scc.base.service.impl.CommonAppService;
import com.qxueyou.scc.base.util.CollectionUtils;
import com.qxueyou.scc.teach.student.model.StuStudent;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service
public class StudentFilesServiceImpl extends CommonAppService implements StudentFilesService {
    @Override
    public List<StuStudent> findStudentFiles(Integer limit, Integer pageNum, String keyword, String classId) {
        StringBuffer hql=new StringBuffer("from StuStudent where name like ? and classId = ? and deleteFlag is false");
 
        List<Object> args = CollectionUtils.newList(keyword + "%",classId);
 
        hql.append(" order by createTime desc");
 
        List<StuStudent> list = findList(hql.toString(), new Pager(limit, pageNum), args, StuStudent.class);
 
        return list;
    }
    @Override
    public int findfindStudentFilesListCount(String keyword, String classId) {
        StringBuffer hql=new StringBuffer("from StuStudent where name like ? and subjectId = ? and deleteFlag is false");
 
        List<Object> args = CollectionUtils.newList(keyword + "%",classId);
 
        return findCount(hql.toString(),args);
    }
}