| | |
| | | <?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"> |
| | | <mapper namespace="com.terra.system.mapper.all.BaseQueryMapper"> |
| | | <select id="selectUserFuzzy" resultType="com.terra.system.entity.ctrl.IdNameEntity"> |
| | | select id,uname "name" from lf.sys_user |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | order by uname limit 10 |
| | | </select> |
| | | |
| | | <select id="selectDepFuzzy" resultType="com.lf.server.entity.ctrl.IdNameEntity"> |
| | | <select id="selectDepFuzzy" resultType="com.terra.system.entity.ctrl.IdNameEntity"> |
| | | select id,name from lf.sys_dep |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectTabsByPage" resultType="com.lf.server.entity.ctrl.TabEntity"> |
| | | <select id="selectTabsByPage" resultType="com.terra.system.entity.ctrl.TabEntity"> |
| | | select ns, tab, tab_desc, fn_get_entity(tab) entity, tableType, bak, fn_tab_count(a.ns, a.tab, #{filters}) "rows" |
| | | from lf.sys_dict a |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset}; |
| | | </select> |
| | | |
| | | <select id="selectFields" resultType="com.lf.server.entity.data.DictEntity"> |
| | | <select id="selectFields" resultType="com.terra.system.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 id="selectDomains" resultType="com.terra.system.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 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 id="selectLocation" resultType="com.terra.system.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) |
| | |
| | | select '县' "key", cname "value" from bs.th_county_area where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom); |
| | | </select> |
| | | |
| | | <select id="selectDirTypes" resultType="com.lf.server.entity.ctrl.KeyValueEntity"> |
| | | <select id="selectDirTypes" resultType="com.terra.system.entity.ctrl.KeyValueEntity"> |
| | | select (select string_agg(code, ',') from lf.sys_dir where name = a.name) "key", name "value" |
| | | from lf.sys_dir a |
| | | <where> |
| | |
| | | order by key |
| | | </select> |
| | | |
| | | <select id="selectDirsByTypes" resultType="com.lf.server.entity.ctrl.KeyValueEntity"> |
| | | <select id="selectDirsByTypes" resultType="com.terra.system.entity.ctrl.KeyValueEntity"> |
| | | with rs as ( |
| | | select name, code |
| | | from lf.sys_dir |
| | |
| | | order by value; |
| | | </select> |
| | | |
| | | <select id="selectAnnexByTab" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectAnnexByTab" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select a.* from lf.sys_attach a |
| | | <where> |
| | | tab = #{tab} |
| | |
| | | <?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.PermsMapper"> |
| | | <select id="selectRes" resultType="com.lf.server.entity.all.ResAuthEntity"> |
| | | <mapper namespace="com.terra.system.mapper.all.PermsMapper"> |
| | | <select id="selectRes" resultType="com.terra.system.entity.all.ResAuthEntity"> |
| | | select distinct d.id,d.name,d.server |
| | | from lf.sys_user a |
| | | inner join lf.sys_role_user b on a.id = b.userid |
| | |
| | | order by d.id |
| | | </select> |
| | | |
| | | <select id="selectMenus" resultType="com.lf.server.entity.all.MenusAuthEntity"> |
| | | <select id="selectMenus" resultType="com.terra.system.entity.all.MenusAuthEntity"> |
| | | select distinct e.id,e.pid,e.cn_name,e.en_name,e.url,e.perms,e.type,e.css,e.icon,e.level,e.order_num,e.is_show |
| | | from lf.sys_user a |
| | | inner join lf.sys_role_user b on a.id = b.userid |
| | |
| | | order by perms |
| | | </select> |
| | | |
| | | <select id="selectPermsEntity" resultType="com.lf.server.entity.all.PermsAuthEntity"> |
| | | <select id="selectPermsEntity" resultType="com.terra.system.entity.all.PermsAuthEntity"> |
| | | select distinct e.id,e.pid,e.order_num,e.cn_name,e.en_name,f.name,e.perms,f.tag |
| | | from lf.sys_user a |
| | | inner join lf.sys_role_user b on a.id = b.userid |
| | |
| | | inner join lf.sys_user c on b.userid = c.id where c.uid = #{uid} |
| | | </select> |
| | | |
| | | <select id="selectMenuRecursive" resultType="com.lf.server.entity.sys.MenuEntity"> |
| | | <select id="selectMenuRecursive" resultType="com.terra.system.entity.sys.MenuEntity"> |
| | | with recursive rs as ( |
| | | select a.* from lf.sys_menu a where a.id = #{id} |
| | | union |
| | |
| | | <?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.data.DictMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.DictMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_dict |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.DictEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.DictEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName from lf.sys_dict a |
| | | <where> |
| | | status = 0 |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.DictEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.data.DictEntity"> |
| | | select * from lf.sys_dict where status = 0 and id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectDictTab" resultType="com.lf.server.entity.ctrl.TabEntity"> |
| | | <select id="selectDictTab" resultType="com.terra.system.entity.ctrl.TabEntity"> |
| | | select ns, tab, tab_desc, fn_get_entity(tab) entity, tableType, bak |
| | | from lf.sys_dict |
| | | <where> |
| | |
| | | order by id; |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.DictEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.DictEntity"> |
| | | insert into lf.sys_dict |
| | | (ns,tab,tab_desc,field,alias,type,len,precision,order_num,create_user,create_time,tabletype,unit,domain_na,showtype,editable,bak) |
| | | values |
| | |
| | | <?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.data.DirMapper"> |
| | | <select id="selectDir" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <mapper namespace="com.terra.system.mapper.data.DirMapper"> |
| | | <select id="selectDir" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where id = #{id} |
| | | </select> |
| | | <select id="selectByCode" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectByCode" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where code = #{code} |
| | | </select> |
| | | |
| | | <select id="selectDirAll" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectDirAll" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectDirRoot" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectDirRoot" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select a.*, fn_get_fullname(a.code, 2) fullName |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | | order by order_num, code; |
| | | </select> |
| | | |
| | | <select id="selectProject" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectProject" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select a.*, fn_get_fullname(a.code, 2) fullName |
| | | from lf.sys_dir a |
| | | <where> |
| | |
| | | order by order_num, code; |
| | | </select> |
| | | |
| | | <select id="selectDirRecursive" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectDirRecursive" resultType="com.terra.system.entity.data.DirEntity"> |
| | | with recursive rs as( |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where name = #{name} |
| | | union |
| | |
| | | order by order_num, code; |
| | | </select> |
| | | |
| | | <select id="selectRecursiveById" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectRecursiveById" resultType="com.terra.system.entity.data.DirEntity"> |
| | | with recursive rs as( |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where id = #{id} |
| | | union |
| | |
| | | order by code; |
| | | </select> |
| | | |
| | | <select id="selectByPid" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectByPid" resultType="com.terra.system.entity.data.DirEntity"> |
| | | with recursive rs as( |
| | | select a.* from lf.sys_dir a where id = #{pid} |
| | | union |
| | |
| | | order by code; |
| | | </select> |
| | | |
| | | <select id="selectDirsForPrj" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectDirsForPrj" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select a.* from lf.sys_dir a where code not like '00%' order by code; |
| | | </select> |
| | | |
| | |
| | | select coalesce(max(order_num), 0) + 1 from lf.sys_dir; |
| | | </select> |
| | | |
| | | <select id="selectDirByName" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectDirByName" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select * from lf.sys_dir |
| | | <where> |
| | | upper(name) = #{name} |
| | |
| | | </select> |
| | | |
| | | <!-- 插入一条 --> |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.DirEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.DirEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_dir_id_seq'::regclass) as id |
| | | </selectKey> |
| | |
| | | <?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.data.DomainMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.DomainMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(a.*) from lf.sys_domain a inner join lf.sys_dict b on a.dom_name = b.domain_na |
| | | where b.status = 0 |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.DomainEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.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.status = 0 |
| | | <if test="ns != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.DomainEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.data.DomainEntity"> |
| | | select * from lf.sys_domain order by dom_name,dom_code |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.DomainEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.data.DomainEntity"> |
| | | select * from lf.sys_domain where id = #{id} |
| | | </select> |
| | | |
| | |
| | | group by domain_na |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.DomainEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.DomainEntity"> |
| | | insert into lf.sys_domain |
| | | (dom_desc,dom_name,dom_code,code_desc,level,orderid,bsm,create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.data.DownloadMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.DownloadMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_download |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPageForUser" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectByPageForUser" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select *, fn_uname(create_user) createName from lf.sys_download |
| | | <where> |
| | | create_user = #{createUser} and type in (${types}) |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByGuid" resultType="com.lf.server.entity.data.DownloadEntity"> |
| | | <select id="selectByGuid" resultType="com.terra.system.entity.data.DownloadEntity"> |
| | | select * from lf.sys_download where guid = #{guid} limit 1 |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.DownloadEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.DownloadEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_download_id_seq'::regclass) as id |
| | | </selectKey> |
| | |
| | | <?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.data.LayerMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.LayerMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_layer |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.LayerEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.LayerEntity"> |
| | | select * from lf.sys_layer |
| | | <where> |
| | | <if test="cnName != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.LayerEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.data.LayerEntity"> |
| | | select a.*, |
| | | (select ns from lf.sys_dict b where b.field = 'gid' and b.tab = a.en_name) "ns", |
| | | (select json from lf.sys_publish c where c.id = a.pubid) |
| | |
| | | order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.LayerEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.data.LayerEntity"> |
| | | select * from lf.sys_layer where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.LayerEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.LayerEntity"> |
| | | insert into lf.sys_layer |
| | | (pid,cn_name,en_name,url,test_url,type,icon,level,order_num,is_show,create_user,create_time,bak,serve_type,data_type,elev,is_project) |
| | | values |
| | |
| | | <?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.data.MetaMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.MetaMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_meta |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectGdbByGuid" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectGdbByGuid" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a |
| | | where type = 'gdb' and guid = #{guid}; |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectMetasForPage" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectMetasForPage" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName, |
| | | (select coalesce(sum(dcount), 0) from lf.sys_download b inner join lf.sys_meta_down c on b.id = c.downid where c.metaid = a.id) "downCount", |
| | | (select fn_uname(download_user) from lf.sys_download b inner join lf.sys_meta_down c on b.id = c.downid where c.metaid = a.id order by download_time desc limit 1) "lastUser", |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPageForUpload" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectByPageForUpload" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPageByPid" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectPageByPid" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByGuid" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectByGuid" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a |
| | | where guid = #{guid} |
| | |
| | | limit 1 |
| | | </select> |
| | | |
| | | <select id="selectByIdsForTab" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectByIdsForTab" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.* from lf.sys_meta a |
| | | where id in (${ids}) and a.tab is not null and a.rows > 0 |
| | | order by a.tab; |
| | | </select> |
| | | |
| | | <select id="selectByIds" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectByIds" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.* from lf.sys_meta a |
| | | where id in (${ids}) |
| | | order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectMetaFiles" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectMetaFiles" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a |
| | | where id in |
| | |
| | | order by a.id desc |
| | | </select> |
| | | |
| | | <select id="selectXlsAnnex" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectXlsAnnex" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select * from lf.sys_meta |
| | | where type in ('xls', 'xlsx') and eventid is not null and tab is not null and rows > 0 and id in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectMetasByDirCode" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectMetasByDirCode" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select a.*, fn_uname(a.create_user) uname, fn_get_fullname(a.depcode, 1) depName, fn_ver(a.verid) verName, fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a |
| | | where dircode like #{dircode} and |
| | |
| | | select a.count + b.count "count" from a, b; |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.MetaEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.MetaEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_meta_id_seq'::regclass) as id |
| | | </selectKey> |
| | |
| | | <?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.data.PublishMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.PublishMapper"> |
| | | <select id="selectMetasByCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_meta |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectMetasByPage" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | <select id="selectMetasByPage" resultType="com.terra.system.entity.data.MetaEntity"> |
| | | select |
| | | (select c.url from lf.sys_meta_pub b inner join lf.sys_publish c on b.pubid = c.id where b.metaid = a.id limit 1) "url", |
| | | (select ST_AsText(c.geom) from lf.sys_meta_pub b inner join lf.sys_publish c on b.pubid = c.id where b.metaid = a.id limit 1) "geom", |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.PublishEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.PublishEntity"> |
| | | select ST_AsText(geom) "geom", a.*, fn_get_fullname(a.depid, 1) depName, fn_get_fullname(a.dirid, 2) dirName, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_publish a |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.PublishEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.data.PublishEntity"> |
| | | select * from lf.sys_publish order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.PublishEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.data.PublishEntity"> |
| | | select ST_AsText(geom) "geom", a.*, fn_get_fullname(a.depid, 1) depName, fn_get_fullname(a.dirid, 2) dirName, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_publish a |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByIds" resultType="com.lf.server.entity.data.PublishEntity"> |
| | | <select id="selectByIds" resultType="com.terra.system.entity.data.PublishEntity"> |
| | | select * from lf.sys_publish where id in (${ids}) order by id desc; |
| | | </select> |
| | | |
| | |
| | | order by code; |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.PublishEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.PublishEntity"> |
| | | insert into lf.sys_publish |
| | | (regid,name,url,path,type,status,dirid,depid,min,max,json,create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.data.StyleMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.StyleMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_style |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.StyleEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.StyleEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName, fn_rec_query(a.depid,'dep') depName, fn_rec_query(a.dirid,'dir') dirName |
| | | from lf.sys_style a |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectStyleAll" resultType="com.lf.server.entity.data.StyleEntity"> |
| | | <select id="selectStyleAll" resultType="com.terra.system.entity.data.StyleEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName, fn_rec_query(a.depid,'dep') depName, fn_rec_query(a.dirid,'dir') dirName |
| | | from lf.sys_style a order by a.id desc |
| | | </select> |
| | | |
| | | <select id="selectStyle" resultType="com.lf.server.entity.data.StyleEntity"> |
| | | <select id="selectStyle" resultType="com.terra.system.entity.data.StyleEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName, fn_rec_query(a.depid,'dep') depName, fn_rec_query(a.dirid,'dir') dirName |
| | | from lf.sys_style a where a.id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertStyle" parameterType="com.lf.server.entity.data.StyleEntity"> |
| | | <insert id="insertStyle" parameterType="com.terra.system.entity.data.StyleEntity"> |
| | | insert into lf.sys_style |
| | | (name,type,dirid,depid,ver,status,precision,descr,fname,vname,file_guid,view_guid,create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.data.TaskMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.TaskMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_task |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.TaskEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.TaskEntity"> |
| | | select a.*, fn_get_fullname(a.depcode, 1) depName, fn_get_fullname(a.dircode, 2) dirName, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_task a |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.data.TaskEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.data.TaskEntity"> |
| | | select * from lf.sys_task order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.data.TaskEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.data.TaskEntity"> |
| | | select * from lf.sys_task where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.TaskEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.data.TaskEntity"> |
| | | insert into lf.sys_task |
| | | (name,status,type,descr,err,ip,pid,gids,depcode,dircode,create_user,create_time) |
| | | values |
| | |
| | | <?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.data.UploadMapper"> |
| | | <select id="selectCoords" resultType="com.lf.server.entity.data.CoordEntity"> |
| | | <mapper namespace="com.terra.system.mapper.data.UploadMapper"> |
| | | <select id="selectCoords" resultType="com.terra.system.entity.data.CoordEntity"> |
| | | select * from lf.sys_coord |
| | | <where> |
| | | 1 = 1 |
| | |
| | | select count(*) from lf.sys_coord where epsgcode = #{epsgCode} |
| | | </select> |
| | | |
| | | <select id="selectProject" resultType="com.lf.server.entity.data.DirEntity"> |
| | | <select id="selectProject" resultType="com.terra.system.entity.data.DirEntity"> |
| | | select * from lf.sys_dir where pid = 0 and id > 1 order by order_num, code; |
| | | </select> |
| | | |
| | | <select id="selectFmeLog" resultType="com.lf.server.entity.data.FmeLogEntity"> |
| | | <select id="selectFmeLog" resultType="com.terra.system.entity.data.FmeLogEntity"> |
| | | select * from lf.sys_fme_log where parentid = #{parentid}; |
| | | </select> |
| | | </mapper> |
| | |
| | | <?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.data.VerMapper"> |
| | | <mapper namespace="com.terra.system.mapper.data.VerMapper"> |
| | | <!-- 统计行数 --> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_ver a |
| | |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectByPage" resultType="com.lf.server.entity.data.VerEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.data.VerEntity"> |
| | | select a.*, fn_rec_query(a.dirid, 'dir') depName, fn_uname(create_user) createName from lf.sys_ver a |
| | | <where> |
| | | 1=1 |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectVersionAll" resultType="com.lf.server.entity.data.VerEntity"> |
| | | <select id="selectVersionAll" resultType="com.terra.system.entity.data.VerEntity"> |
| | | select * from lf.sys_ver order by id desc |
| | | </select> |
| | | |
| | | <select id="selectVersion" resultType="com.lf.server.entity.data.VerEntity"> |
| | | <select id="selectVersion" resultType="com.terra.system.entity.data.VerEntity"> |
| | | select * from lf.sys_ver where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByDirid" resultType="com.lf.server.entity.data.VerEntity"> |
| | | <select id="selectByDirid" resultType="com.terra.system.entity.data.VerEntity"> |
| | | select * from lf.sys_ver where dirid = 0 or dirid = #{dirid} |
| | | </select> |
| | | |
| | | <insert id="insertVersion" parameterType="com.lf.server.entity.data.VerEntity"> |
| | | <insert id="insertVersion" parameterType="com.terra.system.entity.data.VerEntity"> |
| | | insert into lf.sys_ver |
| | | (dirid,name,descr,create_user,create_time) |
| | | values |
| | |
| | | <?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.show.ApplyMapper"> |
| | | <mapper namespace="com.terra.system.mapper.show.ApplyMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_apply a inner join lf.sys_user b on a.userid = b.id |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.show.ApplyEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.show.ApplyEntity"> |
| | | select |
| | | case a.userid when #{userid} then guid else null end "guid", a.*, b.uname, |
| | | (select count(*) from lf.sys_flow c where c.applyid = a.id and c.status = 0 and c.userid = #{userid}) isVerify |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.show.ApplyEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.show.ApplyEntity"> |
| | | select * from lf.sys_apply order by id desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.show.ApplyEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.show.ApplyEntity"> |
| | | select * from lf.sys_apply where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectUserByDepcode" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | <select id="selectUserByDepcode" resultType="com.terra.system.entity.sys.UserEntity"> |
| | | select c.* from lf.sys_role a inner join lf.sys_role_user b on a.id = b.roleid |
| | | inner join lf.sys_user c on b.userid = c.id |
| | | where a.is_admin = 2 and c.depcode = #{depcode} |
| | |
| | | where a.status between 0 and 9 and b.status = 0 and b.userid = #{userid} |
| | | </select> |
| | | |
| | | <select id="selectFlows" resultType="com.lf.server.entity.show.FlowEntity"> |
| | | <select id="selectFlows" resultType="com.terra.system.entity.show.FlowEntity"> |
| | | select a.*, b.uname, fn_get_fullname(a.depcode, 1) depName |
| | | from lf.sys_flow a inner join lf.sys_user b on a.userid = b.id |
| | | where a.applyid = #{applyid} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.show.ApplyEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.show.ApplyEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_apply_id_seq'::regclass) as id |
| | | </selectKey> |
| | |
| | | <?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.show.FlowMapper"> |
| | | <mapper namespace="com.terra.system.mapper.show.FlowMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_flow |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.show.FlowEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.show.FlowEntity"> |
| | | select * from lf.sys_flow |
| | | <where> |
| | | <if test="userid != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.show.FlowEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.show.FlowEntity"> |
| | | select * from lf.sys_flow order by id desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.show.FlowEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.show.FlowEntity"> |
| | | select * from lf.sys_flow where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.show.FlowEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.show.FlowEntity"> |
| | | insert into lf.sys_flow |
| | | (applyid,depcode,userid,status,descr,create_user,create_time) |
| | | values |
| | |
| | | <?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.show.MarkMapper"> |
| | | <mapper namespace="com.terra.system.mapper.show.MarkMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_mark |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.show.MarkEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.show.MarkEntity"> |
| | | select * from lf.sys_mark |
| | | <where> |
| | | <if test="userid != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.show.MarkEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.show.MarkEntity"> |
| | | select * from lf.sys_mark order by id desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.show.MarkEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.show.MarkEntity"> |
| | | select * from lf.sys_mark where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.show.MarkEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.show.MarkEntity"> |
| | | insert into lf.sys_mark |
| | | (name,wkt,create_user,create_time) |
| | | values |
| | |
| | | <?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.show.ModelMapper"> |
| | | <mapper namespace="com.terra.system.mapper.show.ModelMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_model |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.show.ModelEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.show.ModelEntity"> |
| | | select * from lf.sys_model |
| | | <where> |
| | | <if test="layerid != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.show.ModelEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.show.ModelEntity"> |
| | | select * from lf.sys_model order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.show.ModelEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.show.ModelEntity"> |
| | | select * from lf.sys_model where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectModelByGuid" resultType="com.lf.server.entity.show.ModelEntity"> |
| | | <select id="selectModelByGuid" resultType="com.terra.system.entity.show.ModelEntity"> |
| | | select * from lf.sys_model where layerid = #{layerid} and modelid = #{modelid} limit 1; |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.show.ModelEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.show.ModelEntity"> |
| | | insert into lf.sys_model |
| | | (layerid,modelid,guid,name,type,info,url,icon,create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.show.OneMapMapper"> |
| | | <resultMap type="com.lf.server.entity.show.OneMapEntity" id="OneMapResult"> |
| | | <mapper namespace="com.terra.system.mapper.show.OneMapMapper"> |
| | | <resultMap type="com.terra.system.entity.show.OneMapEntity" id="OneMapResult"> |
| | | <result property="value" column="value" /> |
| | | <result property="key" column="key" /> |
| | | </resultMap> |
| | |
| | | </select> |
| | | |
| | | <!-- 统计项目类型 2 --> |
| | | <select id="selectProjectTypeOne" resultType="com.lf.server.entity.show.OneMapEntity"> |
| | | <select id="selectProjectTypeOne" resultType="com.terra.system.entity.show.OneMapEntity"> |
| | | select * from lf.sys_meta ${endSql} |
| | | </select> |
| | | |
| | | <!-- 统计项目类型 2 --> |
| | | <select id="selectProjectType2" resultType="com.lf.server.entity.show.OneMapEntity"> |
| | | <select id="selectProjectType2" resultType="com.terra.system.entity.show.OneMapEntity"> |
| | | select modular1,count(*) from lf.sys_operate group by modular1 order by modular1; |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | |
| | | <!-- 按大类统计 --> |
| | | <select id="countByMajor" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countByMajor" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select '测绘(ESV)' "m1", '数字线划图' "m2", '平方千米' "m3", cast( coalesce(sum(area), 0) / 1000000 as decimal(20, 2) ) "sizes" from lf.sys_line_buffer |
| | | union all |
| | | select '测绘(ESV)' "m1", '数字正射影像图' "m2", '平方千米' "m3", ( |
| | |
| | | <?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.show.PipelineMapper"> |
| | | <select id="selectPipelines" resultType="com.lf.server.entity.show.PipelineEntity"> |
| | | <mapper namespace="com.terra.system.mapper.show.PipelineMapper"> |
| | | <select id="selectPipelines" resultType="com.terra.system.entity.show.PipelineEntity"> |
| | | select gid, pipename, segname, ST_AsText(ST_LineMerge(geom)) "wkt" |
| | | from bs.m_pipesegment |
| | | <where> |
| | |
| | | order by pipename, segname; |
| | | </select> |
| | | |
| | | <select id="selectSegNames" resultType="com.lf.server.entity.show.PipelineEntity"> |
| | | <select id="selectSegNames" resultType="com.terra.system.entity.show.PipelineEntity"> |
| | | select gid, pipename, segname from bs.m_pipesegment order by pipename, segname; |
| | | </select> |
| | | |
| | | <select id="selectPipeAnalysis" resultType="com.lf.server.entity.show.PipelineEntity"> |
| | | <select id="selectPipeAnalysis" resultType="com.terra.system.entity.show.PipelineEntity"> |
| | | select row_number() over() as gid, a.name as acrossName, b.segname as segName, b.remarks, b.pipename as pipeName, |
| | | cast( st_length( st_geographyfromtext( st_astext( st_intersection(ST_MakeValid(a.geom), ST_MakeValid(b.geom) ) ) ) ) as decimal(20, 2) ) AS acrossLength, |
| | | st_astext( st_intersection( ST_MakeValid(a.geom), ST_MakeValid(b.geom) ) ) as wkt |
| | |
| | | <?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.sys.ArgsMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.ArgsMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_args |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.ArgsEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.ArgsEntity"> |
| | | select * from lf.sys_args |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.ArgsEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.ArgsEntity"> |
| | | select * from lf.sys_args order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.ArgsEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.ArgsEntity"> |
| | | select * from lf.sys_args where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.ArgsEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.ArgsEntity"> |
| | | insert into lf.sys_args |
| | | (name,cvalue,dvalue,descr,create_user,create_time) |
| | | values |
| | |
| | | <?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.sys.AttachMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.AttachMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_attach |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByGuid" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectByGuid" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach where guid = #{guid} limit 1 |
| | | </select> |
| | | |
| | | <select id="selectByGuids" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectByGuids" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach where guid in |
| | | <foreach item="guid" collection="guids" index="index" open="(" separator="," close=")"> |
| | | #{guid} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="selectByTabAndGuid" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectByTabAndGuid" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach where tab = #{tab} and tab_guid = #{tabGuid} and guid = #{guid} limit 1 |
| | | </select> |
| | | |
| | | <select id="selectByTabGuids" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectByTabGuids" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach |
| | | <where> |
| | | tab = #{tab} |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByTab" resultType="com.lf.server.entity.sys.AttachEntity"> |
| | | <select id="selectByTab" resultType="com.terra.system.entity.sys.AttachEntity"> |
| | | select * from lf.sys_attach where tab = #{tab} and tab_guid = #{guid} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.AttachEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.AttachEntity"> |
| | | insert into lf.sys_attach |
| | | (name,tab,tab_guid,guid,path,sizes,create_user,create_time) |
| | | values |
| | |
| | | </update> |
| | | |
| | | <!-- where count > 0 and update_time is null and create_time > now()::timestamp + '-5 min' and position(tcdm in '${tabs}') > 0; --> |
| | | <select id="selectFmeLogs" resultType="com.lf.server.entity.data.FmeLogEntity"> |
| | | <select id="selectFmeLogs" resultType="com.terra.system.entity.data.FmeLogEntity"> |
| | | select * from lf.sys_fme_log |
| | | where count > 0 and update_time is null and position(tcdm in '${tabs}') > 0; |
| | | </select> |
| | |
| | | <?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.sys.AuthMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.AuthMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_auth |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.AuthEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.AuthEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName from lf.sys_auth a |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | ) |
| | | </select> |
| | | |
| | | <select id="selectByPageForMenu" resultType="com.lf.server.entity.sys.AuthEntity"> |
| | | <select id="selectByPageForMenu" resultType="com.terra.system.entity.sys.AuthEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_auth a where not exists (select b.id from lf.sys_menu_auth b |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAuthAll" resultType="com.lf.server.entity.sys.AuthEntity"> |
| | | <select id="selectAuthAll" resultType="com.terra.system.entity.sys.AuthEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_auth a |
| | | order by id |
| | | </select> |
| | | |
| | | <select id="selectAuth" resultType="com.lf.server.entity.sys.AuthEntity"> |
| | | <select id="selectAuth" resultType="com.terra.system.entity.sys.AuthEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_auth a |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertAuth" parameterType="com.lf.server.entity.sys.AuthEntity"> |
| | | <insert id="insertAuth" parameterType="com.terra.system.entity.sys.AuthEntity"> |
| | | insert into lf.sys_auth |
| | | (name,tag,create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.sys.BlacklistMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.BlacklistMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_blacklist |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.BlacklistEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.BlacklistEntity"> |
| | | select a.*,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_blacklist a |
| | | <where> |
| | | 1 = 1 |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.BlacklistEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.BlacklistEntity"> |
| | | select a.*,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_blacklist a order by a.id desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.BlacklistEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.BlacklistEntity"> |
| | | select a.*,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_blacklist a where a.id = #{id} |
| | | </select> |
| | | |
| | |
| | | select ip from lf.sys_blacklist where type = #{type} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.BlacklistEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.BlacklistEntity"> |
| | | insert into lf.sys_blacklist |
| | | (ip,type,visit,descr,create_user,create_time) |
| | | values |
| | |
| | | <?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.sys.DepMapper"> |
| | | <resultMap id="resultMap" type="com.lf.server.entity.sys.DepEntity"> |
| | | <mapper namespace="com.terra.system.mapper.sys.DepMapper"> |
| | | <resultMap id="resultMap" type="com.terra.system.entity.sys.DepEntity"> |
| | | <id property="id" column="id"></id> |
| | | <result property="orderNum" column="order_num"></result> |
| | | <result property="createUser" column="create_user"></result> |
| | |
| | | <result property="updateUser" column="update_user"></result> |
| | | <result property="updateTime" column="update_time"></result> |
| | | </resultMap> |
| | | <select id="selectDepAll" resultMap="resultMap" resultType="com.lf.server.entity.sys.DepEntity"> |
| | | <select id="selectDepAll" resultMap="resultMap" resultType="com.terra.system.entity.sys.DepEntity"> |
| | | select * from lf.sys_dep order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectDepRecursive" resultMap="resultMap" resultType="com.lf.server.entity.sys.DepEntity"> |
| | | <select id="selectDepRecursive" resultMap="resultMap" resultType="com.terra.system.entity.sys.DepEntity"> |
| | | with recursive rs as( |
| | | select * from lf.sys_dep where name=#{name} |
| | | union |
| | |
| | | select * FROM rs order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectDep" resultMap="resultMap" resultType="com.lf.server.entity.sys.DepEntity"> |
| | | <select id="selectDep" resultMap="resultMap" resultType="com.terra.system.entity.sys.DepEntity"> |
| | | select * from lf.sys_dep where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectDepsByCodes" resultType="com.lf.server.entity.ctrl.IdNameEntity"> |
| | | <select id="selectDepsByCodes" resultType="com.terra.system.entity.ctrl.IdNameEntity"> |
| | | select id "id",fn_get_fullname(code, 1) "name" from lf.sys_dep where code in |
| | | <foreach item="code" collection="codes" index="index" open="(" separator="," close=")"> |
| | | #{code} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insertDep" parameterType="com.lf.server.entity.sys.DepEntity"> |
| | | <insert id="insertDep" parameterType="com.terra.system.entity.sys.DepEntity"> |
| | | insert into lf.sys_dep |
| | | (pid,name,sname,code,uncode,addr,contact,fax,email,post,website,level,order_num,create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.sys.DownlogMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.DownlogMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_downlog a inner join lf.sys_user b on a.create_user = b.id |
| | | inner join lf.sys_download c on a.downid = c.id |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.DownlogEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.DownlogEntity"> |
| | | select a.*,b.uname,c.name,c.type,c.sizes from lf.sys_downlog a inner join lf.sys_user b on a.create_user = b.id |
| | | inner join lf.sys_download c on a.downid = c.id |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.DownlogEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.DownlogEntity"> |
| | | select * from lf.sys_downlog order by id desc |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.DownlogEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.DownlogEntity"> |
| | | select * from lf.sys_downlog where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.DownlogEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.DownlogEntity"> |
| | | insert into lf.sys_downlog |
| | | (downid,ip,create_user,create_time) |
| | | values |
| | |
| | | <?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.sys.LoginMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.LoginMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_login a inner join lf.sys_user b on a.userid = b.id |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.LoginEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.LoginEntity"> |
| | | select a.*,b.uname from lf.sys_login a inner join lf.sys_user b on a.userid = b.id |
| | | <where> |
| | | 1 = 1 |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectLoginAll" resultType="com.lf.server.entity.sys.LoginEntity"> |
| | | <select id="selectLoginAll" resultType="com.terra.system.entity.sys.LoginEntity"> |
| | | select * from lf.sys_login order by id desc |
| | | </select> |
| | | |
| | | <select id="selectLogin" resultType="com.lf.server.entity.sys.LoginEntity"> |
| | | <select id="selectLogin" resultType="com.terra.system.entity.sys.LoginEntity"> |
| | | select * from lf.sys_login where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertLogin" parameterType="com.lf.server.entity.sys.LoginEntity"> |
| | | <insert id="insertLogin" parameterType="com.terra.system.entity.sys.LoginEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_login_id_seq'::regclass) as id |
| | | </selectKey> |
| | |
| | | update lf.sys_login set appid=#{appid},ip=#{ip},type=#{type},status=#{status},descr=#{descr},userid=#{userid},optime=now() where id=#{id} |
| | | </update> |
| | | |
| | | <select id="selectLoginCounts" resultType="com.lf.server.entity.sys.LoginEntity"> |
| | | <select id="selectLoginCounts" resultType="com.terra.system.entity.sys.LoginEntity"> |
| | | select to_char(optime,'yyyy-mm-dd') as optime,count(*) from lf.sys_login where optime between (select optime - interval '30 day') |
| | | and optime group by to_char(optime, 'yyyy-mm-dd') order by to_char(optime, 'yyyy-mm-dd') asc |
| | | </select> |
| | |
| | | <?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.sys.MenuAuthMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.MenuAuthMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_menu_auth |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.MenuAuthEntity"> |
| | | select a.*,b.name as authName from lf.sys_menu_auth a inner join lf.sys_auth b |
| | | on a.authid = b.id |
| | | <where> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectByPageForRole" resultType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | <select id="selectByPageForRole" resultType="com.terra.system.entity.sys.MenuAuthEntity"> |
| | | select a.*,c.name from lf.sys_menu_auth a inner join lf.sys_auth c on a.authid = c.id |
| | | where not exists (select b.id from lf.sys_role_menu_auth b where b.menu_auth_id = a.id |
| | | <if test="roleid != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.MenuAuthEntity"> |
| | | select * from lf.sys_menu_auth order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.MenuAuthEntity"> |
| | | select * from lf.sys_menu_auth where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.MenuAuthEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.MenuAuthEntity"> |
| | | insert into lf.sys_menu_auth |
| | | (menuid,authid,create_user,create_time) |
| | | values |
| | |
| | | <?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.sys.MenuMapper"> |
| | | <resultMap id="resultMap" type="com.lf.server.entity.sys.MenuEntity"> |
| | | <mapper namespace="com.terra.system.mapper.sys.MenuMapper"> |
| | | <resultMap id="resultMap" type="com.terra.system.entity.sys.MenuEntity"> |
| | | <id property="id" column="id"></id> |
| | | <result property="cnName" column="cn_name"></result> |
| | | <result property="enName" column="en_name"></result> |
| | |
| | | <result property="updateUser" column="update_user"></result> |
| | | <result property="updateTime" column="update_time"></result> |
| | | </resultMap> |
| | | <select id="selectMenuAll" resultMap="resultMap" resultType="com.lf.server.entity.sys.MenuEntity"> |
| | | <select id="selectMenuAll" resultMap="resultMap" resultType="com.terra.system.entity.sys.MenuEntity"> |
| | | select * from lf.sys_menu order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectMenuRecursive" resultMap="resultMap" resultType="com.lf.server.entity.sys.MenuEntity"> |
| | | <select id="selectMenuRecursive" resultMap="resultMap" resultType="com.terra.system.entity.sys.MenuEntity"> |
| | | with recursive rs as( |
| | | select * from lf.sys_menu where cn_name=#{name} |
| | | union |
| | |
| | | select * FROM rs order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectMenu" resultMap="resultMap" resultType="com.lf.server.entity.sys.MenuEntity"> |
| | | <select id="selectMenu" resultMap="resultMap" resultType="com.terra.system.entity.sys.MenuEntity"> |
| | | select * from lf.sys_menu where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertMenu" parameterType="com.lf.server.entity.sys.MenuEntity"> |
| | | <insert id="insertMenu" parameterType="com.terra.system.entity.sys.MenuEntity"> |
| | | insert into lf.sys_menu |
| | | (pid,cn_name,en_name,url,perms,type,css,icon,level,order_num,is_show, create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.sys.MetaDownMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.MetaDownMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_meta_down |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.MetaDownEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.MetaDownEntity"> |
| | | select * from lf.sys_meta_down |
| | | <where> |
| | | <if test="metaid != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.MetaDownEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.MetaDownEntity"> |
| | | select * from lf.sys_meta_down order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.MetaDownEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.MetaDownEntity"> |
| | | select * from lf.sys_meta_down where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.MetaDownEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.MetaDownEntity"> |
| | | insert into lf.sys_meta_down |
| | | (metaid,downid,create_user,create_time) |
| | | values |
| | |
| | | <?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.sys.OperateMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.OperateMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_operate a inner join lf.sys_user b on a.userid = b.id |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.OperateEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.OperateEntity"> |
| | | select a.*,b.uname from lf.sys_operate a inner join lf.sys_user b on a.userid = b.id |
| | | <where> |
| | | 1 = 1 |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectOperateAll" resultType="com.lf.server.entity.sys.OperateEntity"> |
| | | <select id="selectOperateAll" resultType="com.terra.system.entity.sys.OperateEntity"> |
| | | select * from lf.sys_operate order by id desc |
| | | </select> |
| | | |
| | | <select id="selectOperate" resultType="com.lf.server.entity.sys.OperateEntity"> |
| | | <select id="selectOperate" resultType="com.terra.system.entity.sys.OperateEntity"> |
| | | select * from lf.sys_operate where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertOperate" parameterType="com.lf.server.entity.sys.OperateEntity"> |
| | | <insert id="insertOperate" parameterType="com.terra.system.entity.sys.OperateEntity"> |
| | | insert into lf.sys_operate |
| | | (modular1,modular2,url,ip,exec,clazz,type,userid,optime,bak) |
| | | values |
| | |
| | | update lf.sys_operate set modular1=#{modular1},modular2=#{modular2},url=#{url},ip=#{ip},exec=#{exec},clazz=#{clazz},type=#{type},userid=#{userid},optime=now(),bak=#{bak} where id=#{id} |
| | | </update> |
| | | |
| | | <select id="operateCount" resultType="com.lf.server.entity.sys.OperateEntity"> |
| | | <select id="operateCount" resultType="com.terra.system.entity.sys.OperateEntity"> |
| | | select modular2,count(*) from lf.sys_operate group by modular2 |
| | | </select> |
| | | </mapper> |
| | |
| | | <?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.sys.ReportMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.ReportMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_report |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.ReportEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.ReportEntity"> |
| | | select a.*,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_report a |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.ReportEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.ReportEntity"> |
| | | select * from lf.sys_report order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.ReportEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.ReportEntity"> |
| | | select * from lf.sys_report where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.ReportEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.ReportEntity"> |
| | | insert into lf.sys_report |
| | | (name,type,fname,guid,code,create_user,create_time,bak) |
| | | values |
| | |
| | | </update> |
| | | |
| | | <!-- 数据量统计 --> |
| | | <select id="countSizes" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countSizes" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select fn_get_fullname(depcode, 1) "m1", cast(sum(sizes) as decimal(18, 3)) "sizes", count(*) "count" |
| | | from lf.sys_meta |
| | | group by depcode |
| | |
| | | </select> |
| | | |
| | | <!-- 按文件类型统计 --> |
| | | <select id="countSizesByType" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countSizesByType" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select type "m1", cast(sum(sizes) as decimal(18, 3)) "sizes", count(*) "count" |
| | | from lf.sys_meta |
| | | group by type |
| | |
| | | </select> |
| | | |
| | | <!-- 服务调用量统计 --> |
| | | <select id="countServices" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countServices" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", count(*) "count" |
| | | from lf.sys_serve_log |
| | | group by name |
| | |
| | | </select> |
| | | |
| | | <!-- 用户流量统计 --> |
| | | <select id="countOperates" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countOperates" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select modular1 "m1", modular2 "m2", count(*) "count" |
| | | from lf.sys_operate |
| | | group by modular1,modular2 |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计数据 --> |
| | | <select id="countSizesByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countSizesByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(sizes), 0) as decimal(18, 3) ) from lf.sys_meta b where b.dircode like a.code || '%') as "sizes", |
| | | (select count(*) from lf.sys_meta b where b.dircode like a.code || '%') "count" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计钻孔数据 --> |
| | | <select id="countExplorationPoints" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countExplorationPoints" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select |
| | | name "m1", a.code "m3", 0.0 "area", |
| | | (select count(*) from bs.s_explorationpoint b where dirid like a.code || '%') "count", |
| | |
| | | </select> |
| | | |
| | | <!-- 根据项目编码查询钻孔数据坐标点 --> |
| | | <select id="selectExplorationPoints" resultType="com.lf.server.entity.ctrl.CoordinateEntity"> |
| | | <select id="selectExplorationPoints" resultType="com.terra.system.entity.ctrl.CoordinateEntity"> |
| | | select ST_X(geom) "x", ST_Y(geom) "y" |
| | | from bs.s_explorationpoint b |
| | | <where> |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计数字高程模型面积 --> |
| | | <select id="countDemAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countDemAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) from lf.sys_meta b |
| | | inner join lf.sys_dir c on b.dircode = c.code |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计三维地形模型面积:mpt --> |
| | | <select id="countMptAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countMptAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", 0.0 "area" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计倾斜摄影模型面积:osgb --> |
| | | <select id="countOsgbAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countOsgbAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(area), 0) as decimal(20, 2) ) from lf.sys_meta b |
| | | where b.type = 'osgb' and b.dircode like a.code || '%') "area" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计激光点云模型面积:las,laz --> |
| | | <select id="countLasAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countLasAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(area), 0) as decimal(20, 2) ) from lf.sys_meta b |
| | | where b.type in ('las', 'laz') and b.dircode like a.code || '%') "area" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计勘察工点个数 --> |
| | | <select id="countSurveyWorksiteByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countSurveyWorksiteByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.s_surveyworksite b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计勘察报告个数 --> |
| | | <select id="countExplorationReportByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countExplorationReportByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.s_explorationpoint b |
| | | inner join lf.sys_attach c on b.eventid = c.tab_guid |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计崩塌个数 --> |
| | | <select id="countCollapseByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countCollapseByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_collapse b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计泥石流个数 --> |
| | | <select id="countDebrisFlowByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countDebrisFlowByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_debrisflow b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计地面塌陷个数 --> |
| | | <select id="countGroundCollapseByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countGroundCollapseByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_ground_collapse b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计高陡边坡个数 --> |
| | | <select id="countHighSteepSlopeByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countHighSteepSlopeByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_highandsteep_slope b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计滑坡个数 --> |
| | | <select id="countLandSlideByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countLandSlideByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_landslide b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计不稳定斜坡个数 --> |
| | | <select id="countUnstableSlopeByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countUnstableSlopeByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_unstable_slope b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计水毁个数 --> |
| | | <select id="countWaterDamageByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countWaterDamageByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_water_damage b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 统计数字线划图面积 --> |
| | | <select id="countDlgAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countDlgAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select dir "m1", cast( coalesce(sum(area), 0) as decimal(20, 2) ) "area" |
| | | from lf.sys_line_buffer |
| | | group by code, dir |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计数字正射影像图面积 --> |
| | | <select id="countDomAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countDomAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) from lf.sys_meta b |
| | | inner join lf.sys_dir c on b.dircode = c.code |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计管线长度 --> |
| | | <select id="countLineLength" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countLineLength" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum( ST_Length( ST_GeographyFromText( ST_AsText(geom) ) ) ) / 1000, 0) as decimal(20, 2) ) |
| | | from bs.m_pipeline b where b.dirid like a.code || '%') as "len" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计勘探点个数 --> |
| | | <select id="countExplorationPointByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countExplorationPointByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.s_explorationpoint b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计三维地质模型面积 --> |
| | | <select id="countGeoModelAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countGeoModelAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) |
| | | from lf.sys_meta b where b.type in ('fbx', 'ifc') and b.dircode like a.code || '%') "area" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计地灾点个数 --> |
| | | <select id="countGeologicHazardByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countGeologicHazardByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bd.b_geologic_hazard b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 项目数据分类统计 --> |
| | | <select id="countVariousDataByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countVariousDataByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | (select '数字线划图' "m1", 'area' "m2", 0 "count", cast( coalesce(sum(area), 0) as decimal(20, 2) ) "area", 0 "len" |
| | | from lf.sys_line_buffer |
| | | <where> |
| | |
| | | <?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.sys.ResMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.ResMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_res |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.ResEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.ResEntity"> |
| | | select a.*,fn_rec_query(a.depid, 'dep') depName,fn_rec_query(a.dirid, 'dir') dirName,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_res a |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | ) |
| | | </select> |
| | | |
| | | <select id="selectByPageForRole" resultType="com.lf.server.entity.sys.ResEntity"> |
| | | <select id="selectByPageForRole" resultType="com.terra.system.entity.sys.ResEntity"> |
| | | select a.* from lf.sys_res a where not exists (select b.id from lf.sys_role_res b |
| | | <where> |
| | | b.resid = a.id |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectResAll" resultType="com.lf.server.entity.sys.ResEntity"> |
| | | <select id="selectResAll" resultType="com.terra.system.entity.sys.ResEntity"> |
| | | select * from lf.sys_res order by id desc |
| | | </select> |
| | | |
| | | <select id="selectRes" resultType="com.lf.server.entity.sys.ResEntity"> |
| | | <select id="selectRes" resultType="com.terra.system.entity.sys.ResEntity"> |
| | | select * from lf.sys_res where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertRes" parameterType="com.lf.server.entity.data.DictEntity"> |
| | | <insert id="insertRes" parameterType="com.terra.system.entity.data.DictEntity"> |
| | | insert into lf.sys_res |
| | | (name,server,source,depid,dirid,code,descr,img,create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.sys.ResOpMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.ResOpMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_res_op a inner join lf.sys_user b on a.userid = b.id inner join lf.sys_res c on a.resid=c.id |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.ResOpEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.ResOpEntity"> |
| | | select a.*,b.uname,c.name from lf.sys_res_op a inner join lf.sys_user b on a.userid = b.id inner join lf.sys_res c on a.resid=c.id |
| | | <where> |
| | | 1 = 1 |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectResOpAll" resultType="com.lf.server.entity.sys.ResOpEntity"> |
| | | <select id="selectResOpAll" resultType="com.terra.system.entity.sys.ResOpEntity"> |
| | | select * from lf.sys_res_op order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectResOp" resultType="com.lf.server.entity.sys.ResOpEntity"> |
| | | <select id="selectResOp" resultType="com.terra.system.entity.sys.ResOpEntity"> |
| | | select * from lf.sys_res_op where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertResOp" parameterType="com.lf.server.entity.sys.ResOpEntity"> |
| | | <insert id="insertResOp" parameterType="com.terra.system.entity.sys.ResOpEntity"> |
| | | insert into lf.sys_res_op |
| | | (resid,type,ip,userid,optime) |
| | | values |
| | |
| | | <?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.sys.RoleMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.RoleMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_role a |
| | | <where> |
| | |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.RoleEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.RoleEntity"> |
| | | select a.*,fn_rec_query(a.depid, 'dep') depName,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_role a |
| | | <where> |
| | | 1=1 |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectRoleAll" resultType="com.lf.server.entity.sys.RoleEntity"> |
| | | <select id="selectRoleAll" resultType="com.terra.system.entity.sys.RoleEntity"> |
| | | select a.*,fn_rec_query(a.depid, 'dep') depName,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_role a order by a.id desc |
| | | </select> |
| | | |
| | | <select id="selectRole" resultType="com.lf.server.entity.sys.RoleEntity"> |
| | | <select id="selectRole" resultType="com.terra.system.entity.sys.RoleEntity"> |
| | | select a.*,fn_rec_query(a.depid, 'dep') depName,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_role a where a.id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertRole" parameterType="com.lf.server.entity.sys.RoleEntity"> |
| | | <insert id="insertRole" parameterType="com.terra.system.entity.sys.RoleEntity"> |
| | | insert into lf.sys_role |
| | | (depid,name,descr,is_admin,create_user,create_time,bak) |
| | | values |
| | |
| | | <?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.sys.RoleMenuAuthMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.RoleMenuAuthMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_role_menu_auth |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.RoleMenuAuthEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.RoleMenuAuthEntity"> |
| | | select * from lf.sys_role_menu_auth |
| | | <where> |
| | | <if test="roleid != null"> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPageForRole" resultType="com.lf.server.entity.sys.RoleMenuAuthEntity"> |
| | | <select id="selectByPageForRole" resultType="com.terra.system.entity.sys.RoleMenuAuthEntity"> |
| | | select a.*,b.menuid,c.name from lf.sys_role_menu_auth a inner join lf.sys_menu_auth b on a.menu_auth_id = b.id inner join lf.sys_auth c on b.authid = c.id |
| | | <where> |
| | | 1 = 1 |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.RoleMenuAuthEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.RoleMenuAuthEntity"> |
| | | select * from lf.sys_role_menu_auth order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.RoleMenuAuthEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.RoleMenuAuthEntity"> |
| | | select * from lf.sys_role_menu_auth where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.RoleMenuAuthEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.RoleMenuAuthEntity"> |
| | | insert into lf.sys_role_menu_auth |
| | | (roleid,menu_auth_id,create_user,create_time) |
| | | values |
| | |
| | | <?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.sys.RoleResMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.RoleResMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_role_res |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.RoleResEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.RoleResEntity"> |
| | | select a.*,b.name as resName from lf.sys_role_res a inner join lf.sys_res b |
| | | on a.resid = b.id |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.RoleResEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.RoleResEntity"> |
| | | select * from lf.sys_role_res order by id; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.RoleResEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.RoleResEntity"> |
| | | select * from lf.sys_role_res where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.RoleResEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.RoleResEntity"> |
| | | insert into lf.sys_role_res |
| | | (roleid,resid,create_user,create_time) |
| | | values |
| | |
| | | <?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.sys.RoleUserMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.RoleUserMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_role_user a |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.RoleUserEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.RoleUserEntity"> |
| | | select a.*,fn_uname(a.userid) uname from lf.sys_role_user a |
| | | <where> |
| | | <if test="roleid != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.RoleUserEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.RoleUserEntity"> |
| | | select a.*,fn_uname(a.userid) uname from lf.sys_role_user a order by a.id |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.RoleUserEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.RoleUserEntity"> |
| | | select a.*,fn_uname(a.userid) uname from lf.sys_role_user a where a.id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.RoleUserEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.RoleUserEntity"> |
| | | insert into lf.sys_role_user |
| | | (roleid,userid,create_user,create_time) |
| | | values |
| | |
| | | <?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.sys.TokenMapper"> |
| | | <resultMap id="resultMap" type="com.lf.server.entity.sys.TokenEntity"> |
| | | <mapper namespace="com.terra.system.mapper.sys.TokenMapper"> |
| | | <resultMap id="resultMap" type="com.terra.system.entity.sys.TokenEntity"> |
| | | <id property="id" column="id"></id> |
| | | <result property="createUser" column="create_user"></result> |
| | | <result property="createTime" column="create_time"></result> |
| | |
| | | </select> |
| | | |
| | | <!-- 分页查询 --> |
| | | <select id="selectByPage" resultMap="resultMap" resultType="com.lf.server.entity.sys.TokenEntity"> |
| | | <select id="selectByPage" resultMap="resultMap" resultType="com.terra.system.entity.sys.TokenEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_token a |
| | | <where> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectToken" resultMap="resultMap" resultType="com.lf.server.entity.sys.TokenEntity"> |
| | | <select id="selectToken" resultMap="resultMap" resultType="com.terra.system.entity.sys.TokenEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_token a |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByIds" resultType="com.lf.server.entity.sys.TokenEntity"> |
| | | <select id="selectByIds" resultType="com.terra.system.entity.sys.TokenEntity"> |
| | | select * from lf.sys_token where id in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="selectOneById" resultType="com.lf.server.entity.sys.TokenEntity"> |
| | | <select id="selectOneById" resultType="com.terra.system.entity.sys.TokenEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_token a |
| | | where id = #{id} and expire > now() limit 1 |
| | | </select> |
| | | |
| | | <select id="selectOneByToken" resultType="com.lf.server.entity.sys.TokenEntity"> |
| | | <select id="selectOneByToken" resultType="com.terra.system.entity.sys.TokenEntity"> |
| | | select a.*, fn_uname(create_user) createName, fn_uname(update_user) updateName |
| | | from lf.sys_token a |
| | | where token = #{token} and expire > now() limit 1 |
| | | </select> |
| | | |
| | | <insert id="insertToken" parameterType="com.lf.server.entity.sys.TokenEntity"> |
| | | <insert id="insertToken" parameterType="com.terra.system.entity.sys.TokenEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_token_id_seq'::regclass) as id |
| | | </selectKey> |
| | |
| | | <?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.sys.UserMapper"> |
| | | <resultMap id="resultMap" type="com.lf.server.entity.sys.UserEntity"> |
| | | <mapper namespace="com.terra.system.mapper.sys.UserMapper"> |
| | | <resultMap id="resultMap" type="com.terra.system.entity.sys.UserEntity"> |
| | | <id property="id" column="id"></id> |
| | | <result property="natives" column="native"></result> |
| | | <result property="createUser" column="create_user"></result> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultMap="resultMap" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | <select id="selectByPage" resultMap="resultMap" resultType="com.terra.system.entity.sys.UserEntity"> |
| | | select a.*,fn_get_fullname(a.depcode, 1) depName from lf.sys_user a |
| | | <where> |
| | | 1 = 1 |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPageForRole" resultMap="resultMap" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | <select id="selectByPageForRole" resultMap="resultMap" resultType="com.terra.system.entity.sys.UserEntity"> |
| | | select a.*,fn_get_fullname(a.depcode, 1) depName from lf.sys_user a |
| | | <where> |
| | | not exists (select b.id from lf.sys_role_user b where b.userid = a.id |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectUserAll" resultMap="resultMap" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | <select id="selectUserAll" resultMap="resultMap" resultType="com.terra.system.entity.sys.UserEntity"> |
| | | select a.*, fn_get_fullname(a.depcode, 1) depName from lf.sys_user a order by a.id desc |
| | | </select> |
| | | |
| | | <select id="selectUser" resultMap="resultMap" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | <select id="selectUser" resultMap="resultMap" resultType="com.terra.system.entity.sys.UserEntity"> |
| | | select a.*, fn_get_fullname(a.depcode, 1) depName from lf.sys_user a where a.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectByUid" resultMap="resultMap" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | <select id="selectByUid" resultMap="resultMap" resultType="com.terra.system.entity.sys.UserEntity"> |
| | | select * from lf.sys_user where uid = #{uid} |
| | | </select> |
| | | |
| | | <select id="selectByToken" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | <select id="selectByToken" resultType="com.terra.system.entity.sys.UserEntity"> |
| | | select * from lf.sys_user where id = ( |
| | | select create_user from lf.sys_token where token=#{token} and expire > now() limit 1) |
| | | </select> |
| | |
| | | where c.is_admin = 1 and a.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectAdminUsers" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | <select id="selectAdminUsers" resultType="com.terra.system.entity.sys.UserEntity"> |
| | | select c.*, fn_get_fullname(b.depcode, 1) depName |
| | | from lf.sys_role_user a inner join lf.sys_user b on a.userid = b.id |
| | | inner join lf.sys_role c on a.roleid = a.id |
| | | where c.is_admin = #{type} |
| | | </select> |
| | | |
| | | <select id="selectRoleByUserId" resultType="com.lf.server.entity.sys.RoleEntity"> |
| | | <select id="selectRoleByUserId" resultType="com.terra.system.entity.sys.RoleEntity"> |
| | | select c.*, fn_get_fullname(a.depcode, 1) depName,fn_uname(c.create_user) createName,fn_uname(c.update_user) updateName |
| | | from lf.sys_user a inner join lf.sys_role_user b on a.id = b.userid |
| | | inner join lf.sys_role c on b.roleid = c.id |
| | | where a.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectUserByRoleId" resultType="com.lf.server.entity.sys.RoleEntity"> |
| | | <select id="selectUserByRoleId" resultType="com.terra.system.entity.sys.RoleEntity"> |
| | | select a.*, fn_get_fullname(a.depcode, 1) depName |
| | | from lf.sys_user a inner join lf.sys_role_user b on a.id = b.userid inner join lf.sys_role c on b.roleid = c.id |
| | | where c.id = #{roleId} |
| | | </select> |
| | | |
| | | <insert id="insertUser" parameterType="com.lf.server.entity.sys.UserEntity"> |
| | | <insert id="insertUser" parameterType="com.terra.system.entity.sys.UserEntity"> |
| | | insert into lf.sys_user |
| | | (depid,depcode,uid,uname,salt,sex,native,contact,job,email,addr,edu,idcard,status,create_user,create_time,bak) |
| | | values |
| | |
| | | <setting name="logImpl" value="NO_LOGGING" /> |
| | | </settings> |
| | | <typeAliases> |
| | | <package name="com.lf.server.entity"/> |
| | | <package name="com.terra.system.entity"/> |
| | | </typeAliases> |
| | | </configuration> |