<?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.hxhq.business.mapper.YqMapper">
    <select id="queryList" resultType="com.hxhq.business.domain.Yq">
        SELECT y.*, d.dept_name AS bmMc FROM t_yq y LEFT JOIN sys_dept d ON y.bm_id = d.dept_id
        <if test="ew.sqlSegment != '' and ew.sqlSegment != null">
            <where>
                ${ew.sqlSegment}
            </where>
        </if>
    </select>
    <select id="queryInfo" resultType="com.hxhq.business.domain.Yq">
    SELECT y.*, d.dept_name AS bmMc FROM t_yq y LEFT JOIN sys_dept d ON y.bm_id = d.dept_id
    WHERE y.id = #{id}
    </select>
</mapper>