| | |
| | | |
| | | !*/build/*.java |
| | | !*/build/*.html |
| | | !*/build/*.xml |
| | | !*/build/*.xml |
| | | /doc |
| | |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- SpringBoot Web --> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-web</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- SpringDoc webmvc --> |
| | | <dependency> |
| | | <groupId>org.springdoc</groupId> |
| | |
| | | package com.terra.common.service; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.data.redis.core.BoundSetOperations; |
| | | import org.springframework.data.redis.core.HashOperations; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | @Component |
| | | public class RedisService |
| | | { |
| | | @Autowired |
| | | @Resource |
| | | public RedisTemplate redisTemplate; |
| | | |
| | | /** |
| | |
| | | package com.terra.gateway; |
| | | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| | |
| | | * @author admin |
| | | */ |
| | | @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class }) |
| | | public class SeGatewayApplication |
| | | { |
| | | public static void main(String[] args) |
| | | { |
| | | public class SeGatewayApplication { |
| | | private static String TEST; |
| | | |
| | | @Value("${spring.test}") |
| | | public void setTest(String test) { |
| | | TEST = test; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(SeGatewayApplication.class, args); |
| | | System.out.println("----------ç½å
³æ¨¡åå¯å¨æå---------- \n"); |
| | | } |
| | |
| | | package com.terra.gateway.filter; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import javax.annotation.Resource; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.cloud.gateway.filter.GatewayFilterChain; |
| | | import org.springframework.cloud.gateway.filter.GlobalFilter; |
| | |
| | | public class XssFilter implements GlobalFilter, Ordered |
| | | { |
| | | // è·¨ç«èæ¬ç xss é
ç½®ï¼nacosèªè¡æ·»å |
| | | @Autowired |
| | | @Resource |
| | | private XssProperties xss; |
| | | |
| | | @Override |
| | |
| | | # Tomcat |
| | | server: |
| | | port: 8080 |
| | | port: 8001 |
| | | |
| | | # Spring |
| | | spring: |
| | | application: |
| | | # åºç¨åç§° |
| | | name: se-gateway |
| | | main: |
| | | web-application-type: reactive |
| | | profiles: |
| | | # ç¯å¢é
ç½® |
| | | active: dev |
| | |
| | | # æå¡æ³¨åå°å |
| | | server-addr: 127.0.0.1:8848 |
| | | config: |
| | | group: JHS_GROUP |
| | | # é
ç½®ä¸å¿å°å |
| | | server-addr: 127.0.0.1:8848 |
| | | # é
ç½®æä»¶æ ¼å¼ |
| | | file-extension: yml |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | - data-id: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | group: JHS_GROUP |
| | | # å
è®¸å·æ° |
| | | refresh-enabled: true |
| | | sentinel: |
| | | # åæ¶æ§å¶å°æå è½½ |
| | | eager: true |
| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-actuator</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- Mysql Connector --> |
| | | <dependency> |
| | | <groupId>com.mysql</groupId> |
| | | <artifactId>mysql-connector-j</artifactId> |
| | | </dependency> |
| | | |
| | | |
| | | |
| | |
| | | <artifactId>spring-boot-starter-web</artifactId> |
| | | </dependency> |
| | | |
| | | <!--lombok--> |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | |
| | | <!--mybatis-plus--> |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-boot-starter</artifactId> |
| | | <version>3.5.1</version> |
| | | </dependency> |
| | | |
| | | <!--war:servlet--> |
| | | <dependency> |
| | | <groupId>javax.servlet</groupId> |
| | | <artifactId>javax.servlet-api</artifactId> |
| | | <version>3.1.0</version> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | | <!--websocket--> |
| | | <dependency> |
| | | <groupId>javax.websocket</groupId> |
| | | <artifactId>javax.websocket-api</artifactId> |
| | | <version>1.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-websocket</artifactId> |
| | | </dependency> |
| | | |
| | | <!--redis--> |
| | |
| | | <artifactId>commons-pool2</artifactId> |
| | | </dependency> |
| | | |
| | | <!--lombok--> |
| | | <!--aop--> |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <optional>true</optional> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-aop</artifactId> |
| | | </dependency> |
| | | |
| | | <!--fastjson--> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>fastjson</artifactId> |
| | | <version>1.2.47</version> |
| | | </dependency> |
| | | |
| | | <!--æ´ådruidæ°æ®æº--> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>druid</artifactId> |
| | | <version>1.1.22</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba</groupId> |
| | | <artifactId>druid-spring-boot-starter</artifactId> |
| | | <version>1.1.22</version> |
| | | </dependency> |
| | | |
| | | <!--text--> |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |
| | | <artifactId>commons-text</artifactId> |
| | | <version>1.1</version> |
| | | </dependency> |
| | | |
| | | <!--swagger--> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | | <version>2.9.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | <version>2.9.2</version> |
| | | </dependency> |
| | | |
| | | <!--httpclient--> |
| | | <dependency> |
| | | <groupId>org.apache.httpcomponents</groupId> |
| | | <artifactId>httpclient</artifactId> |
| | | </dependency> |
| | | |
| | | <!--websocket--> |
| | | <dependency> |
| | | <groupId>javax.websocket</groupId> |
| | | <artifactId>javax.websocket-api</artifactId> |
| | | <version>1.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-websocket</artifactId> |
| | | </dependency> |
| | | |
| | | <!--oshi--> |
| | | <dependency> |
| | | <groupId>com.github.oshi</groupId> |
| | | <artifactId>oshi-core</artifactId> |
| | | <version>4.4.2</version> |
| | | </dependency> |
| | | |
| | | <!--commons-fileupload--> |
| | | <dependency> |
| | | <groupId>commons-fileupload</groupId> |
| | | <artifactId>commons-fileupload</artifactId> |
| | | <version>1.4</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-io</groupId> |
| | | <artifactId>commons-io</artifactId> |
| | | <version>2.11.0</version> |
| | | </dependency> |
| | | |
| | | <!--gdal--> |
| | |
| | | <version>2.2.10</version> |
| | | </dependency> |
| | | |
| | | <!--commons-fileupload--> |
| | | <!--servlet--> |
| | | <dependency> |
| | | <groupId>commons-fileupload</groupId> |
| | | <artifactId>commons-fileupload</artifactId> |
| | | <version>1.4</version> |
| | | <groupId>javax.servlet</groupId> |
| | | <artifactId>javax.servlet-api</artifactId> |
| | | <version>3.1.0</version> |
| | | <scope>provided</scope> |
| | | </dependency> |
| | | |
| | | <!--apache.poi--> |
| | | <dependency> |
| | | <groupId>commons-io</groupId> |
| | | <artifactId>commons-io</artifactId> |
| | | <version>2.11.0</version> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>3.16</version> |
| | | </dependency> |
| | | |
| | | <!--SQLite--> |
| | | <dependency> |
| | | <groupId>org.xerial</groupId> |
| | | <artifactId>sqlite-jdbc</artifactId> |
| | | <version>3.36.0.3</version> |
| | | </dependency> |
| | | |
| | | <!--proj4j--> |
| | | <dependency> |
| | | <groupId>org.osgeo</groupId> |
| | | <artifactId>proj4j</artifactId> |
| | | <version>0.1.0</version> |
| | | </dependency> |
| | | |
| | | <!--JTS--> |
| | |
| | | <version>1.19.0</version> |
| | | </dependency> |
| | | |
| | | <!--oshi--> |
| | | <dependency> |
| | | <groupId>com.github.oshi</groupId> |
| | | <artifactId>oshi-core</artifactId> |
| | | <version>4.4.2</version> |
| | | </dependency> |
| | | |
| | | <!--swagger--> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | | <version>2.9.2</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | <version>2.9.2</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | import com.terra.system.helper.StringHelper; |
| | | import com.terra.system.helper.WebHelper; |
| | | import com.terra.system.mapper.sys.TokenMapper; |
| | | import com.terra.system.mapper.sys.UserMapper; |
| | | import com.terra.system.service.all.RedisService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | TokenMapper tokenMapper; |
| | | |
| | | @Resource |
| | | UserService usersService; |
| | | UserMapper userMapper; |
| | | |
| | | @Resource |
| | | LoginService loginService; |
| | |
| | | } |
| | | |
| | | // db |
| | | UserEntity ue = usersService.selectByToken(token); |
| | | UserEntity ue = userMapper.selectByToken(token); |
| | | if (null != ue) { |
| | | getEntityByToken(token); |
| | | } |
| | |
| | | UserMapper userMapper; |
| | | |
| | | @Resource |
| | | RedisService redisService; |
| | | |
| | | @Resource |
| | | LoginService loginService; |
| | | |
| | | @Resource |
| | | TokenService tokenService; |
| | | |
| | | private final static Log log = LogFactory.getLog(UserService.class); |
ÎļþÃû´Ó se-system/src/main/resources/application-dev.yml ÐÞ¸Ä |
| | |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | max-connections: 5000 |
| | | max-http-form-post-size: 50MB |
| | | max-http-form-post-size: 100MB |
| | | threads: |
| | | max: 2000 |
| | | port: 12316 |
| | | servlet: |
| | | context-path: /server |
| | | context-path: / |
| | | |
| | | spring: |
| | | application: |
| | | name: server |
| | | # redis |
| | | redis: |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6369 |
| | | password: rediS_5L#F4_Server |
| | | timeout: 10000 # è¿æ¥è¶
æ¶æ¶é¿ï¼æ¯«ç§ï¼ |
| | | # è¿æ¥è¶
æ¶æ¶é¿ï¼æ¯«ç§ï¼ |
| | | timeout: 10000 |
| | | lettuce: |
| | | pool: |
| | | max-active: 1000 # è¿æ¥æ± æå¤§è¿æ¥æ°ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1 # è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-idle: 10 # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | min-idle: 5 # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | # è¿æ¥æ± æå¤§è¿æ¥æ°ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-active: 1000 |
| | | # è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 10 |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 5 |
| | | # session |
| | | session: |
| | | timeout: PT20M # 20åé |
| | | # 20åé |
| | | timeout: PT20M |
| | | # 设置ä¸ä¼ æä»¶å¤§å° |
| | | servlet: |
| | | multipart: |
| | |
| | | datasource: |
| | | name: prod |
| | | # JDBC åºæ¬é
ç½® ¤tSchema=public |
| | | #url: jdbc:postgresql://103.135.160.14:5433/langfang?useAffectedRows=true |
| | | url: jdbc:postgresql://192.168.11.205:5433/langfang?useAffectedRows=true |
| | | #url: jdbc:postgresql://127.0.0.1:5433/langfang?useAffectedRows=true |
| | | #url: jdbc:postgresql://192.168.11.205:5433/jhs?useAffectedRows=true |
| | | url: jdbc:postgresql://127.0.0.1:5433/jhs?useAffectedRows=true |
| | | username: postgres |
| | | password: Postgres!_14_Lf |
| | | #password: postgres |
| | | #password: Postgres!_14_Lf |
| | | password: postgres |
| | | driver-class-name: org.postgresql.Driver |
| | | platform: POSTGRESQL |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | |
| | | logAbandoned: true |
| | | # é
ç½®è¿æ¥æ± ä¿¡æ¯ |
| | | druid: |
| | | ## åå§å大å°ï¼æå°ï¼æå¤§ |
| | | # åå§å大å°ï¼æå°ï¼æå¤§ |
| | | initial-size: 5 |
| | | min-idle: 5 |
| | | max-active: 100 |
| | | ## é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ï¼ms |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ï¼ms |
| | | max-wait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | time-between-eviction-runs-millis: 60000 |
| | |
| | | # æ¯å¦å
许æ¸
空ç»è®¡æ°æ®ï¼éæ°è®¡ç® true:å
许 false:ä¸å
许 |
| | | reset-enable: false |
| | | # é
ç½®çæ§é¡µé¢è®¿é®è´¦å·å¯ç |
| | | #login-username: admin |
| | | #login-password: ad_!Druid!_min |
| | | login-username: admin |
| | | login-password: ad_!Druid!_min |
| | | # å
许访é®çå°åï¼å¦æallow没æé
ç½®æè
为空ï¼åå
许ææè®¿é® |
| | | allow: |
| | | # æç»è®¿é®çå°åï¼denyä¼å
äºallow |
| | | deny: |
| | | |
| | | # mybatis |
| | | #mybatis: |
| | | # type-aliases-package: com.lf.server.entity |
| | | # config-location: classpath:mybatis.xml |
| | | # mapper-locations: classpath:mapper/**/*.xml |
| | | |
| | | mybatis-plus: |
| | | type-aliases-package: com.lf.server.entity |
| | | type-aliases-package: com.terra.system.entity |
| | | config-location: classpath:mybatis.xml |
| | | mapper-locations: classpath:mapper/**/*.xml |
| | | |
| | |
| | | # IISç主æºå°å |
| | | iisHost: 127.0.0.1 |
| | | # FMEæå¡å°å |
| | | #fmeUrl: http://106.120.22.35:8051/ |
| | | fmeUrl: http://192.168.11.205:88/ |
| | | # FME令ç |
| | | fmeToken: c36e4f94-dfde-401e-9967-2c4a449f1300 |
| | | # åºå¾æå¡ |
| | | exportServer: http://127.0.0.1/ExportMap |
| | | #exportServer: http://103.85.165.99:8050/ExportMap |
| | | # Turfæå¡ |
| | | turfServer: http://127.0.0.1/Turf |
| | | # Gdal驱å¨ç®å½ |
| | | gdal_path: E:\terrait\TianJin\Zip\release-1928-x64-dev\release-1928-x64\bin |
| | | # ç¦çå°å |
| | | tile_path: E:\data\99.public\soft\LFData\2d\tiles |
| | | tile_path: E:\data\2d\tiles |
| | | path: |
| | | # ä¸è½½ç®å½ |
| | | download: D:\LF\download |
| | | download: D:\JHS\data\download |
| | | # ä¸ä¼ ç®å½ |
| | | upload: D:\LF\upload |
| | | upload: D:\JHS\data\upload |
| | | # 临æ¶ç®å½ |
| | | temp: D:\LF\temp |
| | | temp: D:\JHS\data\temp |
| | | cad: |
| | | exePath: C:/360/MxDrawCloudServer1.0TryVersion/MxDrawCloudServer/Bin/MxCAD/Release/mxcadassembly.exe |
| | | targetPath: C:/360/MxDrawCloudServer1.0TryVersion/MxDrawCloudServer/SRC/TsWeb/public/data |
| | |
| | | # Tomcat |
| | | server: |
| | | port: 9201 |
| | | port: 8002 |
| | | |
| | | # Spring |
| | | spring: |
| | |
| | | # æå¡æ³¨åå°å |
| | | server-addr: 127.0.0.1:8848 |
| | | config: |
| | | group: JHS_GROUP |
| | | # é
ç½®ä¸å¿å°å |
| | | server-addr: 127.0.0.1:8848 |
| | | # é
ç½®æä»¶æ ¼å¼ |
| | | file-extension: yml |
| | | # å
±äº«é
ç½® |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | - data-id: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | group: JHS_GROUP |
| | | # å
è®¸å·æ° |
| | | refresh-enabled: true |
| | |
| | | <?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> |