<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="cn.gistack.sm.patrol.mapper.PatrolRouteMapper">
|
|
<!--自定义分页查询-->
|
<select id="selectPatrolRoute" resultType="cn.gistack.sm.patrol.entity.PatrolRoute">
|
select * from sm_patrol_route where is_deleted = 0
|
<if test="patrolRoute.routeName!=null and patrolRoute.routeName!=''">
|
and route_name like concat(concat('%',#{patrolRoute.routeName}),'%')
|
</if>
|
<if test="patrolRoute.reservoirId!=null and patrolRoute.reservoirId!=''">
|
and reservoir_id like concat(concat('%',#{patrolRoute.reservoirId}),'%')
|
</if>
|
</select>
|
|
<!--自定义分页查询-->
|
<select id="getPatrolRouteTree" resultType="cn.gistack.sm.patrol.vo.PatrolRouteVO">
|
select id,route_name from sm_patrol_route where is_deleted = 0
|
<if test="patrolRoute.routeName!=null and patrolRoute.routeName!=''">
|
and route_name like concat(concat('%',#{patrolRoute.routeName}),'%')
|
</if>
|
<if test="patrolRoute.reservoirId!=null and patrolRoute.reservoirId!=''">
|
and reservoir_id like concat(concat('%',#{patrolRoute.reservoirId}),'%')
|
</if>
|
</select>
|
</mapper>
|