| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.lf.server.entity.bd.DlgAgnp; |
| | | import com.lf.server.entity.bd.DlgAgnpEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.bd.DlgAgnpMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | DlgAgnpMapper dlgAgnpMapper; |
| | | |
| | | public Page<DlgAgnp> selectAddrByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | Page<DlgAgnp> paging = new Page<>(pageIndex, pageSize); |
| | | public Page<DlgAgnpEntity> selectAddrByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | Page<DlgAgnpEntity> paging = new Page<>(pageIndex, pageSize); |
| | | paging.addOrder(OrderItem.asc("gid")); |
| | | |
| | | QueryWrapper<DlgAgnp> wrapper = null; |
| | | QueryWrapper<DlgAgnpEntity> wrapper = null; |
| | | if (!StringHelper.isEmpty(name)) { |
| | | wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", name.trim()); |
| | |
| | | return dlgAgnpMapper.selectPage(paging, wrapper); |
| | | } |
| | | |
| | | public DlgAgnp selectAddrById(Integer id) { |
| | | return dlgAgnpMapper.selectOne(id); |
| | | public String selectWktById(Integer id) { |
| | | return dlgAgnpMapper.selectWktById(id); |
| | | } |
| | | } |