| | |
| | | |
| | | @Override |
| | | public PageData<ProjectDTO> page(Map<String, Object> params) { |
| | | IPage<ProjectDTO> page = baseDao.getPageList( |
| | | IPage<ProjectEntity> page = baseDao.selectPage( |
| | | getPage(params, null, false), |
| | | params |
| | | getWrapper(params) |
| | | ); |
| | | |
| | | return getPageData(page, ProjectDTO.class); |
| | |
| | | public QueryWrapper<ProjectEntity> getWrapper(Map<String, Object> params){ |
| | | String id = (String)params.get("id"); |
| | | String projectName = (String)params.get("projectName"); |
| | | String projectCode = (String)params.get("projectCode"); |
| | | |
| | | QueryWrapper<ProjectEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq(StringUtils.isNotBlank(id), "id", id) |
| | | .like(StringUtils.isNotBlank(projectName),"project_name",projectName); |
| | | .like(StringUtils.isNotBlank(projectName),"project_name",projectName) |
| | | .like(StringUtils.isNotBlank(projectCode),"project_code",projectCode); |
| | | |
| | | return wrapper; |
| | | } |