<?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.bonus.sgzb.base.mapper.MaTypeKeeperMapper">

    <sql id="selectHouseVo">
        select house_id, house_name, parent_id, status, dept_id, del_flag, create_by, create_time, remark, company_id
        from ma_house_info
    </sql>


    <select id="selectUserList" resultType="com.bonus.sgzb.base.vo.DeptUser">
        select sd.dept_name, su.user_name from sys_user su
        left join sys_dept sd on su.dept_id = sd.dept_id
        <where>
            <if test="userName != null and userName != ''">
                AND user_name like concat('%', #{userName}, '%')
            </if>
        </where>
    </select>

    <select id="selectListByUserId" resultType="com.bonus.sgzb.base.vo.MaTypeKeeperVO">
        select mt.type_name, su.user_name from ma_type mt
        left join ma_type_keeper mtk on mt.type_id = mtk
.type_id
        left join sys_user su on mtk.user_id = su.user_id
    </select>

</mapper>