mitao
10 天以前 78bfb29d03a127cd6961ad5e99a396ec8f4e8668
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
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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="com.cl.mapper.InstitutionMapper">
 
 
    <select id="pageList" resultType="com.cl.pojo.vo.InstitutionVO">
        select
            id , name, type, county, phone,address
        from
            t_institution
        where
            del_flag=0
        <if test="countyList != null and countyList.size() > 0">
            AND county IN
            <foreach collection="countyList" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="null!=name and ''!=name">
            and name like concat('%',#{name},'%')
        </if>
        order by id desc
 
    </select>
 
 
    <select id="getAll" resultType="com.cl.pojo.vo.InstitutionVO">
        select id,type,name,address,phone,county
        from
            t_institution
        where
        del_flag=0
        <if test="null!=county and county!=0">
            and county=#{county}
        </if>
        order by id desc
    </select>
 
</mapper>