<?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.lf.server.mapper.all.BaseQueryMapper">
|
<select id="selectUserFuzzy" resultType="com.lf.server.entity.ctrl.IdNameEntity">
|
select id,uname "name" from lf.sys_user
|
<where>
|
<if test="name != null">
|
uname like #{name}
|
</if>
|
</where>
|
order by uname limit 10
|
</select>
|
|
<select id="selectDepFuzzy" resultType="com.lf.server.entity.ctrl.IdNameEntity">
|
select id,name from lf.sys_dep
|
<where>
|
<if test="name != null">
|
name like #{name}
|
</if>
|
</where>
|
order by order_num limit 10
|
</select>
|
|
<select id="selectTabs" resultType="com.lf.server.entity.ctrl.TabEntity">
|
select distinct ns,tab,fn_get_entity(tab) entity,tab_desc,tableType from lf.sys_dict order by tab
|
</select>
|
|
<select id="selectTabsForCount" resultType="java.lang.Integer">
|
select count(distinct tab) from lf.sys_dict
|
<where>
|
<if test="tab != null">
|
tab like #{tab} or tab_desc like #{tab}
|
</if>
|
</where>
|
</select>
|
|
<select id="selectTabsByPage" resultType="com.lf.server.entity.ctrl.TabEntity">
|
select distinct ns,tab,fn_get_entity(tab) entity,tab_desc,tableType from lf.sys_dict
|
<where>
|
<if test="tab != null">
|
tab like #{tab} or tab_desc like #{tab}
|
</if>
|
</where>
|
order by tab
|
limit #{limit} offset #{offset}
|
</select>
|
|
<select id="selectFields" resultType="com.lf.server.entity.data.DictEntity">
|
select * from lf.sys_dict where ns = #{ns} and tab = #{tab} order by order_num
|
</select>
|
|
<select id="selectDomains" 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>
|
|
<select id="selectRoute" resultType="java.lang.String">
|
select ST_astext(ST_Union(geom)) as route from pgr_fromAtoB('lrdl'::text, #{x1}, #{y1}, #{x2}, #{y2});
|
</select>
|
|
<select id="selectLocation" resultType="com.lf.server.entity.ctrl.KeyValueEntity">
|
select '国' "key", cname "value" from bs.th_globe_country where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom)
|
union all
|
select '省' "key", cname "value" from bs.th_province_area where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom)
|
union all
|
select '市' "key", cname "value" from bs.th_district_area where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom)
|
union all
|
select '县' "key", cname "value" from bs.th_county_area where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom);
|
</select>
|
|
<select id="selectBaseType" resultType="com.lf.server.entity.data.DirEntity">
|
select * from lf.sys_dir where pid = 1
|
</select>
|
</mapper>
|