| | |
| | | <!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> |