| | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.jsh.erp.constants.BusinessConstants; |
| | | import com.jsh.erp.datasource.entities.ConfigSecurity; |
| | | import com.jsh.erp.datasource.entities.ConfigSecurityExample; |
| | |
| | | @Override |
| | | public List<ConfigSecurity> findList(ConfigSecurityQuery configSecurityQuery) { |
| | | // 设置分页参数 |
| | | PageHelper.startPage(configSecurityQuery.getCurrentPage()-1, configSecurityQuery.getPageSize()); |
| | | |
| | | |
| | | ConfigSecurityExample example = new ConfigSecurityExample(); |
| | | ConfigSecurityExample.Criteria criteria = example.createCriteria(); |
| | |
| | | |
| | | example.setOrderByClause(" create_time desc "); |
| | | |
| | | PageHelper.startPage(configSecurityQuery.getCurrentPage(), configSecurityQuery.getPageSize()); |
| | | return configSecurityMapper.selectByExample(example); |
| | | } |
| | | |
| | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<ConfigSecurity> findPageInfo(ConfigSecurityQuery configSecurityQuery) { |
| | | ConfigSecurityExample example = new ConfigSecurityExample(); |
| | | ConfigSecurityExample.Criteria criteria = example.createCriteria(); |
| | | criteria.andDeleteFlagEqualTo(false); |
| | | if (StringUtils.isNotEmpty(configSecurityQuery.getKeyword())) { |
| | | criteria.andKeywordLike("%" + configSecurityQuery.getKeyword() + "%"); |
| | | } |
| | | if (StringUtils.isNotEmpty(configSecurityQuery.getType())) { |
| | | criteria.andTypeEqualTo(configSecurityQuery.getType()); |
| | | } |
| | | |
| | | example.setOrderByClause(" create_time desc "); |
| | | |
| | | PageHelper.startPage(configSecurityQuery.getCurrentPage(), configSecurityQuery.getPageSize()); |
| | | List<ConfigSecurity> list = configSecurityMapper.selectByExample(example); |
| | | return new PageInfo<>(list); |
| | | |
| | | } |
| | | |
| | | |
| | | } |