| | |
| | | if(pageBean.getPageSize()>0){
|
| | | PageHelper.startPage(pageBean.getPageIndex(),pageBean.getPageSize());
|
| | | }
|
| | | if(example.getOrderByClause().isEmpty()) {
|
| | | if(example.getOrderByClause() == null || example.getOrderByClause().isEmpty()) {
|
| | | example.setOrderByClause("create_time desc");
|
| | | }
|
| | | List<Organization> organizationList = organizationMapper.selectWithAreaNameByExample(example);
|
| | |
| | | return organizations;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Organization getOrganizationsById(int id) {
|
| | | Example example = new Example(ENTITY_CLASS);
|
| | | example.or().andEqualTo("id",id);
|
| | | List<Organization> organizationList = organizationMapper.selectWithAreaNameByExample(example);
|
| | | return organizationList.size()>0?organizationList.get(0):null;
|
| | | }
|
| | | }
|