AdministerMapper.xml 793 Bytes
<?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.show.mapper.AdministerMapper">

    <select id="names" resultType="com.show.vo.administer.NamesVO">
        select id,user_name name from administer t where t.delete_date is null
        <if test="ids != null and ids.size>0">
            and t.id in
            <foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
                #{item}
            </foreach>
        </if>
    </select>

    <select id="administerName" parameterType="long" resultType="string">
        select user_name from administer t where t.delete_date is null
            and t.id = #{id}
    </select>

</mapper>