派生自 projectDept/qhighschool

胡仁荣
2022-11-07 4cb792d930b7029c38ae2ced15e661a9d76c066b
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.admin.schoolRoll.impl;
 
import com.qxueyou.scc.admin.schoolRoll.ISchoolRollService;
import com.qxueyou.scc.base.model.Pager;
import com.qxueyou.scc.base.service.impl.CommonAppService;
import com.qxueyou.scc.base.util.ClientUtils;
import com.qxueyou.scc.base.util.CollectionUtils;
import com.qxueyou.scc.teach.student.model.StuStudent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
@Service
public class SchoolRollServiceImpl extends CommonAppService implements ISchoolRollService {
 
 
    @Autowired
    CommonAppService commonAppService;
    @Override
    public List<StuStudent> findSchoolRollList(Integer limit, Integer pageNum, String keyword, String status) {
        StringBuffer hql=new StringBuffer("from StuStudent where name like ? and status=? and deleteFlag is false");
 
        List<Object> args = CollectionUtils.newList(keyword + "%", status);
 
        hql.append(" order by createTime desc");
 
        List<StuStudent> list = findList(hql.toString(), new Pager(limit, pageNum), args, StuStudent.class);
 
        return list;
    }
 
    @Override
    public int findSchoolRollListCount(String keyword, String status) {
        StringBuffer hql=new StringBuffer("from StuStudent where name like ? and status=? and deleteFlag is false");
 
        List<Object> args = CollectionUtils.newList(keyword + "%", status);
 
        return findCount(hql.toString(),args);
    }
}