fengxiang
2018-01-26 e125b445697a6b8c2b5cc5c57f31249c5088c1c9
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;
   }
}