智慧保安后台管理-验收版本
tangzy
2021-12-06 30df94c05573a426d030510d4dd58ae1d93bfb7a
src/main/java/org/springblade/modules/dispatcher/mapper/DispatcherUnitMapper.xml
@@ -5,13 +5,22 @@
    <!--派遣公司分页信息-->
    <select id="selectDispatcherUnitPage" resultType="org.springblade.modules.dispatcher.vo.DispatcherUnitVO">
        select
            sdu.*,bt.dept_name tenantName
        distinct
        sdu.*,bt.dept_name tenantName,bu.real_name realName
        from
            sys_dispatcher_unit sdu
        sys_dispatcher_unit sdu
        LEFT JOIN
            blade_dept bt
        blade_dept bt
        ON
            sdu.dept_id = bt.id
        sdu.dept_id = bt.id
        left join
        sys_dispatcher sd
        on
        sdu.id = sd.dispatcher_unit_id
        left join
        blade_user bu
        on
        sd.user_ids = bu.id
        WHERE
            1=1
        <if test="dispatcherUnit.tenantName!=null and  dispatcherUnit.tenantName!=''">
@@ -41,6 +50,13 @@
        <if test="dispatcherUnit.district!=null">
            and sdu.district = #{dispatcherUnit.district}
        </if>
        <if test="dispatcherUnit.isExpire==1">
            and sdu.start_time &lt;= now()
            and sdu.end_time &gt; now()
        </if>
        <if test="dispatcherUnit.isExpire==2">
            and sdu.end_time &lt;= now()
        </if>
    </select>
    <!--自定义树-->