| | |
| | | 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.DlgAgnpEntity; |
| | | import com.lf.server.entity.bd.DlgagnpEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.bd.DlgAgnpMapper; |
| | | import com.lf.server.mapper.bd.DlgagnpMapper; |
| | | import com.lf.server.service.all.BaseQueryService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Service |
| | | public class LocateService { |
| | | @Autowired |
| | | DlgAgnpMapper dlgAgnpMapper; |
| | | DlgagnpMapper dlgAgnpMapper; |
| | | |
| | | public Page<DlgAgnpEntity> selectAddrByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | Page<DlgAgnpEntity> paging = new Page<>(pageIndex, pageSize); |
| | | paging.addOrder(OrderItem.asc("gid")); |
| | | @Autowired |
| | | BaseQueryService baseQueryService; |
| | | |
| | | QueryWrapper<DlgAgnpEntity> wrapper = null; |
| | | public Page<DlgagnpEntity> selectAddrByPage(String name, Integer pageSize, Integer pageIndex) { |
| | | Page<DlgagnpEntity> paging = new Page<>(pageIndex, pageSize); |
| | | paging.addOrder(OrderItem.desc("gid")); |
| | | |
| | | QueryWrapper<DlgagnpEntity> wrapper = null; |
| | | if (!StringHelper.isEmpty(name)) { |
| | | wrapper = new QueryWrapper<>(); |
| | | wrapper.like("name", name.trim()); |
| | |
| | | } |
| | | |
| | | public String selectWktById(Integer id) { |
| | | return dlgAgnpMapper.selectWktById(id); |
| | | String tab = BaseQueryService.getTabName(dlgAgnpMapper); |
| | | if (StringHelper.isNull(tab)) { |
| | | return null; |
| | | } |
| | | |
| | | return dlgAgnpMapper.selectWktById(tab, id); |
| | | } |
| | | } |