管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-11-07 d8ce4e1d7fe96410a5fab96f46649280024ab2d9
src/main/resources/mapper/data/DomainMapper.xml
@@ -2,13 +2,27 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lf.server.mapper.data.DomainMapper">
    <select id="selectCount" resultType="java.lang.Integer">
        select count(*) from lf.sys_domain a inner join lf.sys_dict b on a.dom_name = b.domain_na
        where b.ns = #{ns} and b.tab = #{tab} and b.domain_na is not null
        select count(a.*) from lf.sys_domain a
        where exists (select * from lf.sys_dict b where b.ns = #{ns}
        <if test="tab != null">
            and b.tab = #{tab}
        </if>
        )
        <if test="code != null">
            and a.dom_code like #{code}
        </if>
    </select>
    <select id="selectByPage" resultType="com.lf.server.entity.data.DomainEntity">
        select a.* from lf.sys_domain a inner join lf.sys_dict b on a.dom_name = b.domain_na
        where b.ns = #{ns} and b.tab = #{tab} and b.domain_na is not null
        select a.* from lf.sys_domain a
        where exists (select * from lf.sys_dict b where b.ns = #{ns}
        <if test="tab != null">
            and b.tab = #{tab}
        </if>
        )
        <if test="code != null">
            and a.dom_code like #{code}
        </if>
        order by a.id
        limit #{limit} offset #{offset}
    </select>