zhongrj
2023-04-03 ed0a71a11aeffcbb441d5a67e2a5663bd0f0e8ed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?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>