<?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>
|