package com.newfiber.api.pc.service.impl; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.newfiber.api.pc.dao.RiverManage.PatrolManageBaseRelationMapper; import com.newfiber.api.pc.model.River.PatrolManageBaseRelation; import com.newfiber.api.pc.service.PatrolManageBaseRelationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service("patrolManageBaseRelationService") public class PatrolManageBaseRelationServiceImpl extends ServiceImpl<PatrolManageBaseRelationMapper, PatrolManageBaseRelation> implements PatrolManageBaseRelationService { @Autowired private PatrolManageBaseRelationMapper patrolManageBaseRelationMapper; @Override public PageInfo<PatrolManageBaseRelation> listForPage(String searchStr, Integer pageNo, Integer pageSize) { PageHelper.startPage(pageNo, pageSize); EntityWrapper<PatrolManageBaseRelation> wapper = new EntityWrapper<>(); //name 模糊匹配的字段 wapper.like("name", searchStr); List<PatrolManageBaseRelation> list = patrolManageBaseRelationMapper.selectList(wapper); PageInfo<PatrolManageBaseRelation> result = new PageInfo<>(); if (!list.isEmpty()) { result = new PageInfo<PatrolManageBaseRelation>(list); } return result; } @Override public PatrolManageBaseRelation selectByStCode(String siteNo,Integer patrolType) { return patrolManageBaseRelationMapper.selectByStCode(siteNo,patrolType); } }