沈斌
2018-01-31 a20095a98a3b968b10b390ba7b9ba99c2ddbd4d0
src/main/java/com/moral/service/impl/MonitorPointServiceImpl.java
@@ -18,6 +18,7 @@
import com.moral.mapper.MonitorPointMapper;
import com.moral.service.MonitorPointService;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.entity.Example.Criteria;
@Service
public class MonitorPointServiceImpl implements MonitorPointService {
@@ -87,4 +88,15 @@
        }
    }
   @Override
   public List<MonitorPoint> getMonitorPointsByName(String name) {
      Example example = new Example(MonitorPoint.class);
      Criteria criteria = example.createCriteria();
      criteria.andEqualTo("isDelete", Constants.IS_DELETE_FALSE).andLike("name", "%" + name + "%");
      example.or().andEqualTo("isDelete", Constants.IS_DELETE_FALSE).andCondition("getPY(name) like ", "%" + name + "%");
      List<MonitorPoint> monitorPoints = monitorPointMapper.selectByExample(example);
      return monitorPoints;
   }
}