Merge branch 'test'
# Conflicts: # rtss-message
This commit is contained in:
commit
58bc68876a
424
pom.xml
424
pom.xml
@ -1,227 +1,231 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-parent</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<version>2.3.5.RELEASE</version>
|
<version>2.3.5.RELEASE</version>
|
||||||
<relativePath/> <!-- lookup parent from repository -->
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>club.joylink</groupId>
|
<groupId>club.joylink</groupId>
|
||||||
<artifactId>rtss</artifactId>
|
<artifactId>rtss</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>rtss</name>
|
<name>rtss</name>
|
||||||
<description> Rail transit simulation system</description>
|
<description>Rail transit simulation system</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>11</java.version>
|
<java.version>11</java.version>
|
||||||
<pagehelper.version>4.1.1</pagehelper.version>
|
<pagehelper.version>4.1.1</pagehelper.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-mail</artifactId>
|
<artifactId>spring-boot-starter-mail</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mybatis.spring.boot</groupId>
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||||
<version>2.1.3</version>
|
<version>2.1.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.pagehelper</groupId>
|
<groupId>com.github.pagehelper</groupId>
|
||||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
<version>1.3.0</version>
|
<version>1.3.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- javax.validation -->
|
<!-- javax.validation -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.validation</groupId>
|
<groupId>javax.validation</groupId>
|
||||||
<artifactId>validation-api</artifactId>
|
<artifactId>validation-api</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!--spring切面aop依赖 -->
|
<!--spring切面aop依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-aop</artifactId>
|
<artifactId>spring-boot-starter-aop</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.netty</groupId>
|
<groupId>io.netty</groupId>
|
||||||
<artifactId>netty-all</artifactId>
|
<artifactId>netty-all</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.digitalpetri.modbus</groupId>
|
<groupId>com.digitalpetri.modbus</groupId>
|
||||||
<artifactId>modbus-codec</artifactId>
|
<artifactId>modbus-codec</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 硬件检测依赖 -->
|
<!-- 硬件检测依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.oshi</groupId>
|
<groupId>com.github.oshi</groupId>
|
||||||
<artifactId>oshi-core-java11</artifactId>
|
<artifactId>oshi-core-java11</artifactId>
|
||||||
<version>5.7.5</version>
|
<version>5.7.5</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.projectlombok</groupId>
|
<groupId>org.projectlombok</groupId>
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.junit.vintage</groupId>
|
<groupId>org.junit.vintage</groupId>
|
||||||
<artifactId>junit-vintage-engine</artifactId>
|
<artifactId>junit-vintage-engine</artifactId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.wechatpay-apiv3</groupId>
|
<groupId>com.github.wechatpay-apiv3</groupId>
|
||||||
<artifactId>wechatpay-apache-httpclient</artifactId>
|
<artifactId>wechatpay-apache-httpclient</artifactId>
|
||||||
<version>0.2.1</version>
|
<version>0.2.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>com.huawei.sis</groupId>-->
|
<!-- <groupId>com.huawei.sis</groupId>-->
|
||||||
<!-- <artifactId>huaweicloud-java-sdk-sis</artifactId>-->
|
<!-- <artifactId>huaweicloud-java-sdk-sis</artifactId>-->
|
||||||
<!-- <version>1.3.2</version>-->
|
<!-- <version>1.3.2</version>-->
|
||||||
<!-- <scope>system</scope>-->
|
<!-- <scope>system</scope>-->
|
||||||
<!-- <systemPath>${project.basedir}/libs/huaweicloud-java-sdk-sis-1.3.2.jar</systemPath>-->
|
<!-- <systemPath>${project.basedir}/libs/huaweicloud-java-sdk-sis-1.3.2.jar</systemPath>-->
|
||||||
<!-- </dependency>-->
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>31.1-jre</version>
|
<version>31.1-jre</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.minio</groupId>
|
<groupId>io.minio</groupId>
|
||||||
<artifactId>minio</artifactId>
|
<artifactId>minio</artifactId>
|
||||||
<version>8.4.4</version>
|
<version>8.4.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
<artifactId>okhttp</artifactId>
|
<artifactId>okhttp</artifactId>
|
||||||
<version>4.9.0</version>
|
<version>4.9.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- <dependency>
|
<!-- <dependency>
|
||||||
<groupId>org.springframework.retry</groupId>
|
<groupId>org.springframework.retry</groupId>
|
||||||
<artifactId>spring-retry</artifactId>
|
<artifactId>spring-retry</artifactId>
|
||||||
</dependency>-->
|
</dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>joda-time</groupId>
|
<groupId>joda-time</groupId>
|
||||||
<artifactId>joda-time</artifactId>
|
<artifactId>joda-time</artifactId>
|
||||||
<version>2.10.3</version>
|
<version>2.10.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.belerweb</groupId>
|
<groupId>com.belerweb</groupId>
|
||||||
<artifactId>pinyin4j</artifactId>
|
<artifactId>pinyin4j</artifactId>
|
||||||
<version>2.5.0</version>
|
<version>2.5.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- iscs -->
|
<!-- iscs -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.protobuf</groupId>
|
<groupId>com.google.protobuf</groupId>
|
||||||
<artifactId>protobuf-java</artifactId>
|
<artifactId>protobuf-java</artifactId>
|
||||||
<version>3.19.3</version>
|
<version>3.23.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.hubspot.jackson</groupId>
|
||||||
|
<artifactId>jackson-datatype-protobuf</artifactId>
|
||||||
|
<version>0.9.12</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>com.chenlb.mmseg4j</groupId>
|
||||||
|
<artifactId>mmseg4j-core</artifactId>
|
||||||
|
<version>1.10.0</version>
|
||||||
|
</dependency>-->
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>org.ansj</groupId>
|
||||||
|
<artifactId>ansj_seg</artifactId>
|
||||||
|
<version>5.1.6</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.reflections</groupId>
|
||||||
|
<artifactId>reflections</artifactId>
|
||||||
|
<version>0.9.11</version>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
<version>3.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>info.debatty</groupId>
|
||||||
|
<artifactId>java-string-similarity</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
<!-- <dependency>
|
<dependency>
|
||||||
<groupId>com.chenlb.mmseg4j</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>mmseg4j-core</artifactId>
|
<artifactId>commons-text</artifactId>
|
||||||
<version>1.10.0</version>
|
<version>1.10.0</version>
|
||||||
</dependency>-->
|
</dependency>
|
||||||
<!-- <dependency>
|
|
||||||
<groupId>org.ansj</groupId>
|
|
||||||
<artifactId>ansj_seg</artifactId>
|
|
||||||
<version>5.1.6</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.reflections</groupId>
|
|
||||||
<artifactId>reflections</artifactId>
|
|
||||||
<version>0.9.11</version>
|
|
||||||
</dependency>-->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-lang3</artifactId>
|
|
||||||
<version>3.12.0</version>
|
|
||||||
</dependency>
|
|
||||||
<!-- <dependency>
|
|
||||||
<groupId>info.debatty</groupId>
|
|
||||||
<artifactId>java-string-similarity</artifactId>
|
|
||||||
<version>2.0.0</version>
|
|
||||||
</dependency>-->
|
|
||||||
|
|
||||||
<dependency>
|
</dependencies>
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-text</artifactId>
|
|
||||||
<version>1.10.0</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<includeSystemScope>true</includeSystemScope>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<build>
|
<plugin>
|
||||||
<plugins>
|
<groupId>com.github.shalousun</groupId>
|
||||||
<plugin>
|
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<version>2.1.9</version>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<configuration>
|
||||||
<configuration>
|
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
|
||||||
<includeSystemScope>true</includeSystemScope>
|
<configFile>./src/main/resources/smart-doc.json</configFile>
|
||||||
</configuration>
|
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码,如果一些框架依赖库加载不到导致报错,这时请使用excludes排除掉-->
|
||||||
</plugin>
|
<!-- <excludes>-->
|
||||||
|
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||||
<plugin>
|
<!-- <exclude>com.alibaba:fastjson</exclude>-->
|
||||||
<groupId>com.github.shalousun</groupId>
|
<!-- </excludes>-->
|
||||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
<!-- <!–自1.0.8版本开始,插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载,因此使用时需要注意–>-->
|
||||||
<version>2.1.9</version>
|
<!-- <!–smart-doc能自动分析依赖树加载所有依赖源码,原则上会影响文档构建效率,因此你可以使用includes来让插件加载你配置的组件–>-->
|
||||||
<configuration>
|
<!-- <includes>-->
|
||||||
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
|
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||||
<configFile>./src/main/resources/smart-doc.json</configFile>
|
<!-- <include>com.alibaba:fastjson</include>-->
|
||||||
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码,如果一些框架依赖库加载不到导致报错,这时请使用excludes排除掉-->
|
<!-- </includes>-->
|
||||||
<!-- <excludes>-->
|
</configuration>
|
||||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
<executions>
|
||||||
<!-- <exclude>com.alibaba:fastjson</exclude>-->
|
<execution>
|
||||||
<!-- </excludes>-->
|
<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
|
||||||
<!-- <!–自1.0.8版本开始,插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载,因此使用时需要注意–>-->
|
<!-- <phase>compile</phase>-->
|
||||||
<!-- <!–smart-doc能自动分析依赖树加载所有依赖源码,原则上会影响文档构建效率,因此你可以使用includes来让插件加载你配置的组件–>-->
|
<goals>
|
||||||
<!-- <includes>-->
|
<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
|
||||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
<goal>html</goal>
|
||||||
<!-- <include>com.alibaba:fastjson</include>-->
|
</goals>
|
||||||
<!-- </includes>-->
|
</execution>
|
||||||
</configuration>
|
</executions>
|
||||||
<executions>
|
</plugin>
|
||||||
<execution>
|
</plugins>
|
||||||
<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
|
</build>
|
||||||
<!-- <phase>compile</phase>-->
|
|
||||||
<goals>
|
|
||||||
<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
|
|
||||||
<goal>html</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 337a7f2676e9f64cadb5658b9e89860efa53b28e
|
Subproject commit 64053645db2ecf352e7fdf8e4d19ec607d03c887
|
@ -1,16 +0,0 @@
|
|||||||
-- 用户答题生成对应的规则id
|
|
||||||
ALTER TABLE `rts_paper_user_question`
|
|
||||||
ADD COLUMN `rule_id` bigint not NULL COMMENT '试卷规则rts_paper_rule的id' AFTER `pu_id`;
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE `rts_paper_user_question`
|
|
||||||
ADD COLUMN `sub_type` int not NULL COMMENT '规则类型:理论题(1-单选题,2-多选题,3-判断题);实训题(4-单操实训,5-场景实训)' AFTER `type`;
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE `rts_paper_user_question` MODIFY COLUMN tmp_answer longtext;
|
|
||||||
|
|
||||||
ALTER TABLE `rts_paper_rule` ADD COLUMN scene_detail VARCHAR(1000) COMMENT '场景实训考试的规则';
|
|
||||||
|
|
||||||
|
|
||||||
ALTER TABLE `rts_paper_user_question`
|
|
||||||
ADD COLUMN `scene_cosplay_id` varchar(10) COMMENT '场景实训考试扮演的角色';
|
|
@ -1,2 +0,0 @@
|
|||||||
ALTER TABLE `joylink`.`rts_map_function`
|
|
||||||
ADD COLUMN `bg_url` varchar(255) NULL COMMENT '背景图片的url' AFTER `desc`;
|
|
@ -1,11 +0,0 @@
|
|||||||
CREATE TABLE `rts_map_function_template` (
|
|
||||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` varchar(64) COLLATE utf8mb4_general_ci NOT NULL,
|
|
||||||
`map_function_param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '地图功能参数',
|
|
||||||
`assistant_param` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '辅助参数(如默认角色类型)',
|
|
||||||
`create_time` datetime NOT NULL,
|
|
||||||
`creator_id` bigint NOT NULL,
|
|
||||||
`update_time` datetime DEFAULT NULL,
|
|
||||||
`updater_id` bigint DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='地图功能模板';
|
|
@ -1,3 +0,0 @@
|
|||||||
ALTER TABLE `joylink`.`rts_published_training2` ADD COLUMN `shared` int NULL DEFAULT 0 COMMENT '0 不共享,1共享' AFTER `client`;
|
|
||||||
|
|
||||||
update rts_published_training2 SET shared = 1,org_id = null WHERE creator_id = 0 ;
|
|
@ -1,14 +0,0 @@
|
|||||||
CREATE TABLE `rts_voice_discriminate_config` (
|
|
||||||
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
||||||
`key_word_rules` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '关键字正则',
|
|
||||||
`params_rules` json DEFAULT NULL COMMENT ' /**\r\n * 所需参数 List\r\n * {@link ParamExtractRule}\r\n */',
|
|
||||||
`exec_operate_rule` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT ' /**\r\n * 执行指令(系统操作指令)\r\n * {@link OperateRule}\r\n */',
|
|
||||||
`reply_rule` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT ' /**\r\n * 回复指令(系统指令操作完毕或者无系统指令时,交互回复)\r\n * {@link ReplyRule}\r\n */',
|
|
||||||
`map_id` bigint DEFAULT NULL,
|
|
||||||
`create_time` datetime DEFAULT NULL,
|
|
||||||
`update_time` datetime DEFAULT NULL,
|
|
||||||
`operate_id` bigint DEFAULT NULL,
|
|
||||||
`describe` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '描述',
|
|
||||||
`status` int DEFAULT NULL COMMENT '状态0=编辑,1=使用',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
|
@ -1,13 +0,0 @@
|
|||||||
CREATE TABLE `rts_conversation_group_info` (
|
|
||||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
||||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '群组名称',
|
|
||||||
`map_id` bigint DEFAULT NULL COMMENT '所属地图ID',
|
|
||||||
`project_code` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '所属项目',
|
|
||||||
`leader_id` varchar(12) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '群主角色ID',
|
|
||||||
`member_ids` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '群组用户角色ID',
|
|
||||||
`create_time` datetime DEFAULT NULL,
|
|
||||||
`update_time` datetime DEFAULT NULL,
|
|
||||||
`creator_id` bigint DEFAULT NULL,
|
|
||||||
`status` int DEFAULT NULL COMMENT '状态0=编辑,1=使用',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='群组信息设置';
|
|
@ -1,2 +0,0 @@
|
|||||||
ALTER TABLE `joylink`.`rts_conversation_group_info` ADD COLUMN `image_url` varchar(255) NULL COMMENT '头像路径' AFTER `name`;
|
|
||||||
DROP TABLE IF EXISTS `joylink`.`rts_conversation_group_info`;
|
|
@ -1,10 +0,0 @@
|
|||||||
CREATE TABLE `rts_alarm_tips` (
|
|
||||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`alarm_type` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
|
|
||||||
`alarm_level` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
|
|
||||||
`tips` varchar(10000) COLLATE utf8mb4_general_ci NOT NULL,
|
|
||||||
`update_time` datetime NOT NULL,
|
|
||||||
`updater_id` bigint NOT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `alarm` (`alarm_type`,`alarm_level`) COMMENT '用以保证提示信息唯一'
|
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='ATS报警信息提示';
|
|
@ -1 +0,0 @@
|
|||||||
ALTER TABLE `joylink`.`rts_training2_rule` ADD COLUMN `score_rule` text NULL COMMENT '得分规则' AFTER `location_rule`;
|
|
@ -1 +0,0 @@
|
|||||||
ALTER TABLE `rts_paper_rule` ADD COLUMN `sub_type_param` varchar(255) NULL COMMENT '规则参数';
|
|
@ -1,9 +0,0 @@
|
|||||||
INSERT INTO rts_user_simulation_record (map_id, user_id, type, duration, start_time, end_time)
|
|
||||||
SELECT map_id,
|
|
||||||
user_id,
|
|
||||||
'SIM',
|
|
||||||
duration,
|
|
||||||
start_time,
|
|
||||||
end_time
|
|
||||||
FROM user_simulation_stats
|
|
||||||
WHERE end_time > '2000-01-01 00:00:00';
|
|
@ -6,6 +6,7 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
|
|||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
||||||
|
import com.hubspot.jackson.datatype.protobuf.ProtobufModule;
|
||||||
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -17,36 +18,40 @@ import java.time.format.DateTimeFormatter;
|
|||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class LocalDateTimeSerializerConfig {
|
public class LocalDateTimeSerializerConfig {
|
||||||
/**
|
|
||||||
* Date格式化字符串
|
|
||||||
*/
|
|
||||||
private static final String DATE_FORMAT = "yyyy-MM-dd";
|
|
||||||
/**
|
|
||||||
* DateTime格式化字符串
|
|
||||||
*/
|
|
||||||
private static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
|
||||||
/**
|
|
||||||
* Time格式化字符串
|
|
||||||
*/
|
|
||||||
private static final String TIME_FORMAT = "HH:mm:ss";
|
|
||||||
|
|
||||||
@Bean
|
/**
|
||||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
* Date格式化字符串
|
||||||
return builder -> {
|
*/
|
||||||
builder.serializerByType(LocalDateTime.class,
|
private static final String DATE_FORMAT = "yyyy-MM-dd";
|
||||||
new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATETIME_FORMAT)));
|
/**
|
||||||
builder.deserializerByType(LocalDateTime.class,
|
* DateTime格式化字符串
|
||||||
new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DATETIME_FORMAT)));
|
*/
|
||||||
|
private static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||||
|
/**
|
||||||
|
* Time格式化字符串
|
||||||
|
*/
|
||||||
|
private static final String TIME_FORMAT = "HH:mm:ss";
|
||||||
|
|
||||||
builder.serializerByType(LocalDate.class,
|
@Bean
|
||||||
new LocalDateSerializer(DateTimeFormatter.ofPattern(DATE_FORMAT)));
|
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
||||||
builder.deserializerByType(LocalDate.class,
|
return builder -> {
|
||||||
new LocalDateDeserializer(DateTimeFormatter.ofPattern(DATE_FORMAT)));
|
builder.modulesToInstall(ProtobufModule.class);
|
||||||
|
builder.failOnUnknownProperties(false);
|
||||||
|
builder.serializerByType(LocalDateTime.class,
|
||||||
|
new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATETIME_FORMAT)));
|
||||||
|
builder.deserializerByType(LocalDateTime.class,
|
||||||
|
new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DATETIME_FORMAT)));
|
||||||
|
|
||||||
builder.serializerByType(LocalTime.class,
|
builder.serializerByType(LocalDate.class,
|
||||||
new LocalTimeSerializer(DateTimeFormatter.ofPattern(TIME_FORMAT)));
|
new LocalDateSerializer(DateTimeFormatter.ofPattern(DATE_FORMAT)));
|
||||||
builder.deserializerByType(LocalTime.class,
|
builder.deserializerByType(LocalDate.class,
|
||||||
new LocalTimeDeserializer(DateTimeFormatter.ofPattern(TIME_FORMAT)));
|
new LocalDateDeserializer(DateTimeFormatter.ofPattern(DATE_FORMAT)));
|
||||||
};
|
|
||||||
}
|
builder.serializerByType(LocalTime.class,
|
||||||
|
new LocalTimeSerializer(DateTimeFormatter.ofPattern(TIME_FORMAT)));
|
||||||
|
builder.deserializerByType(LocalTime.class,
|
||||||
|
new LocalTimeDeserializer(DateTimeFormatter.ofPattern(TIME_FORMAT)));
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,78 +26,79 @@ import java.util.List;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class CommonResponseBody implements ResponseBodyAdvice {
|
public class CommonResponseBody implements ResponseBodyAdvice {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supports(MethodParameter returnType, Class converterType) {
|
public boolean supports(MethodParameter returnType, Class converterType) {
|
||||||
return returnType.getMethod() != null && !returnType.getMethod().getReturnType().getSimpleName().equals("CommonJsonResponse");
|
return returnType.getMethod() != null && !returnType.getMethod().getReturnType().getSimpleName().equals("CommonJsonResponse");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType,
|
public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType,
|
||||||
Class selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {
|
Class selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) {
|
||||||
//byte[]
|
//byte[]
|
||||||
if(body instanceof byte[]){
|
if (body instanceof byte[]) {
|
||||||
response.getHeaders().setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
response.getHeaders().setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
//byte[]
|
//byte[]
|
||||||
if(body instanceof AbstractMessageLite){
|
/*if(body instanceof AbstractMessageLite){
|
||||||
response.getHeaders().setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
response.getHeaders().setContentType(MediaType.APPLICATION_OCTET_STREAM);
|
||||||
final AbstractMessageLite proto = (AbstractMessageLite) body;
|
final AbstractMessageLite proto = (AbstractMessageLite) body;
|
||||||
return proto.toByteArray();
|
return proto.toByteArray();
|
||||||
}
|
}*/
|
||||||
if(body instanceof CommonJsonResponse) {
|
if (body instanceof CommonJsonResponse) {
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
if(request.getURI().getPath().startsWith("/swagger")) {
|
if (request.getURI().getPath().startsWith("/swagger")) {
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
if (request.getURI().getPath().equals("/api/userinfo/ifRegisted")) {
|
if (request.getURI().getPath().equals("/api/userinfo/ifRegisted")) {
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
if (request.getURI().getPath().equals("/api/userinfo/identity")) {
|
if (request.getURI().getPath().equals("/api/userinfo/identity")) {
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
CommonJsonResponse commonJsonResponse = CommonJsonResponse.newSuccessResponse(body);
|
CommonJsonResponse commonJsonResponse = CommonJsonResponse.newSuccessResponse(body);
|
||||||
if(returnType.getMethod().getReturnType().equals(String.class) || body instanceof String) {
|
if (returnType.getMethod().getReturnType().equals(String.class) || body instanceof String) {
|
||||||
return commonJsonResponse.toJSONString();
|
return commonJsonResponse.toJSONString();
|
||||||
}
|
}
|
||||||
return commonJsonResponse;
|
return commonJsonResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler({PayException.class})
|
||||||
|
@ResponseStatus
|
||||||
|
public CommonJsonResponse handleException(PayException e) {
|
||||||
|
log.error("【支付异常】", e);
|
||||||
|
return CommonJsonResponse.newErrorResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ExceptionHandler({Exception.class})
|
||||||
|
@ResponseBody
|
||||||
|
public CommonJsonResponse handleException(Exception e) {
|
||||||
|
if (e instanceof MethodArgumentNotValidException) {
|
||||||
|
// 参数验证异常处理
|
||||||
|
MethodArgumentNotValidException validException = (MethodArgumentNotValidException) e;
|
||||||
|
List<ObjectError> errorList = validException.getBindingResult().getAllErrors();
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
errorList.forEach(error ->
|
||||||
|
sb.append(error.getDefaultMessage()).append(";"));
|
||||||
|
log.error("【参数校验异常】{}", e);
|
||||||
|
return CommonJsonResponse.newErrorResponse(ResponseConsts.VALIDATE_ERROR.getCode(), sb.toString());
|
||||||
|
}
|
||||||
|
if (e instanceof BusinessException) {
|
||||||
|
club.joylink.rtss.exception.BusinessException be = (club.joylink.rtss.exception.BusinessException) e;
|
||||||
|
log.error("【业务异常】{}", e);
|
||||||
|
return CommonJsonResponse.newErrorResponse(be.getCode(), be.getVoMessage());
|
||||||
|
} else if (e instanceof MissingServletRequestParameterException) {
|
||||||
|
log.error("【接口参数异常】", e);
|
||||||
|
return CommonJsonResponse.newErrorResponse(ResponseConsts.VALIDATE_ERROR.getCode(), "接口参数异常");
|
||||||
|
} else if (e instanceof SimulationException) {
|
||||||
|
club.joylink.rtss.simulation.cbtc.exception.SimulationException simulationException = (club.joylink.rtss.simulation.cbtc.exception.SimulationException) e;
|
||||||
|
log.error("【仿真系统异常】{}", e);
|
||||||
|
return CommonJsonResponse.newErrorResponse(simulationException.getCode(), simulationException.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExceptionHandler({PayException.class})
|
log.error("【系统异常】{}", e);
|
||||||
@ResponseStatus
|
return CommonJsonResponse.newErrorResponse();
|
||||||
public CommonJsonResponse handleException(PayException e) {
|
}
|
||||||
log.error("【支付异常】", e);
|
|
||||||
return CommonJsonResponse.newErrorResponse();
|
|
||||||
}
|
|
||||||
|
|
||||||
@ExceptionHandler({Exception.class})
|
|
||||||
@ResponseBody
|
|
||||||
public CommonJsonResponse handleException(Exception e) {
|
|
||||||
if(e instanceof MethodArgumentNotValidException) {
|
|
||||||
// 参数验证异常处理
|
|
||||||
MethodArgumentNotValidException validException = (MethodArgumentNotValidException) e;
|
|
||||||
List<ObjectError> errorList = validException.getBindingResult().getAllErrors();
|
|
||||||
StringBuffer sb = new StringBuffer();
|
|
||||||
errorList.forEach(error ->
|
|
||||||
sb.append(error.getDefaultMessage()).append(";"));
|
|
||||||
log.error("【参数校验异常】{}", e);
|
|
||||||
return CommonJsonResponse.newErrorResponse(ResponseConsts.VALIDATE_ERROR.getCode(), sb.toString());
|
|
||||||
} if(e instanceof BusinessException) {
|
|
||||||
club.joylink.rtss.exception.BusinessException be = (club.joylink.rtss.exception.BusinessException) e;
|
|
||||||
log.error("【业务异常】{}", e);
|
|
||||||
return CommonJsonResponse.newErrorResponse(be.getCode(), be.getVoMessage());
|
|
||||||
} else if(e instanceof MissingServletRequestParameterException) {
|
|
||||||
log.error("【接口参数异常】", e);
|
|
||||||
return CommonJsonResponse.newErrorResponse(ResponseConsts.VALIDATE_ERROR.getCode(), "接口参数异常");
|
|
||||||
} else if (e instanceof SimulationException) {
|
|
||||||
club.joylink.rtss.simulation.cbtc.exception.SimulationException simulationException = (club.joylink.rtss.simulation.cbtc.exception.SimulationException) e;
|
|
||||||
log.error("【仿真系统异常】{}", e);
|
|
||||||
return CommonJsonResponse.newErrorResponse(simulationException.getCode(), simulationException.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
log.error("【系统异常】{}", e);
|
|
||||||
return CommonJsonResponse.newErrorResponse();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
package club.joylink.rtss.controller.racetr;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 赛题训练接口
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/race")
|
||||||
|
public class RaceApplicationController {
|
||||||
|
/**
|
||||||
|
* 开始训练
|
||||||
|
*
|
||||||
|
* @param paperId 赛题ID
|
||||||
|
* @return 训练的信息
|
||||||
|
*/
|
||||||
|
@PostMapping("/{paperId}")
|
||||||
|
public Object start(@PathVariable long paperId) {
|
||||||
|
//暂时就用用户id作为竞赛上下文的id,也就是说一个用户同时只能开一个竞赛
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加载场景
|
||||||
|
*
|
||||||
|
* @param simulationId 场景依托的仿真
|
||||||
|
* @param sceneId 场景的ID
|
||||||
|
*/
|
||||||
|
@PutMapping("/{simulationId}/{sceneId}/load")
|
||||||
|
public void loadScene(@PathVariable String simulationId, @PathVariable String sceneId) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成任务
|
||||||
|
*
|
||||||
|
* @param taskId 任务ID
|
||||||
|
* @param record 任务记录(需要前端进行判定的操作的记录)
|
||||||
|
*/
|
||||||
|
@PutMapping("/{taskId}/finish")
|
||||||
|
public void finishTask(@PathVariable long taskId, @RequestBody Object record) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成训练
|
||||||
|
*
|
||||||
|
* @return 评分结果
|
||||||
|
*/
|
||||||
|
public Object finish() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户正在进行的竞赛信息
|
||||||
|
* <p>
|
||||||
|
* 目前想到的使用场景就是页面刷新后
|
||||||
|
*
|
||||||
|
* @return 竞赛信息
|
||||||
|
*/
|
||||||
|
@GetMapping("")
|
||||||
|
public Object getRaceInfo() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package club.joylink.rtss.controller.racetr;
|
||||||
|
|
||||||
|
|
||||||
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
|
import club.joylink.rtss.services.race.RacePaperService;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperDetailVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperModuleVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaperQueryVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RacePaperSingleModuleGroupTask;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞赛-试题管理
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/exercise/race/paper")
|
||||||
|
public class RacePaperController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RacePaperService racePaperService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建试卷
|
||||||
|
*/
|
||||||
|
@PostMapping()
|
||||||
|
public void save(@RequestBody RacePaperCreateVO createVO, @RequestAttribute AccountVO user) {
|
||||||
|
racePaperService.create(createVO, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/{id}")
|
||||||
|
public void update(@PathVariable("id") Long id, @RequestBody RacePaperCreateVO updateVO, @RequestAttribute AccountVO user) {
|
||||||
|
this.racePaperService.update(id, updateVO, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
@GetMapping("/page")
|
||||||
|
public PageVO<RacePaperVO> pageQuery(RacePaperQueryVO queryVO) {
|
||||||
|
return racePaperService.pageQuery(queryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/{id}/config")
|
||||||
|
public void configSeting(@PathVariable("id") Long id, @RequestBody RacePaperModuleVO moduleVO, @RequestAttribute AccountVO user) {
|
||||||
|
this.racePaperService.configSeting(id, moduleVO, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public RacePaperDetailVO detail(@PathVariable("id") Long id) {
|
||||||
|
return this.racePaperService.detail(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/{id}/copy")
|
||||||
|
public void copy(@PathVariable("id") Long id, @RequestAttribute AccountVO user) {
|
||||||
|
this.racePaperService.copy(id, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public void delete(@PathVariable("id") Long id) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(id);
|
||||||
|
racePaperService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{paperId}/module/{moduleId}/task")
|
||||||
|
public RacePaperSingleModuleGroupTask paperModuleTask(@PathVariable("paperId") Long id, @PathVariable("moduleId") Integer moduleId) {
|
||||||
|
return this.racePaperService.singlePaperModuleTask(id, moduleId);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package club.joylink.rtss.controller.racetr;
|
||||||
|
|
||||||
|
import club.joylink.rtss.services.race.RaceSceneService;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceSceneListVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceScenePublishVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceSceneVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneQueryVO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞赛-场景管理-发布的管理
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/exercise/race/scene")
|
||||||
|
public class RaceSceneController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RaceSceneService sceneService;
|
||||||
|
|
||||||
|
//草稿实训发布到场景
|
||||||
|
@PostMapping("/publish/training")
|
||||||
|
public void publishHere(@RequestBody RaceScenePublishVO vo, @RequestAttribute AccountVO user) {
|
||||||
|
this.sceneService.publishHere(vo, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public RaceSceneVO detail(@PathVariable("id") Long id) {
|
||||||
|
return this.sceneService.detail(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
public PageVO<RaceSceneListVO> page(RaceSceneQueryVO query) {
|
||||||
|
return this.sceneService.page(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public void delete(@PathVariable("id") Long id) {
|
||||||
|
this.sceneService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,62 @@
|
|||||||
|
package club.joylink.rtss.controller.racetr;
|
||||||
|
|
||||||
|
import club.joylink.rtss.services.race.RaceScoreRuleService;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceScoringRule.RaceScoringRuleListVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceScoringRule.RaceScoringRuleVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceScoringRule.Rule;
|
||||||
|
import club.joylink.rtss.vo.race.TaskRuleQueryVO;
|
||||||
|
import java.util.Map;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞赛-评分
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/exercise/race/score")
|
||||||
|
public class RaceScoreRuleController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RaceScoreRuleService scoreRuleService;
|
||||||
|
|
||||||
|
|
||||||
|
//任务评分的大致流程
|
||||||
|
//1.创建基础信息
|
||||||
|
//2.编辑评分具体的内容
|
||||||
|
@PostMapping
|
||||||
|
public void saveBasic(@RequestBody Map<String, String> nameMap, @RequestAttribute AccountVO user) {
|
||||||
|
|
||||||
|
this.scoreRuleService.saveBasic(nameMap.get("name"), user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/edit/rule/{ruleId}")
|
||||||
|
public void editRule(@PathVariable("ruleId") Long ruleId, @RequestBody Rule rule, @RequestAttribute AccountVO user) {
|
||||||
|
this.scoreRuleService.editRule(ruleId, rule, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public RaceScoringRuleVO detail(@PathVariable("id") Long id) {
|
||||||
|
return this.scoreRuleService.detail(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
public PageVO<RaceScoringRuleListVO> page(TaskRuleQueryVO query) {
|
||||||
|
return this.scoreRuleService.page(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("{id}")
|
||||||
|
public void delete(@PathVariable("id") Long id) {
|
||||||
|
this.scoreRuleService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,63 @@
|
|||||||
|
package club.joylink.rtss.controller.racetr;
|
||||||
|
|
||||||
|
|
||||||
|
import club.joylink.rtss.services.race.RaceSeasonService;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeasonCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeasonVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonQueryVO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 竞赛-赛季管理
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/exercise/race/season")
|
||||||
|
public class RaceSeasonController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RaceSeasonService raceSeasonService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加编辑
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @param user
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public void save(@RequestBody RaceSeasonCreateVO dto, @RequestAttribute AccountVO user) {
|
||||||
|
this.raceSeasonService.save(dto, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/{id}")
|
||||||
|
public void update(@PathVariable("id") Long id, @RequestBody RaceSeasonCreateVO dto, @RequestAttribute AccountVO user) {
|
||||||
|
this.raceSeasonService.update(id, dto, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找
|
||||||
|
*
|
||||||
|
* @param query
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/page")
|
||||||
|
public PageVO<RaceSeasonVO> page(RaceSeasonQueryVO query) {
|
||||||
|
return raceSeasonService.page(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
//绑定过的数据不能删除,没有绑定的可以删除(物理删除)
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public void delete(@PathVariable("id") Long id) {
|
||||||
|
this.raceSeasonService.delete(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
package club.joylink.rtss.controller.racetr;
|
||||||
|
|
||||||
|
import club.joylink.rtss.services.race.RaceTaskService;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskBind;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskDetailVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTaskTreeVO;
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/exercise/race/task")
|
||||||
|
public class RaceTaskController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RaceTaskService taskService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建任务并绑定对应的发布场景
|
||||||
|
*
|
||||||
|
* @param vo
|
||||||
|
* @param user
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public void save(@RequestBody RaceTaskCreateVO vo, @RequestAttribute AccountVO user) {
|
||||||
|
this.taskService.save(vo, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/{id}")
|
||||||
|
public void update(@PathVariable("id") Long id, @RequestBody RaceTaskCreateVO vo, @RequestAttribute AccountVO user) {
|
||||||
|
this.taskService.update(id, vo, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/{taskId}/bind")
|
||||||
|
public void bind(@PathVariable("taskId") Long taskId, @RequestBody List<RaceTaskBind> bind, @RequestAttribute AccountVO user) {
|
||||||
|
this.taskService.bind(taskId, bind, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//返回基本信息id,name
|
||||||
|
@GetMapping("/tree")
|
||||||
|
public List<RaceTaskTreeVO> tree() {
|
||||||
|
return this.taskService.tree();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public void delete(@PathVariable("id") Long id) {
|
||||||
|
this.taskService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{id}/children")
|
||||||
|
public List<RaceTaskTreeVO> childList(@PathVariable("id") Long id) {
|
||||||
|
return this.taskService.findChildren(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public RaceTaskDetailVO detail(@PathVariable("id") Long id) {
|
||||||
|
return this.taskService.detail(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,55 @@
|
|||||||
|
package club.joylink.rtss.dao.racetr;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrPaper;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrPaperExample;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaperPageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaperQueryVO;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RacetrPaperDAO继承基类
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RacetrPaperDAO extends MyBatisBaseDao<RacetrPaper, Long, RacetrPaperExample> {
|
||||||
|
|
||||||
|
@Select("<script>"
|
||||||
|
+ " select A.id,A.name,A.`desc`,A.season_id as seasonId ,B.code as seasonName,B.group"
|
||||||
|
+ " ,A.creator_id,A.create_time,A.updater_id,A.update_time,C.nickname as creatorName,D.nickname as updaterName "
|
||||||
|
+ " from racetr_paper A left join racetr_season B on A.season_id = B.id "
|
||||||
|
+ " left join sys_account C on A.creator_id = C.id "
|
||||||
|
+ " left JOIN sys_account D on A.updater_id = D.id "
|
||||||
|
+ " where 1 = 1 "
|
||||||
|
+ "<if test='vo.name!= null and vo.name!= \"\"'> "
|
||||||
|
+ " and A.name like CONCAT('%',#{vo.name},'%') "
|
||||||
|
+ "</if> "
|
||||||
|
|
||||||
|
+ "<if test='vo.group!= null and vo.group != \"\"'> "
|
||||||
|
+ " and B.group = #{vo.group} "
|
||||||
|
+ "</if> "
|
||||||
|
+ "<if test='vo.seasonId!= null and vo.seasonId!= \"\"'> "
|
||||||
|
+ " and A.season_id = #{vo.seasonId} "
|
||||||
|
+ "</if> "
|
||||||
|
+ "<if test='vo.seasonName!= null and vo.seasonName!= \"\"'> "
|
||||||
|
+ " and B.code like CONCAT('%',#{vo.seasonName},'%') "
|
||||||
|
+ "</if> "
|
||||||
|
+ "</script>")
|
||||||
|
List<RacePaperPageVO> pages(@Param("vo") RacePaperQueryVO vo);
|
||||||
|
|
||||||
|
@Select("<script>"
|
||||||
|
+ " select A.id,A.name,A.`desc`,A.season_id as seasonId ,B.code as seasonName "
|
||||||
|
+ " ,A.configs,A.creator_id,A.create_time,A.updater_id,A.update_time,C.nickname as creatorName,D.nickname as updaterName "
|
||||||
|
+ " from racetr_paper A left join racetr_season B on A.season_id = B.id "
|
||||||
|
+ " left join sys_account C on A.creator_id = C.id "
|
||||||
|
+ " left JOIN sys_account D on A.updater_id = D.id "
|
||||||
|
+ " where 1 = 1 "
|
||||||
|
+ " and A.id = #{id}"
|
||||||
|
+ "</script>")
|
||||||
|
RacePaperPageVO detail(@Param("id") Long id);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package club.joylink.rtss.dao.racetr;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrScene;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrSceneExample;
|
||||||
|
import club.joylink.rtss.vo.race.RaceScenePageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneQueryVO;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RacetrSceneDAO继承基类
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RacetrSceneDAO extends MyBatisBaseDao<RacetrScene, Long, RacetrSceneExample> {
|
||||||
|
|
||||||
|
@Select("<script>"
|
||||||
|
+ "select A.id,A.name,A.type,A.map_id as mapId, B.name as mapName, "
|
||||||
|
+ "A.creator_id,A.create_time,A.updater_id,A.update_time,C.nickname as creatorName,D.nickname as updaterName "
|
||||||
|
+ "from racetr_scene A left join map_info B on A.map_id = B.id "
|
||||||
|
+ "left join sys_account C on A.creator_id = C.id "
|
||||||
|
+ "left JOIN sys_account D on A.updater_id = D.id "
|
||||||
|
+ " where 1 = 1 "
|
||||||
|
+ "<if test='vo.name!= null and vo.name!= \"\"'> "
|
||||||
|
+ " and A.name like CONCAT('%',#{vo.name},'%') "
|
||||||
|
+ "</if> "
|
||||||
|
+ "<if test='vo.type!= null and vo.type!= \"\"'> "
|
||||||
|
+ " and A.type = ${vo.type}"
|
||||||
|
+ "</if> "
|
||||||
|
+ "</script>")
|
||||||
|
List<RaceScenePageVO> pages(@Param("vo") RaceSceneQueryVO vo);
|
||||||
|
|
||||||
|
@Select("<script>"
|
||||||
|
+ "select A.id,A.name,A.type,A.map_id as mapId, B.name as mapName, A.proto"
|
||||||
|
+ ",A.creator_id,A.create_time,A.updater_id,A.update_time,C.nickname as creatorName,D.nickname as updaterName "
|
||||||
|
+ "from racetr_scene A left join map_info B on A.map_id = B.id "
|
||||||
|
+ "left join sys_account C on A.creator_id = C.id "
|
||||||
|
+ "left JOIN sys_account D on A.updater_id = D.id "
|
||||||
|
+ " where 1 = 1 "
|
||||||
|
+ " and A.id = #{id} "
|
||||||
|
+ "</script>")
|
||||||
|
RaceScenePageVO detail(@Param("id") Long id);
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package club.joylink.rtss.dao.racetr;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrScoringRule;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrScoringRuleExample;
|
||||||
|
import club.joylink.rtss.vo.race.RaceRuleListVO;
|
||||||
|
import club.joylink.rtss.vo.race.TaskRuleQueryVO;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RacetrScoringRuleDAO继承基类
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RacetrScoringRuleDAO extends MyBatisBaseDao<RacetrScoringRule, Long, RacetrScoringRuleExample> {
|
||||||
|
|
||||||
|
@Select("<script>"
|
||||||
|
+ " select A.id,A.name"
|
||||||
|
+ " ,A.creator_id,A.create_time,A.updater_id,A.update_time,C.nickname as creatorName,D.nickname as updaterName "
|
||||||
|
+ " from racetr_scoring_rule A "
|
||||||
|
+ " left join sys_account C on A.creator_id = C.id "
|
||||||
|
+ " left JOIN sys_account D on A.updater_id = D.id "
|
||||||
|
+ " where 1 = 1 "
|
||||||
|
+ "<if test='vo.name!= null and vo.name!= \"\"'> "
|
||||||
|
+ " and A.name like CONCAT('%',#{vo.name},'%') "
|
||||||
|
+ "</if> "
|
||||||
|
+ "<if test='vo.id!= null and vo.id >=0'> "
|
||||||
|
+ " and A.id = #{vo.id}"
|
||||||
|
+ "</if> "
|
||||||
|
+ "</script>")
|
||||||
|
List<RaceRuleListVO> pages(@Param("vo") TaskRuleQueryVO vo);
|
||||||
|
|
||||||
|
@Select("<script>"
|
||||||
|
+ " select A.id,A.name,A.rule"
|
||||||
|
+ " ,A.creator_id,A.create_time,A.updater_id,A.update_time,C.nickname as creatorName,D.nickname as updaterName "
|
||||||
|
+ " from racetr_scoring_rule A "
|
||||||
|
+ " left join sys_account C on A.creator_id = C.id "
|
||||||
|
+ " left JOIN sys_account D on A.updater_id = D.id "
|
||||||
|
+ " where 1 = 1 "
|
||||||
|
+ " and A.id = #{id}"
|
||||||
|
+ "</script>")
|
||||||
|
RaceRuleListVO detail(@Param("id") Long id);
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
package club.joylink.rtss.dao.racetr;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrSeason;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrSeasonExample;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RacetrSeasonDAO继承基类
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RacetrSeasonDAO extends MyBatisBaseDao<RacetrSeason, Long, RacetrSeasonExample> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package club.joylink.rtss.dao.racetr;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.MyBatisBaseDao;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrTask;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrTaskExample;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTaskDetailDTO;
|
||||||
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RacetrTaskDAO继承基类
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RacetrTaskDAO extends MyBatisBaseDao<RacetrTask, Long, RacetrTaskExample> {
|
||||||
|
|
||||||
|
@Select("<script>"
|
||||||
|
+ "select A.id,A.name,A.desc,A.content,A.standards,A.scene_id,B.name as sceneName, "
|
||||||
|
+ "A.score_rule_id as rule_id,C.name as ruleName,A.parent_id,"
|
||||||
|
+ "A.creator_id,A.create_time,A.updater_id,A.update_time,D.nickname as creatorName,E.nickname as updaterName "
|
||||||
|
+ " from racetr_task A left join racetr_scene B on A.scene_id = B.id "
|
||||||
|
+ " left join racetr_scoring_rule C on A.score_rule_id = C.id "
|
||||||
|
+ " left join sys_account D on A.creator_id = D.id "
|
||||||
|
+ " left JOIN sys_account E on A.updater_id = E.id "
|
||||||
|
+ " where 1 = 1 "
|
||||||
|
+ " and A.id = #{id}"
|
||||||
|
+ "</script>")
|
||||||
|
RaceTaskDetailDTO details(@Param("id") Long id);
|
||||||
|
|
||||||
|
List<RaceTaskDetailDTO> recursiveFindTask(@Param("taskIds") List<Long> taskIds);
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RacetrPaper implements Serializable {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 赛季ID
|
||||||
|
*/
|
||||||
|
private Long seasonId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者的ID
|
||||||
|
*/
|
||||||
|
private Long creatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者的ID
|
||||||
|
*/
|
||||||
|
private Long updaterId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* module配置
|
||||||
|
*/
|
||||||
|
private byte[] configs;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
@ -0,0 +1,723 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RacetrPaperExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
private Long offset;
|
||||||
|
|
||||||
|
public RacetrPaperExample() {
|
||||||
|
oredCriteria = new ArrayList<Criteria>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderByClause(String orderByClause) {
|
||||||
|
this.orderByClause = orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderByClause() {
|
||||||
|
return orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistinct(boolean distinct) {
|
||||||
|
this.distinct = distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDistinct() {
|
||||||
|
return distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criteria> getOredCriteria() {
|
||||||
|
return oredCriteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void or(Criteria criteria) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria or() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLimit(Integer limit) {
|
||||||
|
this.limit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLimit() {
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOffset(Long offset) {
|
||||||
|
this.offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOffset() {
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract static class GeneratedCriteria {
|
||||||
|
protected List<Criterion> criteria;
|
||||||
|
|
||||||
|
protected GeneratedCriteria() {
|
||||||
|
super();
|
||||||
|
criteria = new ArrayList<Criterion>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return criteria.size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getAllCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition) {
|
||||||
|
if (condition == null) {
|
||||||
|
throw new RuntimeException("Value for condition cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value, String property) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||||
|
if (value1 == null || value2 == null) {
|
||||||
|
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value1, value2));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNull() {
|
||||||
|
addCriterion("id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNotNull() {
|
||||||
|
addCriterion("id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdEqualTo(Long value) {
|
||||||
|
addCriterion("id =", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("id <>", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThan(Long value) {
|
||||||
|
addCriterion("id >", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id >=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThan(Long value) {
|
||||||
|
addCriterion("id <", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id <=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIn(List<Long> values) {
|
||||||
|
addCriterion("id in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("id not in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id not between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIsNull() {
|
||||||
|
addCriterion("`name` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIsNotNull() {
|
||||||
|
addCriterion("`name` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameEqualTo(String value) {
|
||||||
|
addCriterion("`name` =", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotEqualTo(String value) {
|
||||||
|
addCriterion("`name` <>", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameGreaterThan(String value) {
|
||||||
|
addCriterion("`name` >", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`name` >=", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLessThan(String value) {
|
||||||
|
addCriterion("`name` <", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`name` <=", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLike(String value) {
|
||||||
|
addCriterion("`name` like", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotLike(String value) {
|
||||||
|
addCriterion("`name` not like", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIn(List<String> values) {
|
||||||
|
addCriterion("`name` in", values, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotIn(List<String> values) {
|
||||||
|
addCriterion("`name` not in", values, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("`name` between", value1, value2, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("`name` not between", value1, value2, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescIsNull() {
|
||||||
|
addCriterion("`desc` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescIsNotNull() {
|
||||||
|
addCriterion("`desc` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescEqualTo(String value) {
|
||||||
|
addCriterion("`desc` =", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescNotEqualTo(String value) {
|
||||||
|
addCriterion("`desc` <>", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescGreaterThan(String value) {
|
||||||
|
addCriterion("`desc` >", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`desc` >=", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescLessThan(String value) {
|
||||||
|
addCriterion("`desc` <", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`desc` <=", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescLike(String value) {
|
||||||
|
addCriterion("`desc` like", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescNotLike(String value) {
|
||||||
|
addCriterion("`desc` not like", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescIn(List<String> values) {
|
||||||
|
addCriterion("`desc` in", values, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescNotIn(List<String> values) {
|
||||||
|
addCriterion("`desc` not in", values, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescBetween(String value1, String value2) {
|
||||||
|
addCriterion("`desc` between", value1, value2, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("`desc` not between", value1, value2, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdIsNull() {
|
||||||
|
addCriterion("season_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdIsNotNull() {
|
||||||
|
addCriterion("season_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdEqualTo(Long value) {
|
||||||
|
addCriterion("season_id =", value, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("season_id <>", value, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdGreaterThan(Long value) {
|
||||||
|
addCriterion("season_id >", value, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("season_id >=", value, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdLessThan(Long value) {
|
||||||
|
addCriterion("season_id <", value, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("season_id <=", value, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdIn(List<Long> values) {
|
||||||
|
addCriterion("season_id in", values, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("season_id not in", values, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("season_id between", value1, value2, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSeasonIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("season_id not between", value1, value2, "seasonId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNull() {
|
||||||
|
addCriterion("creator_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNotNull() {
|
||||||
|
addCriterion("creator_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id =", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <>", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||||
|
addCriterion("creator_id >", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id >=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThan(Long value) {
|
||||||
|
addCriterion("creator_id <", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id not in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNull() {
|
||||||
|
addCriterion("create_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNotNull() {
|
||||||
|
addCriterion("create_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("create_time =", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <>", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("create_time >", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time >=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThan(Date value) {
|
||||||
|
addCriterion("create_time <", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("create_time in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("create_time not in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time not between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNull() {
|
||||||
|
addCriterion("updater_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNotNull() {
|
||||||
|
addCriterion("updater_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id =", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <>", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThan(Long value) {
|
||||||
|
addCriterion("updater_id >", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id >=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThan(Long value) {
|
||||||
|
addCriterion("updater_id <", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id not in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id not between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIsNull() {
|
||||||
|
addCriterion("update_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIsNotNull() {
|
||||||
|
addCriterion("update_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("update_time =", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("update_time <>", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("update_time >", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("update_time >=", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeLessThan(Date value) {
|
||||||
|
addCriterion("update_time <", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("update_time <=", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("update_time in", values, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("update_time not in", values, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("update_time between", value1, value2, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Criterion {
|
||||||
|
private String condition;
|
||||||
|
|
||||||
|
private Object value;
|
||||||
|
|
||||||
|
private Object secondValue;
|
||||||
|
|
||||||
|
private boolean noValue;
|
||||||
|
|
||||||
|
private boolean singleValue;
|
||||||
|
|
||||||
|
private boolean betweenValue;
|
||||||
|
|
||||||
|
private boolean listValue;
|
||||||
|
|
||||||
|
private String typeHandler;
|
||||||
|
|
||||||
|
public String getCondition() {
|
||||||
|
return condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondValue() {
|
||||||
|
return secondValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoValue() {
|
||||||
|
return noValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSingleValue() {
|
||||||
|
return singleValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBetweenValue() {
|
||||||
|
return betweenValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isListValue() {
|
||||||
|
return listValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeHandler() {
|
||||||
|
return typeHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.typeHandler = null;
|
||||||
|
this.noValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
if (value instanceof List<?>) {
|
||||||
|
this.listValue = true;
|
||||||
|
} else {
|
||||||
|
this.singleValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value) {
|
||||||
|
this(condition, value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.secondValue = secondValue;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
this.betweenValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue) {
|
||||||
|
this(condition, value, secondValue, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,67 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RacetrScene implements Serializable {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型(本地/链接)
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地图id
|
||||||
|
*/
|
||||||
|
private Long mapId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场景对应的线路功能ID
|
||||||
|
*/
|
||||||
|
private Long functionId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布场景关联实训
|
||||||
|
*/
|
||||||
|
private Long draftTrainingId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者的ID
|
||||||
|
*/
|
||||||
|
private Long creatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者的ID
|
||||||
|
*/
|
||||||
|
private Long updaterId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场景数据proto
|
||||||
|
*/
|
||||||
|
private byte[] proto;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
@ -0,0 +1,843 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RacetrSceneExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
private Long offset;
|
||||||
|
|
||||||
|
public RacetrSceneExample() {
|
||||||
|
oredCriteria = new ArrayList<Criteria>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderByClause(String orderByClause) {
|
||||||
|
this.orderByClause = orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderByClause() {
|
||||||
|
return orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistinct(boolean distinct) {
|
||||||
|
this.distinct = distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDistinct() {
|
||||||
|
return distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criteria> getOredCriteria() {
|
||||||
|
return oredCriteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void or(Criteria criteria) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria or() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLimit(Integer limit) {
|
||||||
|
this.limit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLimit() {
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOffset(Long offset) {
|
||||||
|
this.offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOffset() {
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract static class GeneratedCriteria {
|
||||||
|
protected List<Criterion> criteria;
|
||||||
|
|
||||||
|
protected GeneratedCriteria() {
|
||||||
|
super();
|
||||||
|
criteria = new ArrayList<Criterion>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return criteria.size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getAllCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition) {
|
||||||
|
if (condition == null) {
|
||||||
|
throw new RuntimeException("Value for condition cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value, String property) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||||
|
if (value1 == null || value2 == null) {
|
||||||
|
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value1, value2));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNull() {
|
||||||
|
addCriterion("id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNotNull() {
|
||||||
|
addCriterion("id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdEqualTo(Long value) {
|
||||||
|
addCriterion("id =", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("id <>", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThan(Long value) {
|
||||||
|
addCriterion("id >", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id >=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThan(Long value) {
|
||||||
|
addCriterion("id <", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id <=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIn(List<Long> values) {
|
||||||
|
addCriterion("id in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("id not in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id not between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIsNull() {
|
||||||
|
addCriterion("`name` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIsNotNull() {
|
||||||
|
addCriterion("`name` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameEqualTo(String value) {
|
||||||
|
addCriterion("`name` =", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotEqualTo(String value) {
|
||||||
|
addCriterion("`name` <>", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameGreaterThan(String value) {
|
||||||
|
addCriterion("`name` >", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`name` >=", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLessThan(String value) {
|
||||||
|
addCriterion("`name` <", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`name` <=", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLike(String value) {
|
||||||
|
addCriterion("`name` like", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotLike(String value) {
|
||||||
|
addCriterion("`name` not like", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIn(List<String> values) {
|
||||||
|
addCriterion("`name` in", values, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotIn(List<String> values) {
|
||||||
|
addCriterion("`name` not in", values, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("`name` between", value1, value2, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("`name` not between", value1, value2, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeIsNull() {
|
||||||
|
addCriterion("`type` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeIsNotNull() {
|
||||||
|
addCriterion("`type` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeEqualTo(String value) {
|
||||||
|
addCriterion("`type` =", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeNotEqualTo(String value) {
|
||||||
|
addCriterion("`type` <>", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeGreaterThan(String value) {
|
||||||
|
addCriterion("`type` >", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`type` >=", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeLessThan(String value) {
|
||||||
|
addCriterion("`type` <", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`type` <=", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeLike(String value) {
|
||||||
|
addCriterion("`type` like", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeNotLike(String value) {
|
||||||
|
addCriterion("`type` not like", value, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeIn(List<String> values) {
|
||||||
|
addCriterion("`type` in", values, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeNotIn(List<String> values) {
|
||||||
|
addCriterion("`type` not in", values, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeBetween(String value1, String value2) {
|
||||||
|
addCriterion("`type` between", value1, value2, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTypeNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("`type` not between", value1, value2, "type");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdIsNull() {
|
||||||
|
addCriterion("map_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdIsNotNull() {
|
||||||
|
addCriterion("map_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdEqualTo(Long value) {
|
||||||
|
addCriterion("map_id =", value, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("map_id <>", value, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdGreaterThan(Long value) {
|
||||||
|
addCriterion("map_id >", value, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("map_id >=", value, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdLessThan(Long value) {
|
||||||
|
addCriterion("map_id <", value, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("map_id <=", value, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdIn(List<Long> values) {
|
||||||
|
addCriterion("map_id in", values, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("map_id not in", values, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("map_id between", value1, value2, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andMapIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("map_id not between", value1, value2, "mapId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdIsNull() {
|
||||||
|
addCriterion("function_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdIsNotNull() {
|
||||||
|
addCriterion("function_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdEqualTo(Long value) {
|
||||||
|
addCriterion("function_id =", value, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("function_id <>", value, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdGreaterThan(Long value) {
|
||||||
|
addCriterion("function_id >", value, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("function_id >=", value, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdLessThan(Long value) {
|
||||||
|
addCriterion("function_id <", value, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("function_id <=", value, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdIn(List<Long> values) {
|
||||||
|
addCriterion("function_id in", values, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("function_id not in", values, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("function_id between", value1, value2, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andFunctionIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("function_id not between", value1, value2, "functionId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdIsNull() {
|
||||||
|
addCriterion("draft_training_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdIsNotNull() {
|
||||||
|
addCriterion("draft_training_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdEqualTo(Long value) {
|
||||||
|
addCriterion("draft_training_id =", value, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("draft_training_id <>", value, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdGreaterThan(Long value) {
|
||||||
|
addCriterion("draft_training_id >", value, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("draft_training_id >=", value, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdLessThan(Long value) {
|
||||||
|
addCriterion("draft_training_id <", value, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("draft_training_id <=", value, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdIn(List<Long> values) {
|
||||||
|
addCriterion("draft_training_id in", values, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("draft_training_id not in", values, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("draft_training_id between", value1, value2, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDraftTrainingIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("draft_training_id not between", value1, value2, "draftTrainingId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNull() {
|
||||||
|
addCriterion("creator_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNotNull() {
|
||||||
|
addCriterion("creator_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id =", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <>", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||||
|
addCriterion("creator_id >", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id >=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThan(Long value) {
|
||||||
|
addCriterion("creator_id <", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id not in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNull() {
|
||||||
|
addCriterion("create_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNotNull() {
|
||||||
|
addCriterion("create_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("create_time =", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <>", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("create_time >", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time >=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThan(Date value) {
|
||||||
|
addCriterion("create_time <", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("create_time in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("create_time not in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time not between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNull() {
|
||||||
|
addCriterion("updater_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNotNull() {
|
||||||
|
addCriterion("updater_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id =", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <>", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThan(Long value) {
|
||||||
|
addCriterion("updater_id >", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id >=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThan(Long value) {
|
||||||
|
addCriterion("updater_id <", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id not in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id not between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIsNull() {
|
||||||
|
addCriterion("update_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIsNotNull() {
|
||||||
|
addCriterion("update_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("update_time =", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("update_time <>", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("update_time >", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("update_time >=", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeLessThan(Date value) {
|
||||||
|
addCriterion("update_time <", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("update_time <=", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("update_time in", values, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("update_time not in", values, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("update_time between", value1, value2, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Criterion {
|
||||||
|
private String condition;
|
||||||
|
|
||||||
|
private Object value;
|
||||||
|
|
||||||
|
private Object secondValue;
|
||||||
|
|
||||||
|
private boolean noValue;
|
||||||
|
|
||||||
|
private boolean singleValue;
|
||||||
|
|
||||||
|
private boolean betweenValue;
|
||||||
|
|
||||||
|
private boolean listValue;
|
||||||
|
|
||||||
|
private String typeHandler;
|
||||||
|
|
||||||
|
public String getCondition() {
|
||||||
|
return condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondValue() {
|
||||||
|
return secondValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoValue() {
|
||||||
|
return noValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSingleValue() {
|
||||||
|
return singleValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBetweenValue() {
|
||||||
|
return betweenValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isListValue() {
|
||||||
|
return listValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeHandler() {
|
||||||
|
return typeHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.typeHandler = null;
|
||||||
|
this.noValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
if (value instanceof List<?>) {
|
||||||
|
this.listValue = true;
|
||||||
|
} else {
|
||||||
|
this.singleValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value) {
|
||||||
|
this(condition, value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.secondValue = secondValue;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
this.betweenValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue) {
|
||||||
|
this(condition, value, secondValue, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,47 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RacetrScoringRule implements Serializable {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者的ID
|
||||||
|
*/
|
||||||
|
private Long creatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者的ID
|
||||||
|
*/
|
||||||
|
private Long updaterId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分规则细则proto
|
||||||
|
*/
|
||||||
|
private byte[] rule;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
@ -0,0 +1,593 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RacetrScoringRuleExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
private Long offset;
|
||||||
|
|
||||||
|
public RacetrScoringRuleExample() {
|
||||||
|
oredCriteria = new ArrayList<Criteria>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderByClause(String orderByClause) {
|
||||||
|
this.orderByClause = orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderByClause() {
|
||||||
|
return orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistinct(boolean distinct) {
|
||||||
|
this.distinct = distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDistinct() {
|
||||||
|
return distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criteria> getOredCriteria() {
|
||||||
|
return oredCriteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void or(Criteria criteria) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria or() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLimit(Integer limit) {
|
||||||
|
this.limit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLimit() {
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOffset(Long offset) {
|
||||||
|
this.offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOffset() {
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract static class GeneratedCriteria {
|
||||||
|
protected List<Criterion> criteria;
|
||||||
|
|
||||||
|
protected GeneratedCriteria() {
|
||||||
|
super();
|
||||||
|
criteria = new ArrayList<Criterion>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return criteria.size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getAllCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition) {
|
||||||
|
if (condition == null) {
|
||||||
|
throw new RuntimeException("Value for condition cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value, String property) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||||
|
if (value1 == null || value2 == null) {
|
||||||
|
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value1, value2));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNull() {
|
||||||
|
addCriterion("id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNotNull() {
|
||||||
|
addCriterion("id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdEqualTo(Long value) {
|
||||||
|
addCriterion("id =", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("id <>", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThan(Long value) {
|
||||||
|
addCriterion("id >", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id >=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThan(Long value) {
|
||||||
|
addCriterion("id <", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id <=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIn(List<Long> values) {
|
||||||
|
addCriterion("id in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("id not in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id not between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIsNull() {
|
||||||
|
addCriterion("`name` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIsNotNull() {
|
||||||
|
addCriterion("`name` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameEqualTo(String value) {
|
||||||
|
addCriterion("`name` =", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotEqualTo(String value) {
|
||||||
|
addCriterion("`name` <>", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameGreaterThan(String value) {
|
||||||
|
addCriterion("`name` >", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`name` >=", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLessThan(String value) {
|
||||||
|
addCriterion("`name` <", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`name` <=", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLike(String value) {
|
||||||
|
addCriterion("`name` like", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotLike(String value) {
|
||||||
|
addCriterion("`name` not like", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIn(List<String> values) {
|
||||||
|
addCriterion("`name` in", values, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotIn(List<String> values) {
|
||||||
|
addCriterion("`name` not in", values, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("`name` between", value1, value2, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("`name` not between", value1, value2, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNull() {
|
||||||
|
addCriterion("creator_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNotNull() {
|
||||||
|
addCriterion("creator_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id =", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <>", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||||
|
addCriterion("creator_id >", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id >=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThan(Long value) {
|
||||||
|
addCriterion("creator_id <", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id not in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNull() {
|
||||||
|
addCriterion("create_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNotNull() {
|
||||||
|
addCriterion("create_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("create_time =", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <>", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("create_time >", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time >=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThan(Date value) {
|
||||||
|
addCriterion("create_time <", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("create_time in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("create_time not in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time not between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNull() {
|
||||||
|
addCriterion("updater_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNotNull() {
|
||||||
|
addCriterion("updater_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id =", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <>", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThan(Long value) {
|
||||||
|
addCriterion("updater_id >", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id >=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThan(Long value) {
|
||||||
|
addCriterion("updater_id <", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id not in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id not between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIsNull() {
|
||||||
|
addCriterion("update_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIsNotNull() {
|
||||||
|
addCriterion("update_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("update_time =", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("update_time <>", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("update_time >", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("update_time >=", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeLessThan(Date value) {
|
||||||
|
addCriterion("update_time <", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("update_time <=", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("update_time in", values, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("update_time not in", values, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("update_time between", value1, value2, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Criterion {
|
||||||
|
private String condition;
|
||||||
|
|
||||||
|
private Object value;
|
||||||
|
|
||||||
|
private Object secondValue;
|
||||||
|
|
||||||
|
private boolean noValue;
|
||||||
|
|
||||||
|
private boolean singleValue;
|
||||||
|
|
||||||
|
private boolean betweenValue;
|
||||||
|
|
||||||
|
private boolean listValue;
|
||||||
|
|
||||||
|
private String typeHandler;
|
||||||
|
|
||||||
|
public String getCondition() {
|
||||||
|
return condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondValue() {
|
||||||
|
return secondValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoValue() {
|
||||||
|
return noValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSingleValue() {
|
||||||
|
return singleValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBetweenValue() {
|
||||||
|
return betweenValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isListValue() {
|
||||||
|
return listValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeHandler() {
|
||||||
|
return typeHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.typeHandler = null;
|
||||||
|
this.noValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
if (value instanceof List<?>) {
|
||||||
|
this.listValue = true;
|
||||||
|
} else {
|
||||||
|
this.singleValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value) {
|
||||||
|
this(condition, value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.secondValue = secondValue;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
this.betweenValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue) {
|
||||||
|
this(condition, value, secondValue, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RacetrSeason implements Serializable {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组别(1=中职/2=高职)
|
||||||
|
*/
|
||||||
|
private String group;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年度
|
||||||
|
*/
|
||||||
|
private String term;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者的ID
|
||||||
|
*/
|
||||||
|
private Long creatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者的ID
|
||||||
|
*/
|
||||||
|
private Long updaterId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime udpateTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
@ -0,0 +1,733 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RacetrSeasonExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
private Long offset;
|
||||||
|
|
||||||
|
public RacetrSeasonExample() {
|
||||||
|
oredCriteria = new ArrayList<Criteria>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderByClause(String orderByClause) {
|
||||||
|
this.orderByClause = orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderByClause() {
|
||||||
|
return orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistinct(boolean distinct) {
|
||||||
|
this.distinct = distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDistinct() {
|
||||||
|
return distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criteria> getOredCriteria() {
|
||||||
|
return oredCriteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void or(Criteria criteria) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria or() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLimit(Integer limit) {
|
||||||
|
this.limit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLimit() {
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOffset(Long offset) {
|
||||||
|
this.offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOffset() {
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract static class GeneratedCriteria {
|
||||||
|
protected List<Criterion> criteria;
|
||||||
|
|
||||||
|
protected GeneratedCriteria() {
|
||||||
|
super();
|
||||||
|
criteria = new ArrayList<Criterion>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return criteria.size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getAllCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition) {
|
||||||
|
if (condition == null) {
|
||||||
|
throw new RuntimeException("Value for condition cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value, String property) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||||
|
if (value1 == null || value2 == null) {
|
||||||
|
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value1, value2));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNull() {
|
||||||
|
addCriterion("id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNotNull() {
|
||||||
|
addCriterion("id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdEqualTo(Long value) {
|
||||||
|
addCriterion("id =", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("id <>", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThan(Long value) {
|
||||||
|
addCriterion("id >", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id >=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThan(Long value) {
|
||||||
|
addCriterion("id <", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id <=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIn(List<Long> values) {
|
||||||
|
addCriterion("id in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("id not in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id not between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeIsNull() {
|
||||||
|
addCriterion("code is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeIsNotNull() {
|
||||||
|
addCriterion("code is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeEqualTo(String value) {
|
||||||
|
addCriterion("code =", value, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeNotEqualTo(String value) {
|
||||||
|
addCriterion("code <>", value, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeGreaterThan(String value) {
|
||||||
|
addCriterion("code >", value, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("code >=", value, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeLessThan(String value) {
|
||||||
|
addCriterion("code <", value, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("code <=", value, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeLike(String value) {
|
||||||
|
addCriterion("code like", value, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeNotLike(String value) {
|
||||||
|
addCriterion("code not like", value, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeIn(List<String> values) {
|
||||||
|
addCriterion("code in", values, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeNotIn(List<String> values) {
|
||||||
|
addCriterion("code not in", values, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeBetween(String value1, String value2) {
|
||||||
|
addCriterion("code between", value1, value2, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCodeNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("code not between", value1, value2, "code");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupIsNull() {
|
||||||
|
addCriterion("`group` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupIsNotNull() {
|
||||||
|
addCriterion("`group` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupEqualTo(String value) {
|
||||||
|
addCriterion("`group` =", value, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupNotEqualTo(String value) {
|
||||||
|
addCriterion("`group` <>", value, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupGreaterThan(String value) {
|
||||||
|
addCriterion("`group` >", value, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`group` >=", value, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupLessThan(String value) {
|
||||||
|
addCriterion("`group` <", value, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`group` <=", value, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupLike(String value) {
|
||||||
|
addCriterion("`group` like", value, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupNotLike(String value) {
|
||||||
|
addCriterion("`group` not like", value, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupIn(List<String> values) {
|
||||||
|
addCriterion("`group` in", values, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupNotIn(List<String> values) {
|
||||||
|
addCriterion("`group` not in", values, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupBetween(String value1, String value2) {
|
||||||
|
addCriterion("`group` between", value1, value2, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andGroupNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("`group` not between", value1, value2, "group");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermIsNull() {
|
||||||
|
addCriterion("term is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermIsNotNull() {
|
||||||
|
addCriterion("term is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermEqualTo(String value) {
|
||||||
|
addCriterion("term =", value, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermNotEqualTo(String value) {
|
||||||
|
addCriterion("term <>", value, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermGreaterThan(String value) {
|
||||||
|
addCriterion("term >", value, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("term >=", value, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermLessThan(String value) {
|
||||||
|
addCriterion("term <", value, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("term <=", value, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermLike(String value) {
|
||||||
|
addCriterion("term like", value, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermNotLike(String value) {
|
||||||
|
addCriterion("term not like", value, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermIn(List<String> values) {
|
||||||
|
addCriterion("term in", values, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermNotIn(List<String> values) {
|
||||||
|
addCriterion("term not in", values, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermBetween(String value1, String value2) {
|
||||||
|
addCriterion("term between", value1, value2, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andTermNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("term not between", value1, value2, "term");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNull() {
|
||||||
|
addCriterion("creator_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNotNull() {
|
||||||
|
addCriterion("creator_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id =", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <>", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||||
|
addCriterion("creator_id >", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id >=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThan(Long value) {
|
||||||
|
addCriterion("creator_id <", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id not in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNull() {
|
||||||
|
addCriterion("create_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNotNull() {
|
||||||
|
addCriterion("create_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("create_time =", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <>", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("create_time >", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time >=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThan(Date value) {
|
||||||
|
addCriterion("create_time <", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("create_time in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("create_time not in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time not between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNull() {
|
||||||
|
addCriterion("updater_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNotNull() {
|
||||||
|
addCriterion("updater_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id =", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <>", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThan(Long value) {
|
||||||
|
addCriterion("updater_id >", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id >=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThan(Long value) {
|
||||||
|
addCriterion("updater_id <", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id not in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id not between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeIsNull() {
|
||||||
|
addCriterion("udpate_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeIsNotNull() {
|
||||||
|
addCriterion("udpate_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("udpate_time =", value, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("udpate_time <>", value, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("udpate_time >", value, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("udpate_time >=", value, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeLessThan(Date value) {
|
||||||
|
addCriterion("udpate_time <", value, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("udpate_time <=", value, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("udpate_time in", values, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("udpate_time not in", values, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("udpate_time between", value1, value2, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUdpateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("udpate_time not between", value1, value2, "udpateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Criterion {
|
||||||
|
private String condition;
|
||||||
|
|
||||||
|
private Object value;
|
||||||
|
|
||||||
|
private Object secondValue;
|
||||||
|
|
||||||
|
private boolean noValue;
|
||||||
|
|
||||||
|
private boolean singleValue;
|
||||||
|
|
||||||
|
private boolean betweenValue;
|
||||||
|
|
||||||
|
private boolean listValue;
|
||||||
|
|
||||||
|
private String typeHandler;
|
||||||
|
|
||||||
|
public String getCondition() {
|
||||||
|
return condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondValue() {
|
||||||
|
return secondValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoValue() {
|
||||||
|
return noValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSingleValue() {
|
||||||
|
return singleValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBetweenValue() {
|
||||||
|
return betweenValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isListValue() {
|
||||||
|
return listValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeHandler() {
|
||||||
|
return typeHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.typeHandler = null;
|
||||||
|
this.noValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
if (value instanceof List<?>) {
|
||||||
|
this.listValue = true;
|
||||||
|
} else {
|
||||||
|
this.singleValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value) {
|
||||||
|
this(condition, value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.secondValue = secondValue;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
this.betweenValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue) {
|
||||||
|
this(condition, value, secondValue, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RacetrTask implements Serializable {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 基础描述(文本)
|
||||||
|
*/
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考核内容(文本)
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价标准(文本)
|
||||||
|
*/
|
||||||
|
private String standards;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务场景
|
||||||
|
*/
|
||||||
|
private Long sceneId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评分规则
|
||||||
|
*/
|
||||||
|
private Long scoreRuleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父任务ID
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者的ID
|
||||||
|
*/
|
||||||
|
private Long creatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者的ID
|
||||||
|
*/
|
||||||
|
private Long updaterId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
@ -0,0 +1,983 @@
|
|||||||
|
package club.joylink.rtss.entity.racetr;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RacetrTaskExample {
|
||||||
|
protected String orderByClause;
|
||||||
|
|
||||||
|
protected boolean distinct;
|
||||||
|
|
||||||
|
protected List<Criteria> oredCriteria;
|
||||||
|
|
||||||
|
private Integer limit;
|
||||||
|
|
||||||
|
private Long offset;
|
||||||
|
|
||||||
|
public RacetrTaskExample() {
|
||||||
|
oredCriteria = new ArrayList<Criteria>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrderByClause(String orderByClause) {
|
||||||
|
this.orderByClause = orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOrderByClause() {
|
||||||
|
return orderByClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistinct(boolean distinct) {
|
||||||
|
this.distinct = distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDistinct() {
|
||||||
|
return distinct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criteria> getOredCriteria() {
|
||||||
|
return oredCriteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void or(Criteria criteria) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria or() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria createCriteria() {
|
||||||
|
Criteria criteria = createCriteriaInternal();
|
||||||
|
if (oredCriteria.size() == 0) {
|
||||||
|
oredCriteria.add(criteria);
|
||||||
|
}
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criteria createCriteriaInternal() {
|
||||||
|
Criteria criteria = new Criteria();
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
oredCriteria.clear();
|
||||||
|
orderByClause = null;
|
||||||
|
distinct = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLimit(Integer limit) {
|
||||||
|
this.limit = limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLimit() {
|
||||||
|
return limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOffset(Long offset) {
|
||||||
|
this.offset = offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getOffset() {
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract static class GeneratedCriteria {
|
||||||
|
protected List<Criterion> criteria;
|
||||||
|
|
||||||
|
protected GeneratedCriteria() {
|
||||||
|
super();
|
||||||
|
criteria = new ArrayList<Criterion>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValid() {
|
||||||
|
return criteria.size() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getAllCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Criterion> getCriteria() {
|
||||||
|
return criteria;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition) {
|
||||||
|
if (condition == null) {
|
||||||
|
throw new RuntimeException("Value for condition cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value, String property) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||||
|
if (value1 == null || value2 == null) {
|
||||||
|
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||||
|
}
|
||||||
|
criteria.add(new Criterion(condition, value1, value2));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNull() {
|
||||||
|
addCriterion("id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIsNotNull() {
|
||||||
|
addCriterion("id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdEqualTo(Long value) {
|
||||||
|
addCriterion("id =", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("id <>", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThan(Long value) {
|
||||||
|
addCriterion("id >", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id >=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThan(Long value) {
|
||||||
|
addCriterion("id <", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("id <=", value, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdIn(List<Long> values) {
|
||||||
|
addCriterion("id in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("id not in", values, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("id not between", value1, value2, "id");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIsNull() {
|
||||||
|
addCriterion("`name` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIsNotNull() {
|
||||||
|
addCriterion("`name` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameEqualTo(String value) {
|
||||||
|
addCriterion("`name` =", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotEqualTo(String value) {
|
||||||
|
addCriterion("`name` <>", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameGreaterThan(String value) {
|
||||||
|
addCriterion("`name` >", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`name` >=", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLessThan(String value) {
|
||||||
|
addCriterion("`name` <", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`name` <=", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameLike(String value) {
|
||||||
|
addCriterion("`name` like", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotLike(String value) {
|
||||||
|
addCriterion("`name` not like", value, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameIn(List<String> values) {
|
||||||
|
addCriterion("`name` in", values, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotIn(List<String> values) {
|
||||||
|
addCriterion("`name` not in", values, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameBetween(String value1, String value2) {
|
||||||
|
addCriterion("`name` between", value1, value2, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andNameNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("`name` not between", value1, value2, "name");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescIsNull() {
|
||||||
|
addCriterion("`desc` is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescIsNotNull() {
|
||||||
|
addCriterion("`desc` is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescEqualTo(String value) {
|
||||||
|
addCriterion("`desc` =", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescNotEqualTo(String value) {
|
||||||
|
addCriterion("`desc` <>", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescGreaterThan(String value) {
|
||||||
|
addCriterion("`desc` >", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`desc` >=", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescLessThan(String value) {
|
||||||
|
addCriterion("`desc` <", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("`desc` <=", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescLike(String value) {
|
||||||
|
addCriterion("`desc` like", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescNotLike(String value) {
|
||||||
|
addCriterion("`desc` not like", value, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescIn(List<String> values) {
|
||||||
|
addCriterion("`desc` in", values, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescNotIn(List<String> values) {
|
||||||
|
addCriterion("`desc` not in", values, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescBetween(String value1, String value2) {
|
||||||
|
addCriterion("`desc` between", value1, value2, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andDescNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("`desc` not between", value1, value2, "desc");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentIsNull() {
|
||||||
|
addCriterion("content is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentIsNotNull() {
|
||||||
|
addCriterion("content is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentEqualTo(String value) {
|
||||||
|
addCriterion("content =", value, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentNotEqualTo(String value) {
|
||||||
|
addCriterion("content <>", value, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentGreaterThan(String value) {
|
||||||
|
addCriterion("content >", value, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("content >=", value, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentLessThan(String value) {
|
||||||
|
addCriterion("content <", value, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("content <=", value, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentLike(String value) {
|
||||||
|
addCriterion("content like", value, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentNotLike(String value) {
|
||||||
|
addCriterion("content not like", value, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentIn(List<String> values) {
|
||||||
|
addCriterion("content in", values, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentNotIn(List<String> values) {
|
||||||
|
addCriterion("content not in", values, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentBetween(String value1, String value2) {
|
||||||
|
addCriterion("content between", value1, value2, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andContentNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("content not between", value1, value2, "content");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsIsNull() {
|
||||||
|
addCriterion("standards is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsIsNotNull() {
|
||||||
|
addCriterion("standards is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsEqualTo(String value) {
|
||||||
|
addCriterion("standards =", value, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsNotEqualTo(String value) {
|
||||||
|
addCriterion("standards <>", value, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsGreaterThan(String value) {
|
||||||
|
addCriterion("standards >", value, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("standards >=", value, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsLessThan(String value) {
|
||||||
|
addCriterion("standards <", value, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("standards <=", value, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsLike(String value) {
|
||||||
|
addCriterion("standards like", value, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsNotLike(String value) {
|
||||||
|
addCriterion("standards not like", value, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsIn(List<String> values) {
|
||||||
|
addCriterion("standards in", values, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsNotIn(List<String> values) {
|
||||||
|
addCriterion("standards not in", values, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsBetween(String value1, String value2) {
|
||||||
|
addCriterion("standards between", value1, value2, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andStandardsNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("standards not between", value1, value2, "standards");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdIsNull() {
|
||||||
|
addCriterion("scene_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdIsNotNull() {
|
||||||
|
addCriterion("scene_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdEqualTo(Long value) {
|
||||||
|
addCriterion("scene_id =", value, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("scene_id <>", value, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdGreaterThan(Long value) {
|
||||||
|
addCriterion("scene_id >", value, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("scene_id >=", value, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdLessThan(Long value) {
|
||||||
|
addCriterion("scene_id <", value, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("scene_id <=", value, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdIn(List<Long> values) {
|
||||||
|
addCriterion("scene_id in", values, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("scene_id not in", values, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("scene_id between", value1, value2, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andSceneIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("scene_id not between", value1, value2, "sceneId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdIsNull() {
|
||||||
|
addCriterion("score_rule_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdIsNotNull() {
|
||||||
|
addCriterion("score_rule_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdEqualTo(Long value) {
|
||||||
|
addCriterion("score_rule_id =", value, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("score_rule_id <>", value, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdGreaterThan(Long value) {
|
||||||
|
addCriterion("score_rule_id >", value, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("score_rule_id >=", value, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdLessThan(Long value) {
|
||||||
|
addCriterion("score_rule_id <", value, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("score_rule_id <=", value, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdIn(List<Long> values) {
|
||||||
|
addCriterion("score_rule_id in", values, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("score_rule_id not in", values, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("score_rule_id between", value1, value2, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andScoreRuleIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("score_rule_id not between", value1, value2, "scoreRuleId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdIsNull() {
|
||||||
|
addCriterion("parent_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdIsNotNull() {
|
||||||
|
addCriterion("parent_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdEqualTo(Long value) {
|
||||||
|
addCriterion("parent_id =", value, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("parent_id <>", value, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdGreaterThan(Long value) {
|
||||||
|
addCriterion("parent_id >", value, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("parent_id >=", value, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdLessThan(Long value) {
|
||||||
|
addCriterion("parent_id <", value, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("parent_id <=", value, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdIn(List<Long> values) {
|
||||||
|
addCriterion("parent_id in", values, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("parent_id not in", values, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("parent_id between", value1, value2, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andParentIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("parent_id not between", value1, value2, "parentId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNull() {
|
||||||
|
addCriterion("creator_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIsNotNull() {
|
||||||
|
addCriterion("creator_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id =", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <>", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThan(Long value) {
|
||||||
|
addCriterion("creator_id >", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id >=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThan(Long value) {
|
||||||
|
addCriterion("creator_id <", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("creator_id <=", value, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("creator_id not in", values, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreatorIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("creator_id not between", value1, value2, "creatorId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNull() {
|
||||||
|
addCriterion("create_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIsNotNull() {
|
||||||
|
addCriterion("create_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("create_time =", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <>", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("create_time >", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time >=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThan(Date value) {
|
||||||
|
addCriterion("create_time <", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("create_time <=", value, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("create_time in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("create_time not in", values, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("create_time not between", value1, value2, "createTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNull() {
|
||||||
|
addCriterion("updater_id is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIsNotNull() {
|
||||||
|
addCriterion("updater_id is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id =", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <>", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThan(Long value) {
|
||||||
|
addCriterion("updater_id >", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id >=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThan(Long value) {
|
||||||
|
addCriterion("updater_id <", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("updater_id <=", value, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotIn(List<Long> values) {
|
||||||
|
addCriterion("updater_id not in", values, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdaterIdNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("updater_id not between", value1, value2, "updaterId");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIsNull() {
|
||||||
|
addCriterion("update_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIsNotNull() {
|
||||||
|
addCriterion("update_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||||
|
addCriterion("update_time =", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||||
|
addCriterion("update_time <>", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||||
|
addCriterion("update_time >", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("update_time >=", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeLessThan(Date value) {
|
||||||
|
addCriterion("update_time <", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||||
|
addCriterion("update_time <=", value, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||||
|
addCriterion("update_time in", values, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||||
|
addCriterion("update_time not in", values, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("update_time between", value1, value2, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||||
|
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
||||||
|
protected Criteria() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class Criterion {
|
||||||
|
private String condition;
|
||||||
|
|
||||||
|
private Object value;
|
||||||
|
|
||||||
|
private Object secondValue;
|
||||||
|
|
||||||
|
private boolean noValue;
|
||||||
|
|
||||||
|
private boolean singleValue;
|
||||||
|
|
||||||
|
private boolean betweenValue;
|
||||||
|
|
||||||
|
private boolean listValue;
|
||||||
|
|
||||||
|
private String typeHandler;
|
||||||
|
|
||||||
|
public String getCondition() {
|
||||||
|
return condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getSecondValue() {
|
||||||
|
return secondValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNoValue() {
|
||||||
|
return noValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSingleValue() {
|
||||||
|
return singleValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBetweenValue() {
|
||||||
|
return betweenValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isListValue() {
|
||||||
|
return listValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTypeHandler() {
|
||||||
|
return typeHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.typeHandler = null;
|
||||||
|
this.noValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
if (value instanceof List<?>) {
|
||||||
|
this.listValue = true;
|
||||||
|
} else {
|
||||||
|
this.singleValue = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value) {
|
||||||
|
this(condition, value, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||||
|
super();
|
||||||
|
this.condition = condition;
|
||||||
|
this.value = value;
|
||||||
|
this.secondValue = secondValue;
|
||||||
|
this.typeHandler = typeHandler;
|
||||||
|
this.betweenValue = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Criterion(String condition, Object value, Object secondValue) {
|
||||||
|
this(condition, value, secondValue, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -10,348 +10,352 @@ import club.joylink.rtss.vo.client.user.*;
|
|||||||
import club.joylink.rtss.vo.user.AccountCreateVO;
|
import club.joylink.rtss.vo.user.AccountCreateVO;
|
||||||
import club.joylink.rtss.vo.user.AccountRegisterVO;
|
import club.joylink.rtss.vo.user.AccountRegisterVO;
|
||||||
import club.joylink.rtss.vo.wx.WmUserSession;
|
import club.joylink.rtss.vo.wx.WmUserSession;
|
||||||
|
import java.util.Map;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ISysUserService {
|
public interface ISysUserService {
|
||||||
|
|
||||||
AccountVO queryUserByAccountForMaster(String account);
|
AccountVO queryUserByAccountForMaster(String account);
|
||||||
AccountVO queryUserByAccount(String account);
|
|
||||||
|
AccountVO queryUserByAccount(String account);
|
||||||
/**
|
|
||||||
* 根据openId查询用户
|
/**
|
||||||
*
|
* 根据openId查询用户
|
||||||
* @param openid
|
*
|
||||||
*/
|
* @param openid
|
||||||
AccountVO getUserByWxOpenId(String openid);
|
*/
|
||||||
|
AccountVO getUserByWxOpenId(String openid);
|
||||||
/**
|
|
||||||
* 根据userId 主键查询用户
|
/**
|
||||||
*
|
* 根据userId 主键查询用户
|
||||||
* @param id
|
*
|
||||||
*/
|
* @param id
|
||||||
AccountVO findUserById(Long id);
|
*/
|
||||||
|
AccountVO findUserById(Long id);
|
||||||
SysAccount findEntity(@NonNull String account, long orgId);
|
|
||||||
|
SysAccount findEntity(@NonNull String account, long orgId);
|
||||||
boolean isExist(@NonNull String account, long orgId);
|
|
||||||
|
boolean isExist(@NonNull String account, long orgId);
|
||||||
/**
|
|
||||||
* 通过用户姓名或手机号查询
|
/**
|
||||||
*
|
* 通过用户姓名或手机号查询
|
||||||
* @param query
|
*
|
||||||
* @return
|
* @param query
|
||||||
*/
|
* @return
|
||||||
List<AccountVO> queryUserByNameOrMobile(String query);
|
*/
|
||||||
|
List<AccountVO> queryUserByNameOrMobile(String query);
|
||||||
/**
|
|
||||||
* 判断用户是否已经注册
|
/**
|
||||||
*
|
* 判断用户是否已经注册
|
||||||
* @param wxId
|
*
|
||||||
* @return
|
* @param wxId
|
||||||
*/
|
* @return
|
||||||
Boolean ifRegistered(String wxId);
|
*/
|
||||||
|
Boolean ifRegistered(String wxId);
|
||||||
/**
|
|
||||||
* 修改用户信息
|
/**
|
||||||
*/
|
* 修改用户信息
|
||||||
void modify(Long id, AccountVO userInfo, String vdcode);
|
*/
|
||||||
|
void modify(Long id, AccountVO userInfo, String vdcode);
|
||||||
/**
|
|
||||||
* 分页获取用户数据
|
/**
|
||||||
*/
|
* 分页获取用户数据
|
||||||
PageVO<AccountVO> queryPagedUser(UserQueryVO queryVO);
|
*/
|
||||||
|
PageVO<AccountVO> queryPagedUser(UserQueryVO queryVO);
|
||||||
/**
|
|
||||||
* 修改用户角色
|
/**
|
||||||
*
|
* 修改用户角色
|
||||||
* @param id
|
*
|
||||||
* @param userId
|
* @param id
|
||||||
* @param accountVO
|
* @param userId
|
||||||
*/
|
* @param accountVO
|
||||||
void updateUserRole(Long id, Long userId, AccountVO accountVO);
|
*/
|
||||||
|
void updateUserRole(Long id, Long userId, AccountVO accountVO);
|
||||||
/**
|
|
||||||
* 是否管理员
|
/**
|
||||||
*
|
* 是否管理员
|
||||||
* @param accountVO
|
*
|
||||||
* @return
|
* @param accountVO
|
||||||
*/
|
* @return
|
||||||
boolean isAdmin(AccountVO accountVO);
|
*/
|
||||||
|
boolean isAdmin(AccountVO accountVO);
|
||||||
/**
|
|
||||||
* 确认用户是管理员,否则,报错
|
/**
|
||||||
*/
|
* 确认用户是管理员,否则,报错
|
||||||
void confirmAdmin(AccountVO user);
|
*/
|
||||||
|
void confirmAdmin(AccountVO user);
|
||||||
/**
|
|
||||||
* 根据地图id查询订阅人员
|
/**
|
||||||
*
|
* 根据地图id查询订阅人员
|
||||||
* @param mapId
|
*
|
||||||
* @return
|
* @param mapId
|
||||||
*/
|
* @return
|
||||||
List<Long> selectSubscribeUser(long mapId);
|
*/
|
||||||
|
List<Long> selectSubscribeUser(long mapId);
|
||||||
/**
|
|
||||||
* 分页获取用户数据(模糊查询)
|
/**
|
||||||
*
|
* 分页获取用户数据(模糊查询)
|
||||||
* @param fuzzyParam
|
*
|
||||||
* @return
|
* @param fuzzyParam
|
||||||
*/
|
* @return
|
||||||
List<AccountVO> fuzzyQueryPagedUser(String fuzzyParam);
|
*/
|
||||||
|
List<AccountVO> fuzzyQueryPagedUser(String fuzzyParam);
|
||||||
/**
|
|
||||||
* 根据名称模糊查询
|
/**
|
||||||
*
|
* 根据名称模糊查询
|
||||||
* @param name
|
*
|
||||||
* @return
|
* @param name
|
||||||
*/
|
* @return
|
||||||
List<AccountVO> fuzzyQueryByName(String name);
|
*/
|
||||||
|
List<AccountVO> fuzzyQueryByName(String name);
|
||||||
/**
|
|
||||||
* 根据微信小程序openid查询用户
|
/**
|
||||||
*
|
* 根据微信小程序openid查询用户
|
||||||
* @param wmOpenId
|
*
|
||||||
* @return
|
* @param wmOpenId
|
||||||
*/
|
* @return
|
||||||
AccountVO findUserByWmOpenId(String wmOpenId);
|
*/
|
||||||
|
AccountVO findUserByWmOpenId(String wmOpenId);
|
||||||
/**
|
|
||||||
* 根据微信小程序openid获取用户
|
/**
|
||||||
*
|
* 根据微信小程序openid获取用户
|
||||||
* @param wmOpenId
|
*
|
||||||
* @return
|
* @param wmOpenId
|
||||||
*/
|
* @return
|
||||||
AccountVO getUserByWmOpenId(String wmOpenId);
|
*/
|
||||||
|
AccountVO getUserByWmOpenId(String wmOpenId);
|
||||||
/**
|
|
||||||
* 根据unionid查询用户
|
/**
|
||||||
*
|
* 根据unionid查询用户
|
||||||
* @param unionid
|
*
|
||||||
*/
|
* @param unionid
|
||||||
AccountVO findUserByUnionId(String unionid);
|
*/
|
||||||
|
AccountVO findUserByUnionId(String unionid);
|
||||||
/**
|
|
||||||
* 根据微信openId获取用户
|
/**
|
||||||
*
|
* 根据微信openId获取用户
|
||||||
* @param unionId
|
*
|
||||||
*/
|
* @param unionId
|
||||||
AccountVO getUserByUnionId(String unionId);
|
*/
|
||||||
|
AccountVO getUserByUnionId(String unionId);
|
||||||
/**
|
|
||||||
* 创建微信小程序来的用户
|
/**
|
||||||
*
|
* 创建微信小程序来的用户
|
||||||
* @param wmUserSession
|
*
|
||||||
* @return
|
* @param wmUserSession
|
||||||
*/
|
* @return
|
||||||
AccountVO createUserOfWechatMicro(WmUserSession wmUserSession);
|
*/
|
||||||
|
AccountVO createUserOfWechatMicro(WmUserSession wmUserSession);
|
||||||
void createUser(SysAccount account);
|
|
||||||
|
void createUser(SysAccount account);
|
||||||
String createAccount(AccountCreateVO accountCreateVO, AccountVO user);
|
|
||||||
|
String createAccount(AccountCreateVO accountCreateVO, AccountVO user);
|
||||||
/**
|
|
||||||
* 更新用户微信小程序openid
|
/**
|
||||||
*
|
* 更新用户微信小程序openid
|
||||||
* @param id
|
*
|
||||||
* @param wmOpenId
|
* @param id
|
||||||
*/
|
* @param wmOpenId
|
||||||
void updateUserWmOpenId(Long id, String wmOpenId);
|
*/
|
||||||
|
void updateUserWmOpenId(Long id, String wmOpenId);
|
||||||
void updateUserWX(Long userId, WmUserSession wmUserSession);
|
|
||||||
|
void updateUserWX(Long userId, WmUserSession wmUserSession);
|
||||||
/**
|
|
||||||
* 更新用户的unionId
|
/**
|
||||||
*
|
* 更新用户的unionId
|
||||||
* @param changeUserList
|
*
|
||||||
*/
|
* @param changeUserList
|
||||||
void updateUserWxUnionId(List<AccountVO> changeUserList);
|
*/
|
||||||
|
void updateUserWxUnionId(List<AccountVO> changeUserList);
|
||||||
/**
|
|
||||||
* 处理微信用户关注事件
|
/**
|
||||||
*
|
* 处理微信用户关注事件
|
||||||
* @param wxId
|
*
|
||||||
* @return
|
* @param wxId
|
||||||
*/
|
* @return
|
||||||
void wxSubscribeEventHandle(String wxId);
|
*/
|
||||||
|
void wxSubscribeEventHandle(String wxId);
|
||||||
/**
|
|
||||||
* 把注册用户的openId变为unionId
|
/**
|
||||||
*/
|
* 把注册用户的openId变为unionId
|
||||||
void batchChangeOpenId2UnionId();
|
*/
|
||||||
|
void batchChangeOpenId2UnionId();
|
||||||
/**
|
|
||||||
* 根据账号密码查询用户
|
/**
|
||||||
*
|
* 根据账号密码查询用户
|
||||||
* @param account
|
*
|
||||||
* @param password
|
* @param account
|
||||||
* @return
|
* @param password
|
||||||
*/
|
* @return
|
||||||
AccountVO findUserByAccountAndPassword(String account, String password, String project);
|
*/
|
||||||
|
AccountVO findUserByAccountAndPassword(String account, String password, String project);
|
||||||
/**
|
|
||||||
* 更新用户真实姓名
|
/**
|
||||||
*
|
* 更新用户真实姓名
|
||||||
* @param id
|
*
|
||||||
* @param name
|
* @param id
|
||||||
*/
|
* @param name
|
||||||
void updateUserName(Long id, String name);
|
*/
|
||||||
|
void updateUserName(Long id, String name);
|
||||||
/**
|
|
||||||
* 更新用户昵称
|
/**
|
||||||
*
|
* 更新用户昵称
|
||||||
* @param id
|
*
|
||||||
* @param nickname
|
* @param id
|
||||||
*/
|
* @param nickname
|
||||||
void updateNickname(Long id, String nickname);
|
*/
|
||||||
|
void updateNickname(Long id, String nickname);
|
||||||
/**
|
|
||||||
* 更新用户头像
|
/**
|
||||||
*
|
* 更新用户头像
|
||||||
* @param id
|
*
|
||||||
* @param avatarPath
|
* @param id
|
||||||
*/
|
* @param avatarPath
|
||||||
void updateAvatar(Long id, String avatarPath);
|
*/
|
||||||
|
void updateAvatar(Long id, String avatarPath);
|
||||||
/**
|
|
||||||
* 更新用户手机号
|
/**
|
||||||
*
|
* 更新用户手机号
|
||||||
* @param id
|
*
|
||||||
* @param updateMobileVO
|
* @param id
|
||||||
*/
|
* @param updateMobileVO
|
||||||
void updateMobile(Long id, UpdateMobileVO updateMobileVO);
|
*/
|
||||||
|
void updateMobile(Long id, UpdateMobileVO updateMobileVO);
|
||||||
/**
|
|
||||||
* 更新用户邮箱地址
|
/**
|
||||||
*
|
* 更新用户邮箱地址
|
||||||
* @param id
|
*
|
||||||
* @param updateEmailVO
|
* @param id
|
||||||
*/
|
* @param updateEmailVO
|
||||||
void updateEmail(Long id, UpdateEmailVO updateEmailVO);
|
*/
|
||||||
|
void updateEmail(Long id, UpdateEmailVO updateEmailVO);
|
||||||
/**
|
|
||||||
* 发送邮箱验证码
|
/**
|
||||||
*
|
* 发送邮箱验证码
|
||||||
* @param email
|
*
|
||||||
* @return
|
* @param email
|
||||||
*/
|
* @return
|
||||||
String sendEmailValidCode(String email);
|
*/
|
||||||
|
String sendEmailValidCode(String email);
|
||||||
/**
|
|
||||||
* 发送手机验证码
|
/**
|
||||||
*
|
* 发送手机验证码
|
||||||
* @param mobileInfoVO
|
*
|
||||||
* @return
|
* @param mobileInfoVO
|
||||||
*/
|
* @return
|
||||||
String sendMobileValidCode(MobileInfoVO mobileInfoVO);
|
*/
|
||||||
|
String sendMobileValidCode(MobileInfoVO mobileInfoVO);
|
||||||
/**
|
|
||||||
* 查询用户总数量
|
/**
|
||||||
*
|
* 查询用户总数量
|
||||||
* @return
|
*
|
||||||
*/
|
* @return
|
||||||
int getUserAmount();
|
*/
|
||||||
|
int getUserAmount();
|
||||||
/**
|
|
||||||
* 更新用户密码
|
/**
|
||||||
*
|
* 更新用户密码
|
||||||
* @param id
|
*
|
||||||
* @param updatePasswordVO
|
* @param id
|
||||||
*/
|
* @param updatePasswordVO
|
||||||
void updatePassword(Long id, UpdatePasswordVO updatePasswordVO);
|
*/
|
||||||
|
void updatePassword(Long id, UpdatePasswordVO updatePasswordVO);
|
||||||
/**
|
|
||||||
* 客户端修改用户密码
|
/**
|
||||||
*
|
* 客户端修改用户密码
|
||||||
* @param id
|
*
|
||||||
* @param password
|
* @param id
|
||||||
*/
|
* @param password
|
||||||
void updateUserPassword(Long id, String password);
|
*/
|
||||||
|
void updateUserPassword(Long id, String password);
|
||||||
AccountVO getUserById(Long id);
|
|
||||||
|
AccountVO getUserById(Long id);
|
||||||
List<AccountVO> findUserByName(String name);
|
|
||||||
|
List<AccountVO> findUserByName(String name);
|
||||||
/**
|
|
||||||
* 是否是超级管理员
|
/**
|
||||||
*/
|
* 是否是超级管理员
|
||||||
boolean isSuperAdmin(Long id);
|
*/
|
||||||
|
boolean isSuperAdmin(Long id);
|
||||||
/**
|
|
||||||
* 确认用户是超管
|
/**
|
||||||
*/
|
* 确认用户是超管
|
||||||
void confirmSuperAdmin(Long userId);
|
*/
|
||||||
|
void confirmSuperAdmin(Long userId);
|
||||||
boolean isExist(Long id);
|
|
||||||
|
boolean isExist(Long id);
|
||||||
/**
|
|
||||||
* 获取微信小程序绑定url
|
/**
|
||||||
*/
|
* 获取微信小程序绑定url
|
||||||
WeChatBindStatusVO getWeChatBindUrl(LoginUserInfoVO loginInfo);
|
*/
|
||||||
|
WeChatBindStatusVO getWeChatBindUrl(LoginUserInfoVO loginInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户绑定微信小程序
|
* 用户绑定微信小程序
|
||||||
*
|
*
|
||||||
* @param code
|
* @param code
|
||||||
* @param userId
|
* @param userId
|
||||||
*/
|
*/
|
||||||
void userBindWm(String code, Long userId);
|
void userBindWm(String code, Long userId);
|
||||||
|
|
||||||
OrgVO userScanCodeBindCompanyManager(Long userId, Long companyId);
|
OrgVO userScanCodeBindCompanyManager(Long userId, Long companyId);
|
||||||
|
|
||||||
AccountVO getUserBaseInfoById(Long id);
|
AccountVO getUserBaseInfoById(Long id);
|
||||||
|
|
||||||
List<AccountVO> getUsersWithEmail();
|
List<AccountVO> getUsersWithEmail();
|
||||||
|
|
||||||
List<AccountVO> getUsersWithMobile();
|
List<AccountVO> getUsersWithMobile();
|
||||||
|
|
||||||
List<AccountVO> getPlatformUsers();
|
List<AccountVO> getPlatformUsers();
|
||||||
|
|
||||||
List<SysAccount> findEntities(List<Long> ids, String orderBy);
|
List<SysAccount> findEntities(List<Long> ids, String orderBy);
|
||||||
|
|
||||||
/**
|
Map<Long, SysAccount> findEntitiesForMap(List<Long> ids);
|
||||||
* 确认该用户存在
|
|
||||||
*/
|
|
||||||
void confirmExist(Long id);
|
|
||||||
|
|
||||||
void superAdminUpdateUserInfo(AccountVO updateUser, AccountVO superAdmin);
|
/**
|
||||||
|
* 确认该用户存在
|
||||||
|
*/
|
||||||
|
void confirmExist(Long id);
|
||||||
|
|
||||||
/**
|
void superAdminUpdateUserInfo(AccountVO updateUser, AccountVO superAdmin);
|
||||||
* 查询所有的销售人员
|
|
||||||
*/
|
|
||||||
List<AccountVO> querySellers();
|
|
||||||
|
|
||||||
void deleteById(Long id);
|
/**
|
||||||
|
* 查询所有的销售人员
|
||||||
|
*/
|
||||||
|
List<AccountVO> querySellers();
|
||||||
|
|
||||||
void register(AccountCreateVO accountCreateVO);
|
void deleteById(Long id);
|
||||||
|
|
||||||
List<AccountVO> queryUsers(List<Long> userIds);
|
void register(AccountCreateVO accountCreateVO);
|
||||||
|
|
||||||
/**
|
List<AccountVO> queryUsers(List<Long> userIds);
|
||||||
* 查询管理和超管
|
|
||||||
*/
|
|
||||||
List<AccountVO> queryAdminsAndSuperAdmins();
|
|
||||||
|
|
||||||
AccountVO queryOrCreateThirdAccount(String parentAccount, String account);
|
/**
|
||||||
|
* 查询管理和超管
|
||||||
|
*/
|
||||||
|
List<AccountVO> queryAdminsAndSuperAdmins();
|
||||||
|
|
||||||
AccountVO getThirdAccount(String account);
|
AccountVO queryOrCreateThirdAccount(String parentAccount, String account);
|
||||||
|
|
||||||
void logicDelete(Long id);
|
AccountVO getThirdAccount(String account);
|
||||||
|
|
||||||
boolean isThirdParentAccountExist(String parentAccount);
|
void logicDelete(Long id);
|
||||||
|
|
||||||
List<SysAccount> findEntitiesBySource(String source);
|
boolean isThirdParentAccountExist(String parentAccount);
|
||||||
|
|
||||||
void resetPwd(long id);
|
List<SysAccount> findEntitiesBySource(String source);
|
||||||
|
|
||||||
void retrievePwd(RetrievePwdVO vo);
|
void resetPwd(long id);
|
||||||
|
|
||||||
void register2(AccountRegisterVO registerVO);
|
void retrievePwd(RetrievePwdVO vo);
|
||||||
|
|
||||||
SysAccount getEntityByMobile(String mobile);
|
void register2(AccountRegisterVO registerVO);
|
||||||
|
|
||||||
boolean isSameMobileExist(String mobile);
|
SysAccount getEntityByMobile(String mobile);
|
||||||
|
|
||||||
boolean isSameEmailExist(String email);
|
boolean isSameMobileExist(String mobile);
|
||||||
|
|
||||||
|
boolean isSameEmailExist(String email);
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,321 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.racetr.RacetrPaperDAO;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrPaper;
|
||||||
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.common.ModifyInfo.ModifyInfoVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperDetailVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperModuleVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperModuleVO.PaperModule;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaperPageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaperQueryVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeason.Group;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RacePaperModuleTask;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RacePaperModuleTask.PaperModuleGroup;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RacePaperSingleModuleGroupTask;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskChildVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskChildVO.ChildNodeType;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTaskDetailDTO;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class RacePaperService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RacetrPaperDAO paperDAO;
|
||||||
|
@Autowired
|
||||||
|
private RaceTaskService taskService;
|
||||||
|
|
||||||
|
private RacetrPaper findId(Long id) {
|
||||||
|
RacetrPaper rp = this.paperDAO.selectByPrimaryKey(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(rp), "未找到对应的试卷");
|
||||||
|
return rp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void create(RacePaperCreateVO createVO, AccountVO user) {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
RacetrPaper rp = new RacetrPaper();
|
||||||
|
rp.setName(createVO.getName());
|
||||||
|
rp.setDesc(createVO.getDesc());
|
||||||
|
rp.setSeasonId(createVO.getSeasonId());
|
||||||
|
rp.setCreateTime(now);
|
||||||
|
rp.setUpdateTime(now);
|
||||||
|
rp.setCreatorId(user.getId());
|
||||||
|
rp.setUpdaterId(user.getId());
|
||||||
|
this.paperDAO.insertSelective(rp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(Long id, RacePaperCreateVO updateVO, AccountVO user) {
|
||||||
|
RacetrPaper rp = this.findId(id);
|
||||||
|
rp.setName(updateVO.getName());
|
||||||
|
rp.setDesc(updateVO.getDesc());
|
||||||
|
rp.setSeasonId(updateVO.getSeasonId());
|
||||||
|
rp.setUpdateTime(LocalDateTime.now());
|
||||||
|
rp.setUpdaterId(user.getId());
|
||||||
|
this.paperDAO.updateByPrimaryKey(rp);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public PageVO<RacePaperVO> pageQuery(RacePaperQueryVO query) {
|
||||||
|
if (!StringUtils.equalsAny(query.getGroup(), Group.GZ.name(), Group.ZZ.name())) {
|
||||||
|
query.setGroup(null);
|
||||||
|
}
|
||||||
|
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||||
|
Page<RacePaperPageVO> page = (Page<RacePaperPageVO>) this.paperDAO.pages(query);
|
||||||
|
List<RacePaperVO> voList = this.convertEntity(page.getResult());
|
||||||
|
return PageVO.convert(page, voList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RacePaperVO convertGroupDTO(RacePaperPageVO rp) {
|
||||||
|
RacePaperVO.Builder builder = RacePaperVO.newBuilder();
|
||||||
|
|
||||||
|
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(rp.getCreatorId(), rp.getCreatorName(), rp.getUpdaterId(), rp.getUpdaterName(), rp.getCreateTime(), rp.getUpdateTime());
|
||||||
|
|
||||||
|
builder.setId(rp.getId());
|
||||||
|
builder.setName(rp.getName());
|
||||||
|
builder.setDesc(rp.getDesc());
|
||||||
|
builder.setModifyInfo(modifyInfoVO);
|
||||||
|
builder.setSeasonId(rp.getSeasonId());
|
||||||
|
builder.setSeasonName(Objects.isNull(rp.getSeasonName()) ? "" : rp.getSeasonName());
|
||||||
|
builder.setGroup(Group.Unknown);
|
||||||
|
if (Objects.nonNull(rp.getGroup())) {
|
||||||
|
builder.setGroup(Group.valueOf(rp.getGroup()));
|
||||||
|
}
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<RacePaperVO> convertEntity(List<RacePaperPageVO> rpList) {
|
||||||
|
if (CollectionUtils.isEmpty(rpList)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
List<RacePaperVO> voList = Lists.newArrayListWithCapacity(rpList.size());
|
||||||
|
for (RacePaperPageVO rp : rpList) {
|
||||||
|
voList.add(this.convertGroupDTO(rp));
|
||||||
|
}
|
||||||
|
return voList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void delete(long id) {
|
||||||
|
this.paperDAO.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RacePaperDetailVO detail(Long id) {
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(id), "请选择对应的试卷");
|
||||||
|
RacePaperPageVO paper = this.paperDAO.detail(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(paper), "未找到对应的试卷");
|
||||||
|
RacePaperDetailVO.Builder vo = RacePaperDetailVO.newBuilder();
|
||||||
|
vo.setId(paper.getId());
|
||||||
|
vo.setName(paper.getName());
|
||||||
|
vo.setDesc(paper.getDesc());
|
||||||
|
vo.setSupportCopy(!Objects.isNull(paper.getSupportCopy()) && paper.getSupportCopy());
|
||||||
|
vo.setModifyInfo(RaceServiceUtil.createModifyInfo(paper.getCreatorId(), paper.getCreatorName(), paper.getUpdaterId(), paper.getUpdaterName(), paper.getCreateTime(), paper.getUpdateTime()));
|
||||||
|
if (Objects.nonNull(paper.getSeasonId())) {
|
||||||
|
vo.setSeasonId(paper.getSeasonId());
|
||||||
|
vo.setSeasonName(paper.getSeasonName());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(paper.getConfigs())) {
|
||||||
|
try {
|
||||||
|
RacePaperModuleVO moduleVO = RacePaperModuleVO.parseFrom(paper.getConfigs());
|
||||||
|
vo.setModuleVo(moduleVO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("试卷[{}][{}] 配置解析失败 msg:[{}]", paper.getName(), paper.getId(), e.getMessage());
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.fail("数据配置解析失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return vo.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void configSeting(Long id, RacePaperModuleVO moduleVO, AccountVO user) {
|
||||||
|
RacetrPaper paper = this.findId(id);
|
||||||
|
paper.setUpdateTime(LocalDateTime.now());
|
||||||
|
paper.setUpdaterId(user.getId());
|
||||||
|
int customId = 1;
|
||||||
|
RacePaperModuleVO.Builder voBuild = moduleVO.toBuilder();
|
||||||
|
List<PaperModule> pmList = Lists.newArrayListWithExpectedSize(voBuild.getModulesList().size());
|
||||||
|
for (PaperModule pm : voBuild.getModulesList()) {
|
||||||
|
PaperModule.Builder pmBuild = pm.toBuilder();
|
||||||
|
pmBuild.setCustomModuleId(++customId);
|
||||||
|
pmList.add(pmBuild.build());
|
||||||
|
}
|
||||||
|
voBuild.clearModules();
|
||||||
|
voBuild.addAllModules(pmList);
|
||||||
|
|
||||||
|
paper.setConfigs(voBuild.build().toByteArray());
|
||||||
|
this.paperDAO.updateByPrimaryKeySelective(paper);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void copy(Long id, AccountVO user) {
|
||||||
|
RacetrPaper paper = this.findId(id);
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
paper.setId(null);
|
||||||
|
paper.setName(String.format("%s_copy", paper.getName()));
|
||||||
|
paper.setCreatorId(user.getId());
|
||||||
|
paper.setUpdaterId(user.getId());
|
||||||
|
paper.setCreateTime(now);
|
||||||
|
paper.setUpdateTime(now);
|
||||||
|
this.paperDAO.insert(paper);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 试卷考试返回模块下所有的group,和任务,所有数据形成在一个"树"
|
||||||
|
*
|
||||||
|
* @param paperId
|
||||||
|
* @param moduleId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public RacePaperSingleModuleGroupTask singlePaperModuleTask(Long paperId, Integer moduleId) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(moduleId), "请选择对应的模型");
|
||||||
|
RacePaperDetailVO detailVO = this.detail(paperId);
|
||||||
|
RacePaperModuleVO moduleVO = detailVO.getModuleVo();
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(!CollectionUtils.isEmpty(moduleVO.getModulesList()), "此试卷没有模块数据");
|
||||||
|
PaperModule pm = moduleVO.getModulesList().stream().filter(d -> d.getCustomModuleId() == moduleId).findFirst().orElse(null);
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(pm), "没有找到对应的模块");
|
||||||
|
|
||||||
|
List<Long> allGroupTaskIds = this.collectAllTaskIds(pm.getGroupList());
|
||||||
|
Map<Long, List<RaceTaskDetailDTO>> taskMapList = this.taskService.recursiveFindTask(allGroupTaskIds);
|
||||||
|
|
||||||
|
List<RaceTaskChildVO> childVOS = this.singleTreeConvertModuleGroup(pm.getGroupList(), taskMapList);
|
||||||
|
RacePaperSingleModuleGroupTask.Builder modultTask = RacePaperSingleModuleGroupTask.newBuilder();
|
||||||
|
modultTask.setCustomModuleId(moduleId);
|
||||||
|
modultTask.addAllChild(childVOS);
|
||||||
|
return modultTask.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<RaceTaskChildVO> singleTreeConvertModuleGroup(List<RacePaperModuleVO.Group> groupList, Map<Long, List<RaceTaskDetailDTO>> allTaskMapList) {
|
||||||
|
List<RaceTaskChildVO> groups = new ArrayList<>();
|
||||||
|
for (RacePaperModuleVO.Group group : groupList) {
|
||||||
|
RaceTaskChildVO.Builder childVOB = RaceTaskChildVO.newBuilder();
|
||||||
|
childVOB.setName(group.getName());
|
||||||
|
childVOB.setNodeType(ChildNodeType.MODULE_GROUP);
|
||||||
|
for (Long taskId : group.getTaskIdsList()) {
|
||||||
|
RaceTaskChildVO taskVO = this.findTask(taskId, allTaskMapList);
|
||||||
|
childVOB.addChildren(taskVO);
|
||||||
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(group.getGroupList())) {
|
||||||
|
List<RaceTaskChildVO> childGroup = this.singleTreeConvertModuleGroup(group.getGroupList(), allTaskMapList);
|
||||||
|
childVOB.addAllChildren(childGroup);
|
||||||
|
}
|
||||||
|
groups.add(childVOB.build());
|
||||||
|
}
|
||||||
|
return groups;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RacePaperModuleTask paperModuleTask(Long paperId, Integer moduleId) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(moduleId), "请选择对应的模型");
|
||||||
|
RacePaperDetailVO detailVO = this.detail(paperId);
|
||||||
|
RacePaperModuleVO moduleVO = detailVO.getModuleVo();
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(!CollectionUtils.isEmpty(moduleVO.getModulesList()), "此试卷没有模块数据");
|
||||||
|
PaperModule pm = moduleVO.getModulesList().stream().filter(d -> d.getCustomModuleId() == moduleId).findFirst().orElse(null);
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(pm), "没有找到对应的模块");
|
||||||
|
|
||||||
|
List<Long> allGroupTaskIds = this.collectAllTaskIds(pm.getGroupList());
|
||||||
|
Map<Long, List<RaceTaskDetailDTO>> taskMapList = this.taskService.recursiveFindTask(allGroupTaskIds);
|
||||||
|
RacePaperModuleTask.Builder modultTask = RacePaperModuleTask.newBuilder();
|
||||||
|
modultTask.setCustomModuleId(pm.getCustomModuleId());
|
||||||
|
List<PaperModuleGroup> convertGroupList = this.convertModuleGroup(pm.getGroupList(), taskMapList);
|
||||||
|
modultTask.addAllModuleGroup(convertGroupList);
|
||||||
|
return modultTask.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<PaperModuleGroup> convertModuleGroup(List<RacePaperModuleVO.Group> groupList, Map<Long, List<RaceTaskDetailDTO>> allTaskMapList) {
|
||||||
|
List<PaperModuleGroup> groups = new ArrayList<>();
|
||||||
|
for (RacePaperModuleVO.Group group : groupList) {
|
||||||
|
PaperModuleGroup.Builder groupBuilder = PaperModuleGroup.newBuilder();
|
||||||
|
groupBuilder.setGroupName(group.getName());
|
||||||
|
for (Long taskId : group.getTaskIdsList()) {
|
||||||
|
RaceTaskChildVO taskVO = this.findTask(taskId, allTaskMapList);
|
||||||
|
groupBuilder.addTreeData(taskVO);
|
||||||
|
}
|
||||||
|
if (!CollectionUtils.isEmpty(group.getGroupList())) {
|
||||||
|
List<PaperModuleGroup> childGroup = this.convertModuleGroup(group.getGroupList(), allTaskMapList);
|
||||||
|
groupBuilder.addAllModuleGroup(childGroup);
|
||||||
|
}
|
||||||
|
groups.add(groupBuilder.build());
|
||||||
|
}
|
||||||
|
return groups;
|
||||||
|
}
|
||||||
|
|
||||||
|
private RaceTaskChildVO findTask(Long taskId, Map<Long, List<RaceTaskDetailDTO>> allTaskMapList) {
|
||||||
|
List<RaceTaskDetailDTO> dtoList = allTaskMapList.get(RaceTaskService.TASK_ROOT_ID);
|
||||||
|
RaceTaskDetailDTO taskDto = dtoList.stream().filter(d -> Objects.equals(d.getId(), taskId)).findFirst().orElse(null);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(taskDto), String.format("对应的任务没有找到[%s]", taskDto));
|
||||||
|
RaceTaskChildVO.Builder vo = this.convertGroupDTO(taskDto, ChildNodeType.TASK);
|
||||||
|
this.findChildTask(vo, allTaskMapList);
|
||||||
|
return vo.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void findChildTask(RaceTaskChildVO.Builder vob, Map<Long, List<RaceTaskDetailDTO>> allTaskMapList) {
|
||||||
|
List<RaceTaskDetailDTO> childDto = allTaskMapList.get(vob.getId());
|
||||||
|
if (!CollectionUtils.isEmpty(childDto)) {
|
||||||
|
for (RaceTaskDetailDTO ch : childDto) {
|
||||||
|
RaceTaskChildVO.Builder chvo = this.convertGroupDTO(ch, ChildNodeType.TASK);
|
||||||
|
vob.addChildren(chvo);
|
||||||
|
this.findChildTask(chvo, allTaskMapList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private RaceTaskChildVO.Builder convertGroupDTO(RaceTaskDetailDTO dto, ChildNodeType nodeType) {
|
||||||
|
RaceTaskChildVO.Builder cb = RaceTaskChildVO.newBuilder();
|
||||||
|
if (ChildNodeType.TASK == nodeType) {
|
||||||
|
cb.setId(dto.getId());
|
||||||
|
cb.setDesc(dto.getDesc());
|
||||||
|
cb.setContent(dto.getContent());
|
||||||
|
cb.setStandards(dto.getStandards());
|
||||||
|
cb.setParentId(dto.getParentId());
|
||||||
|
if (Objects.nonNull(dto.getSceneId())) {
|
||||||
|
cb.setSceneId(dto.getSceneId());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(dto.getRuleId())) {
|
||||||
|
cb.setRuleId(dto.getRuleId());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cb.setNodeType(nodeType);
|
||||||
|
cb.setName(dto.getName());
|
||||||
|
|
||||||
|
return cb;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private List<Long> collectAllTaskIds(List<RacePaperModuleVO.Group> groupList) {
|
||||||
|
List<Long> allTaskIds = Lists.newArrayList();
|
||||||
|
for (RacePaperModuleVO.Group group : groupList) {
|
||||||
|
this.collectTaskIds(group, allTaskIds);
|
||||||
|
}
|
||||||
|
return allTaskIds.stream().distinct().collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void collectTaskIds(RacePaperModuleVO.Group group, List<Long> collectorList) {
|
||||||
|
collectorList.addAll(group.getTaskIdsList());
|
||||||
|
if (!CollectionUtils.isEmpty(group.getGroupList())) {
|
||||||
|
for (RacePaperModuleVO.Group group1 : group.getGroupList()) {
|
||||||
|
this.collectTaskIds(group1, collectorList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,183 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.DraftTraining2DAO;
|
||||||
|
import club.joylink.rtss.dao.racetr.RacetrSceneDAO;
|
||||||
|
import club.joylink.rtss.dao.racetr.RacetrTaskDAO;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrScene;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrSceneExample;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrTaskExample;
|
||||||
|
import club.joylink.rtss.entity.training2.DraftTraining2WithBLOBs;
|
||||||
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.training2.Training2;
|
||||||
|
import club.joylink.rtss.util.JsonUtils;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.common.ModifyInfo.ModifyInfoVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceScene.Type;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceSceneListVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceScenePublishVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceSceneVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.Scene;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.StorageSimulation;
|
||||||
|
import club.joylink.rtss.vo.race.RaceScenePageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneQueryVO;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class RaceSceneService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RacetrSceneDAO sceneDAO;
|
||||||
|
@Autowired
|
||||||
|
private RacetrTaskDAO taskDAO;
|
||||||
|
@Autowired
|
||||||
|
private DraftTraining2DAO trainingDao;
|
||||||
|
|
||||||
|
|
||||||
|
public RacetrScene findById(Long id) {
|
||||||
|
RacetrScene rs = this.sceneDAO.selectByPrimaryKey(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(rs), "没有找到对应的场景");
|
||||||
|
return rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PageVO<RaceSceneListVO> page(RaceSceneQueryVO query) {
|
||||||
|
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||||
|
Page<RaceScenePageVO> page = (Page<RaceScenePageVO>) this.sceneDAO.pages(query);
|
||||||
|
List<RaceSceneListVO> voList = this.convertDto(page.getResult());
|
||||||
|
return PageVO.convert(page, voList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RaceSceneListVO convertVO(RaceScenePageVO rs) {
|
||||||
|
RaceSceneListVO.Builder vo = RaceSceneListVO.newBuilder();
|
||||||
|
vo.setId(rs.getId());
|
||||||
|
vo.setName(rs.getName());
|
||||||
|
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(rs.getCreatorId(), rs.getCreatorName(), rs.getUpdaterId(), rs.getUpdaterName(), rs.getCreateTime(), rs.getUpdateTime());
|
||||||
|
vo.setModifyInfo(modifyInfoVO);
|
||||||
|
vo.setType(Type.valueOf(rs.getType()));
|
||||||
|
vo.setMapId(rs.getMapId());
|
||||||
|
vo.setMapName(rs.getMapName());
|
||||||
|
return vo.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<RaceSceneListVO> convertDto(List<RaceScenePageVO> list) {
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<RaceSceneListVO> voList = Lists.newArrayListWithCapacity(list.size());
|
||||||
|
for (RaceScenePageVO rs : list) {
|
||||||
|
voList.add(this.convertVO(rs));
|
||||||
|
}
|
||||||
|
return voList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void delete(Long id) {
|
||||||
|
RacetrTaskExample taskExample = new RacetrTaskExample();
|
||||||
|
taskExample.createCriteria().andSceneIdEqualTo(id);
|
||||||
|
long bindTaskCount = this.taskDAO.countByExample(taskExample);
|
||||||
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(bindTaskCount > 0, "此场景已被任务绑定不能删除");
|
||||||
|
this.sceneDAO.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void publishHere(RaceScenePublishVO vo, AccountVO user) {
|
||||||
|
PublishHereVO phvo = this.createSceneProto(vo.getDafitid());
|
||||||
|
RacetrSceneExample sceneExample = new RacetrSceneExample();
|
||||||
|
sceneExample.createCriteria().andDraftTrainingIdEqualTo(vo.getDafitid());
|
||||||
|
List<RacetrScene> rsList = this.sceneDAO.selectByExample(sceneExample);
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
RacetrScene rs;
|
||||||
|
boolean sceneExist = false;
|
||||||
|
if (CollectionUtils.isEmpty(rsList)) {
|
||||||
|
rs = new RacetrScene();
|
||||||
|
rs.setCreatorId(user.getId());
|
||||||
|
rs.setCreateTime(now);
|
||||||
|
rs.setType(Type.Local.name());
|
||||||
|
rs.setDraftTrainingId(vo.getDafitid());
|
||||||
|
} else {
|
||||||
|
sceneExist = true;
|
||||||
|
rs = rsList.get(0);
|
||||||
|
}
|
||||||
|
rs.setUpdaterId(user.getId());
|
||||||
|
rs.setUpdateTime(now);
|
||||||
|
rs.setMapId(phvo.mapId);
|
||||||
|
rs.setName(vo.getName());
|
||||||
|
Scene.Builder sceneBu = Scene.newBuilder();
|
||||||
|
sceneBu.setStorageSimulation(phvo.getStorageSimulation());
|
||||||
|
rs.setProto(sceneBu.build().toByteArray());
|
||||||
|
if (sceneExist) {
|
||||||
|
this.sceneDAO.updateByPrimaryKeySelective(rs);
|
||||||
|
} else {
|
||||||
|
this.sceneDAO.insert(rs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private PublishHereVO createSceneProto(Long TraningPublish) {
|
||||||
|
DraftTraining2WithBLOBs bs = this.trainingDao.selectByPrimaryKey(TraningPublish);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(bs), "没有找到对应的实训数据");
|
||||||
|
Training2.Type traingType = Training2.Type.valueOf(bs.getType());
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(traingType == Training2.Type.SCENE, "发布的实训类型只能位场景类型");
|
||||||
|
List<String> plays = JsonUtils.readCollection(bs.getPlayerIdJson(), ArrayList.class, String.class);
|
||||||
|
StorageSimulation.Builder ss = StorageSimulation.newBuilder();
|
||||||
|
ss.setBgSceneJson(bs.getBgSceneJson());
|
||||||
|
ss.setMemberJson(bs.getMemberJson());
|
||||||
|
ss.setStepJson(bs.getStepJson());
|
||||||
|
ss.addAllPlayerIds(plays);
|
||||||
|
ss.setScoringRuleJson(bs.getScoringRuleJson());
|
||||||
|
return new PublishHereVO(bs.getMapId(), ss.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
public RaceSceneVO detail(Long id) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(id), "请选择对应的场景");
|
||||||
|
RaceScenePageVO rs = this.sceneDAO.detail(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(rs), "没有找到对应的场景");
|
||||||
|
|
||||||
|
RaceSceneVO.Builder builder = RaceSceneVO.newBuilder();
|
||||||
|
builder.setId(rs.getId());
|
||||||
|
builder.setName(rs.getName());
|
||||||
|
builder.setType(Type.valueOf(rs.getType()));
|
||||||
|
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(rs.getCreatorId(), rs.getCreatorName(), rs.getUpdaterId(), rs.getUpdaterName(), rs.getCreateTime(), rs.getUpdateTime());
|
||||||
|
builder.setModifyInfo(modifyInfoVO);
|
||||||
|
if (Objects.nonNull(rs.getMapId())) {
|
||||||
|
builder.setMapId(rs.getMapId());
|
||||||
|
builder.setMapName(rs.getName());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(rs.getProto())) {
|
||||||
|
try {
|
||||||
|
Scene scene = Scene.parseFrom(rs.getProto());
|
||||||
|
builder.setScene(scene);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("场景解析数据失败id[{}] msg:{}", id, e.getMessage());
|
||||||
|
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.fail("数据获取失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return builder.build();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
private static class PublishHereVO {
|
||||||
|
|
||||||
|
private Long mapId;
|
||||||
|
private StorageSimulation storageSimulation;
|
||||||
|
|
||||||
|
public PublishHereVO(Long mapId, StorageSimulation storageSimulation) {
|
||||||
|
this.mapId = mapId;
|
||||||
|
this.storageSimulation = storageSimulation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,129 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.racetr.RacetrScoringRuleDAO;
|
||||||
|
import club.joylink.rtss.dao.racetr.RacetrTaskDAO;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrScoringRule;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrTaskExample;
|
||||||
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
|
import club.joylink.rtss.services.ISysUserService;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.common.ModifyInfo.ModifyInfoVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceRuleListVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceScoringRule.RaceScoringRuleListVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceScoringRule.RaceScoringRuleVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceScoringRule.Rule;
|
||||||
|
import club.joylink.rtss.vo.race.TaskRuleQueryVO;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class RaceScoreRuleService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RacetrScoringRuleDAO ruleDAO;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RacetrTaskDAO taskDAO;
|
||||||
|
|
||||||
|
private RacetrScoringRule findId(Long id) {
|
||||||
|
RacetrScoringRule rule = this.ruleDAO.selectByPrimaryKey(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(Objects.nonNull(rule), "没有找到该评分规则");
|
||||||
|
return rule;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveBasic(String name, AccountVO user) {
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(StringUtils.hasText(name), "规则名称不能为空");
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
RacetrScoringRule rule = new RacetrScoringRule();
|
||||||
|
rule.setName(name);
|
||||||
|
rule.setCreatorId(user.getId());
|
||||||
|
rule.setUpdaterId(user.getId());
|
||||||
|
rule.setCreateTime(now);
|
||||||
|
rule.setUpdateTime(now);
|
||||||
|
ruleDAO.insertSelective(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void editRule(Long ruleId, Rule ruleProto, AccountVO user) {
|
||||||
|
RacetrScoringRule rule = this.findId(ruleId);
|
||||||
|
rule.setUpdaterId(user.getId());
|
||||||
|
rule.setUpdateTime(LocalDateTime.now());
|
||||||
|
rule.setRule(ruleProto.toByteArray());
|
||||||
|
ruleDAO.updateByPrimaryKeySelective(rule);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PageVO<RaceScoringRuleListVO> page(TaskRuleQueryVO query) {
|
||||||
|
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||||
|
/*RacetrScoringRuleExample example = new RacetrScoringRuleExample();
|
||||||
|
if (StringUtils.hasText(query.getName())) {
|
||||||
|
example.createCriteria().andNameLike(String.format("%%%s%%", query.getName()));
|
||||||
|
}*/
|
||||||
|
// Page<RacetrScoringRule> page = (Page<RacetrScoringRule>) this.ruleDAO.selectByExample(example);
|
||||||
|
Page<RaceRuleListVO> page = (Page<RaceRuleListVO>) this.ruleDAO.pages(query);
|
||||||
|
List<RaceScoringRuleListVO> voList = this.convertEntity(page.getResult());
|
||||||
|
return PageVO.convert(page, voList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RaceScoringRuleListVO convertVO(RaceRuleListVO rule) {
|
||||||
|
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(rule.getCreatorId(), rule.getCreatorName(), rule.getUpdaterId(), rule.getUpdaterName(), rule.getCreateTime(), rule.getUpdateTime());
|
||||||
|
RaceScoringRuleListVO.Builder builder = RaceScoringRuleListVO.newBuilder();
|
||||||
|
builder.setId(rule.getId());
|
||||||
|
builder.setName(rule.getName());
|
||||||
|
builder.setModifyInfo(modifyInfoVO);
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<RaceScoringRuleListVO> convertEntity(List<RaceRuleListVO> list) {
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
List<RaceScoringRuleListVO> voList = Lists.newArrayListWithCapacity(list.size());
|
||||||
|
for (RaceRuleListVO rs : list) {
|
||||||
|
voList.add(this.convertVO(rs));
|
||||||
|
}
|
||||||
|
return voList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void delete(Long id) {
|
||||||
|
RacetrTaskExample taskExample = new RacetrTaskExample();
|
||||||
|
taskExample.createCriteria().andScoreRuleIdEqualTo(id);
|
||||||
|
long bindCount = this.taskDAO.countByExample(taskExample);
|
||||||
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(bindCount > 0, "该规则已经绑定了对应方的任务,无法删除");
|
||||||
|
ruleDAO.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RaceScoringRuleVO detail(Long id) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(id), "请选择对应的评分规则");
|
||||||
|
RaceRuleListVO detailVO = this.ruleDAO.detail(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(detailVO), "未找到对应的评分规则");
|
||||||
|
|
||||||
|
RaceScoringRuleVO.Builder builder = RaceScoringRuleVO.newBuilder();
|
||||||
|
builder.setId(detailVO.getId());
|
||||||
|
builder.setName(detailVO.getName());
|
||||||
|
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(detailVO.getCreatorId(), detailVO.getCreatorName(), detailVO.getUpdaterId(), detailVO.getUpdaterName(), detailVO.getCreateTime(),
|
||||||
|
detailVO.getUpdateTime());
|
||||||
|
builder.setModifyInfo(modifyInfoVO);
|
||||||
|
if (Objects.nonNull(detailVO.getRule())) {
|
||||||
|
try {
|
||||||
|
Rule rulePro = Rule.parseFrom(detailVO.getRule());
|
||||||
|
builder.setRule(rulePro);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("竞赛评分详情规则解析失败,msg:{} ", e.getMessage(), e);
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.fail("评分规则数据解析失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,137 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.racetr.RacetrPaperDAO;
|
||||||
|
import club.joylink.rtss.dao.racetr.RacetrSeasonDAO;
|
||||||
|
import club.joylink.rtss.entity.SysAccount;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrPaperExample;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrSeason;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrSeasonExample;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrSeasonExample.Criteria;
|
||||||
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
|
import club.joylink.rtss.services.ISysUserService;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.common.ModifyInfo.ModifyInfoVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeason.Group;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeasonCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeasonVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonQueryVO;
|
||||||
|
import com.github.pagehelper.Page;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class RaceSeasonService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RacetrSeasonDAO seasonDAO;
|
||||||
|
@Autowired
|
||||||
|
private RacetrPaperDAO racePaperDAO;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService iSysUserService;
|
||||||
|
|
||||||
|
public RacetrSeason find(Long id) {
|
||||||
|
RacetrSeason rs = this.seasonDAO.selectByPrimaryKey(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(rs), "");
|
||||||
|
return rs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void save(RaceSeasonCreateVO dto, AccountVO user) {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
RacetrSeason rs = new RacetrSeason();
|
||||||
|
rs.setCode(dto.getCode());
|
||||||
|
rs.setTerm(dto.getTerm());
|
||||||
|
rs.setGroup(dto.getGroup().name());
|
||||||
|
rs.setCreatorId(user.getId());
|
||||||
|
rs.setUpdaterId(user.getId());
|
||||||
|
rs.setCreateTime(now);
|
||||||
|
rs.setUdpateTime(now);
|
||||||
|
this.seasonDAO.insert(rs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(Long id, RaceSeasonCreateVO dto, AccountVO user) {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
RacetrSeason rr = this.find(id);
|
||||||
|
rr.setUpdaterId(user.getId());
|
||||||
|
rr.setUdpateTime(now);
|
||||||
|
rr.setCode(dto.getCode());
|
||||||
|
rr.setTerm(dto.getTerm());
|
||||||
|
rr.setGroup(dto.getGroup().name());
|
||||||
|
this.seasonDAO.updateByPrimaryKeySelective(rr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public PageVO<RaceSeasonVO> page(RaceSeasonQueryVO query) {
|
||||||
|
RacetrSeasonExample example = new RacetrSeasonExample();
|
||||||
|
Criteria c = example.createCriteria();
|
||||||
|
if (StringUtils.isNotEmpty(query.getCode())) {
|
||||||
|
c.andCodeLike(String.format("%%%s%%", query.getCode()));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(query.getTerm())) {
|
||||||
|
c.andTermLike(String.format("%%%s%%", query.getTerm()));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(query.getGroup()) && query.getGroup() != Group.Unknown) {
|
||||||
|
c.andGroupEqualTo(query.getGroup().name());
|
||||||
|
}
|
||||||
|
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||||
|
Page<RacetrSeason> page = (Page<RacetrSeason>) this.seasonDAO.selectByExample(example);
|
||||||
|
PageHelper.clearPage();
|
||||||
|
List<RaceSeasonVO> voList = this.convertDTO(page.getResult());
|
||||||
|
return PageVO.convert(page, voList);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private RaceSeasonVO convertVO(RacetrSeason rs, Map<Long, SysAccount> accountMap) {
|
||||||
|
RaceSeasonVO.Builder voBuild = RaceSeasonVO.newBuilder();
|
||||||
|
voBuild.setId(rs.getId());
|
||||||
|
voBuild.setCode(rs.getCode());
|
||||||
|
voBuild.setGroup(Group.valueOf(rs.getGroup()));
|
||||||
|
voBuild.setTerm(rs.getTerm());
|
||||||
|
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(accountMap, rs.getCreatorId(), rs.getUpdaterId(), rs.getCreateTime(), rs.getUdpateTime());
|
||||||
|
voBuild.setModifyInfo(modifyInfoVO);
|
||||||
|
return voBuild.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<RaceSeasonVO> convertDTO(List<RacetrSeason> rsList) {
|
||||||
|
if (CollectionUtils.isEmpty(rsList)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
List<Long> userIdList = rsList.stream().map(d -> List.of(d.getCreatorId(), d.getUpdaterId())).flatMap(Collection::stream).distinct().collect(Collectors.toList());
|
||||||
|
Map<Long, SysAccount> accountMap = this.iSysUserService.findEntitiesForMap(userIdList);
|
||||||
|
|
||||||
|
List<RaceSeasonVO> voList = Lists.newArrayListWithCapacity(rsList.size());
|
||||||
|
for (RacetrSeason rs : rsList) {
|
||||||
|
voList.add(this.convertVO(rs, accountMap));
|
||||||
|
}
|
||||||
|
return voList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void delete(Long id) {
|
||||||
|
// this.find(id);
|
||||||
|
//检查数据确定没有被绑定过
|
||||||
|
RacetrPaperExample paperExample = new RacetrPaperExample();
|
||||||
|
RacetrPaperExample.Criteria c = paperExample.createCriteria();
|
||||||
|
c.andSeasonIdEqualTo(id);
|
||||||
|
Long exsitCounter = this.racePaperDAO.countByExample(paperExample);
|
||||||
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(exsitCounter <= 0, "该数据已经被试卷绑定,无法删除");
|
||||||
|
this.seasonDAO.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.entity.SysAccount;
|
||||||
|
import club.joylink.rtss.util.DateTimeUtil;
|
||||||
|
import club.joylink.rtss.vo.common.ModifyInfo.ModifyInfoVO;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
public class RaceServiceUtil {
|
||||||
|
|
||||||
|
|
||||||
|
public static ModifyInfoVO createModifyInfo(Map<Long, SysAccount> accountMap, Long createId, Long updateId, LocalDateTime createTime, LocalDateTime updateTime) {
|
||||||
|
SysAccount createAcc = accountMap.get(createId);
|
||||||
|
ModifyInfoVO.Builder builder = ModifyInfoVO.newBuilder();
|
||||||
|
if (Objects.nonNull(createAcc)) {
|
||||||
|
builder.setCreatorId(createId);
|
||||||
|
builder.setCreatorName(createAcc.getNickname());
|
||||||
|
}
|
||||||
|
SysAccount updateAcc = accountMap.get(updateId);
|
||||||
|
if (Objects.nonNull(updateAcc)) {
|
||||||
|
builder.setCreatorId(updateId);
|
||||||
|
builder.setCreatorName(updateAcc.getNickname());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(createTime)) {
|
||||||
|
builder.setCreateTime(createTime.format(DateTimeUtil.DATE_TIME_DTF));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(updateTime)) {
|
||||||
|
builder.setUpdateTime(updateTime.format(DateTimeUtil.DATE_TIME_DTF));
|
||||||
|
}
|
||||||
|
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ModifyInfoVO createModifyInfo(Long createId, String createName, Long updateId, String updateName, LocalDateTime createTime, LocalDateTime updateTime) {
|
||||||
|
|
||||||
|
ModifyInfoVO.Builder builder = ModifyInfoVO.newBuilder();
|
||||||
|
builder.setCreatorId(createId);
|
||||||
|
builder.setCreatorName(createName);
|
||||||
|
builder.setUpdaterId(updateId);
|
||||||
|
builder.setUpdaterName(updateName);
|
||||||
|
if (Objects.nonNull(createTime)) {
|
||||||
|
builder.setCreateTime(createTime.format(DateTimeUtil.DATE_TIME_DTF));
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(updateTime)) {
|
||||||
|
builder.setUpdateTime(updateTime.format(DateTimeUtil.DATE_TIME_DTF));
|
||||||
|
}
|
||||||
|
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,188 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.dao.racetr.RacetrTaskDAO;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrTask;
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrTaskExample;
|
||||||
|
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||||
|
import club.joylink.rtss.services.ISysUserService;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.common.ModifyInfo.ModifyInfoVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskBind;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskBind.TaskBindType;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskDetailVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTaskDetailDTO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTaskTreeVO;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Transactional
|
||||||
|
@Slf4j
|
||||||
|
public class RaceTaskService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RacetrTaskDAO raceTaskDAO;
|
||||||
|
|
||||||
|
protected final static Long TASK_ROOT_ID = 0L;
|
||||||
|
|
||||||
|
private RacetrTask findById(Long id) {
|
||||||
|
RacetrTask task = this.raceTaskDAO.selectByPrimaryKey(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(task), "没有找到对应的任务");
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RaceTaskDetailVO detail(Long id) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(Objects.nonNull(id), "请选择对应的任务");
|
||||||
|
RaceTaskDetailDTO task = this.raceTaskDAO.details(id);
|
||||||
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(task), "未找到对应的任务数据");
|
||||||
|
|
||||||
|
RaceTaskDetailVO.Builder vo = RaceTaskDetailVO.newBuilder();
|
||||||
|
vo.setId(task.getId());
|
||||||
|
vo.setName(task.getName());
|
||||||
|
vo.setDesc(task.getDesc());
|
||||||
|
vo.setContent(task.getContent());
|
||||||
|
vo.setStandards(task.getStandards());
|
||||||
|
vo.setParentId(task.getParentId());
|
||||||
|
ModifyInfoVO modifyInfoVO = RaceServiceUtil.createModifyInfo(task.getCreatorId(), task.getCreatorName(), task.getUpdaterId(), task.getUpdaterName(), task.getCreateTime(), task.getUpdateTime());
|
||||||
|
vo.setModifyInfo(modifyInfoVO);
|
||||||
|
if (Objects.nonNull(task.getSceneId())) {
|
||||||
|
vo.setSceneId(task.getSceneId());
|
||||||
|
vo.setSceneName(task.getSceneName());
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(task.getSceneId())) {
|
||||||
|
vo.setRuleId(task.getRuleId());
|
||||||
|
vo.setRuleName(task.getRuleName());
|
||||||
|
}
|
||||||
|
return vo.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void save(RaceTaskCreateVO vo, AccountVO user) {
|
||||||
|
LocalDateTime now = LocalDateTime.now();
|
||||||
|
RacetrTask task = new RacetrTask();
|
||||||
|
task.setName(vo.getName());
|
||||||
|
task.setDesc(vo.getDesc());
|
||||||
|
task.setContent(vo.getContent());
|
||||||
|
task.setStandards(vo.getStandards());
|
||||||
|
task.setCreatorId(user.getId());
|
||||||
|
task.setUpdaterId(user.getId());
|
||||||
|
task.setCreateTime(now);
|
||||||
|
task.setUpdateTime(now);
|
||||||
|
|
||||||
|
task.setParentId(vo.getParentId());
|
||||||
|
this.raceTaskDAO.insert(task);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(Long id, RaceTaskCreateVO vo, AccountVO user) {
|
||||||
|
RacetrTask task = this.findById(id);
|
||||||
|
task.setName(vo.getName());
|
||||||
|
task.setDesc(vo.getDesc());
|
||||||
|
task.setContent(vo.getContent());
|
||||||
|
task.setStandards(vo.getStandards());
|
||||||
|
task.setUpdaterId(user.getId());
|
||||||
|
task.setUpdateTime(LocalDateTime.now());
|
||||||
|
this.raceTaskDAO.updateByPrimaryKey(task);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void bind(Long taskId, List<RaceTaskBind> bind, AccountVO user) {
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(!CollectionUtils.isEmpty(bind), "请选择要绑定的数据");
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(bind.size() <= 2, "最多绑定只能选择2个类型");
|
||||||
|
if (bind.size() > 1) {
|
||||||
|
List<TaskBindType> bindTypes = bind.stream().map(RaceTaskBind::getBindType).distinct().collect(Collectors.toList());
|
||||||
|
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(bindTypes.size() != 1, "最多绑定只能选择2个类型");
|
||||||
|
}
|
||||||
|
|
||||||
|
RacetrTask task = this.findById(taskId);
|
||||||
|
for (RaceTaskBind raceTaskBind : bind) {
|
||||||
|
if (raceTaskBind.getBindType() == TaskBindType.rule) {
|
||||||
|
task.setScoreRuleId(raceTaskBind.getBindId());
|
||||||
|
if (raceTaskBind.getStatus() == 1) {
|
||||||
|
task.setScoreRuleId(null);
|
||||||
|
}
|
||||||
|
} else if (raceTaskBind.getBindType() == TaskBindType.scene) {
|
||||||
|
task.setSceneId(raceTaskBind.getBindId());
|
||||||
|
if (raceTaskBind.getStatus() == 1) {
|
||||||
|
task.setSceneId(null);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log.error("未知任务绑定类型{}", raceTaskBind.getBindType().name());
|
||||||
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.fail("未知绑定类型");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
task.setUpdaterId(user.getId());
|
||||||
|
task.setUpdateTime(LocalDateTime.now());
|
||||||
|
this.raceTaskDAO.updateByPrimaryKey(task);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<RaceTaskTreeVO> tree() {
|
||||||
|
List<RacetrTask> taskList = this.raceTaskDAO.selectByExample(null);
|
||||||
|
Map<Long, List<RaceTaskTreeVO>> mapList = taskList.stream().map(RaceTaskTreeVO::new).collect(Collectors.groupingBy(RaceTaskTreeVO::getParentId));
|
||||||
|
List<RaceTaskTreeVO> rootTaskList = mapList.get(TASK_ROOT_ID);
|
||||||
|
if (CollectionUtils.isEmpty(rootTaskList)) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
for (RaceTaskTreeVO rootTask : rootTaskList) {
|
||||||
|
this.loopFind(rootTask, mapList);
|
||||||
|
}
|
||||||
|
return rootTaskList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<RaceTaskTreeVO> findChildren(Long parentId) {
|
||||||
|
RacetrTaskExample example = new RacetrTaskExample();
|
||||||
|
example.createCriteria().andParentIdEqualTo(parentId);
|
||||||
|
List<RacetrTask> taskList = this.raceTaskDAO.selectByExample(example);
|
||||||
|
return taskList.stream().map(RaceTaskTreeVO::new).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loopFind(RaceTaskTreeVO task, Map<Long, List<RaceTaskTreeVO>> mapList) {
|
||||||
|
List<RaceTaskTreeVO> children = mapList.get(task.getId());
|
||||||
|
if (Objects.nonNull(children)) {
|
||||||
|
task.setChildren(children);
|
||||||
|
for (RaceTaskTreeVO child : children) {
|
||||||
|
this.loopFind(child, mapList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void delete(Long id) {
|
||||||
|
RacetrTask rt = this.findById(id);
|
||||||
|
|
||||||
|
List<RaceTaskTreeVO> collection = Lists.newArrayList(new RaceTaskTreeVO(rt));
|
||||||
|
this.collectAllChildren(rt.getId(), collection);
|
||||||
|
List<Long> deleteIds = collection.stream().map(RaceTaskTreeVO::getId).distinct().collect(Collectors.toList());
|
||||||
|
log.info("删除任务[{}] 对应所有的子节点id[{}]", id, deleteIds);
|
||||||
|
RacetrTaskExample example = new RacetrTaskExample();
|
||||||
|
example.createCriteria().andIdIn(deleteIds);
|
||||||
|
this.raceTaskDAO.deleteByExample(example);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void collectAllChildren(Long parentId, List<RaceTaskTreeVO> collection) {
|
||||||
|
List<RaceTaskTreeVO> list = this.findChildren(parentId);
|
||||||
|
if (!CollectionUtils.isEmpty(list)) {
|
||||||
|
for (RaceTaskTreeVO c : list) {
|
||||||
|
collection.add(c);
|
||||||
|
this.collectAllChildren(c.getId(), collection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Long, List<RaceTaskDetailDTO>> recursiveFindTask(List<Long> taskIds) {
|
||||||
|
List<RaceTaskDetailDTO> taskDtoList = this.raceTaskDAO.recursiveFindTask(taskIds);
|
||||||
|
Map<Long, List<RaceTaskDetailDTO>> dtoMapList = taskDtoList.stream().collect(Collectors.groupingBy(RaceTaskDetailDTO::getParentId));
|
||||||
|
return dtoMapList;
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,6 @@
|
|||||||
package club.joylink.rtss.services.training2;
|
package club.joylink.rtss.services.training2;
|
||||||
|
|
||||||
import club.joylink.rtss.constants.MapStatus;
|
import club.joylink.rtss.constants.MapStatus;
|
||||||
import club.joylink.rtss.constants.Project;
|
|
||||||
import club.joylink.rtss.controller.advice.AuthenticateInterceptor;
|
|
||||||
import club.joylink.rtss.dao.MapInfoDAO;
|
import club.joylink.rtss.dao.MapInfoDAO;
|
||||||
import club.joylink.rtss.dao.PublishedTraining2DAO;
|
import club.joylink.rtss.dao.PublishedTraining2DAO;
|
||||||
import club.joylink.rtss.dao.RtsMapFunctionDAO;
|
import club.joylink.rtss.dao.RtsMapFunctionDAO;
|
||||||
@ -11,36 +9,29 @@ import club.joylink.rtss.entity.MapInfo;
|
|||||||
import club.joylink.rtss.entity.MapInfoExample;
|
import club.joylink.rtss.entity.MapInfoExample;
|
||||||
import club.joylink.rtss.entity.RtsMapFunction;
|
import club.joylink.rtss.entity.RtsMapFunction;
|
||||||
import club.joylink.rtss.entity.RtsMapFunctionExample;
|
import club.joylink.rtss.entity.RtsMapFunctionExample;
|
||||||
import club.joylink.rtss.entity.training2.*;
|
import club.joylink.rtss.entity.training2.PublishedTraining2Example;
|
||||||
|
import club.joylink.rtss.entity.training2.PublishedTraining2WithBLOBs;
|
||||||
|
import club.joylink.rtss.entity.training2.RtsTraining2RuleExample;
|
||||||
|
import club.joylink.rtss.entity.training2.RtsTraining2RuleWithBLOBs;
|
||||||
import club.joylink.rtss.services.mapFunction.RtsMapFunctionService;
|
import club.joylink.rtss.services.mapFunction.RtsMapFunctionService;
|
||||||
import club.joylink.rtss.services.project.ProjectService;
|
import club.joylink.rtss.services.project.ProjectService;
|
||||||
import club.joylink.rtss.simulation.SimulationManager;
|
import club.joylink.rtss.simulation.SimulationManager;
|
||||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||||
import club.joylink.rtss.simulation.cbtc.SimulationService;
|
import club.joylink.rtss.simulation.cbtc.SimulationService;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement;
|
import club.joylink.rtss.simulation.cbtc.data.map.MapNamedElement;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.Route;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.Stand;
|
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.Switch;
|
|
||||||
import club.joylink.rtss.util.JsonUtils;
|
import club.joylink.rtss.util.JsonUtils;
|
||||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||||
import club.joylink.rtss.vo.client.training2.ScoringRuleVO;
|
import club.joylink.rtss.vo.client.training2.ScoringRuleVO;
|
||||||
import club.joylink.rtss.vo.project.ProjectVO;
|
|
||||||
import club.joylink.rtss.vo.training2.rule.BgSceneStatusRule;
|
|
||||||
import club.joylink.rtss.vo.training2.rule.MapLocationRule;
|
|
||||||
import club.joylink.rtss.vo.training2.rule.StepRule;
|
import club.joylink.rtss.vo.training2.rule.StepRule;
|
||||||
import club.joylink.rtss.vo.training2.rule.Training2Rule;
|
import club.joylink.rtss.vo.training2.rule.Training2Rule;
|
||||||
import com.fasterxml.jackson.core.JsonParseException;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.logging.log4j.util.BiConsumer;
|
import org.apache.logging.log4j.util.BiConsumer;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.bind.annotation.RequestAttribute;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Consumer;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,7 +76,7 @@ public class Training2RuleService {
|
|||||||
* @return 生成结果
|
* @return 生成结果
|
||||||
*/
|
*/
|
||||||
public List<String> generateTrainingByRule(String groupId) {
|
public List<String> generateTrainingByRule(String groupId) {
|
||||||
Simulation simulation = simulationManager.getById(groupId , Simulation.class);
|
Simulation simulation = simulationManager.getById(groupId, Simulation.class);
|
||||||
Long mapId = simulation.getBuildParams().getMap().getId();
|
Long mapId = simulation.getBuildParams().getMap().getId();
|
||||||
if (runningMapIdSet.contains(mapId)) {
|
if (runningMapIdSet.contains(mapId)) {
|
||||||
return Arrays.asList("该地图正在生成实训!");
|
return Arrays.asList("该地图正在生成实训!");
|
||||||
@ -131,7 +122,6 @@ public class Training2RuleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param mapId
|
* @param mapId
|
||||||
* @param functionId
|
* @param functionId
|
||||||
* @return
|
* @return
|
||||||
@ -144,7 +134,7 @@ public class Training2RuleService {
|
|||||||
/**
|
/**
|
||||||
* 根据地图ID生成实训
|
* 根据地图ID生成实训
|
||||||
*/
|
*/
|
||||||
public List<String> generateTrainingByMapId(List<Long> mapIdList, LoginUserInfoVO loginUserInfoVO){
|
public List<String> generateTrainingByMapId(List<Long> mapIdList, LoginUserInfoVO loginUserInfoVO) {
|
||||||
// 地图列表
|
// 地图列表
|
||||||
MapInfoExample example = new MapInfoExample();
|
MapInfoExample example = new MapInfoExample();
|
||||||
MapInfoExample.Criteria criteria = example.createCriteria().andStatusEqualTo(MapStatus.Online.getCode());
|
MapInfoExample.Criteria criteria = example.createCriteria().andStatusEqualTo(MapStatus.Online.getCode());
|
||||||
@ -223,7 +213,7 @@ public class Training2RuleService {
|
|||||||
List<Map<String, Long>> publishTrainingIdList = publishedTraining2DAO.selectTrainingByRuleId(
|
List<Map<String, Long>> publishTrainingIdList = publishedTraining2DAO.selectTrainingByRuleId(
|
||||||
ruleIdList, mapList.stream().map(MapInfo::getId).collect(Collectors.toList()));
|
ruleIdList, mapList.stream().map(MapInfo::getId).collect(Collectors.toList()));
|
||||||
Map<Long, List<Long>> publishTrainingIdMap = publishTrainingIdList.stream().collect(
|
Map<Long, List<Long>> publishTrainingIdMap = publishTrainingIdList.stream().collect(
|
||||||
Collectors.groupingBy(m -> m.get("mapId"), Collectors.mapping(m -> m.get("id") , Collectors.toList())));
|
Collectors.groupingBy(m -> m.get("mapId"), Collectors.mapping(m -> m.get("id"), Collectors.toList())));
|
||||||
|
|
||||||
List<String> errorMsgList = new ArrayList<>();
|
List<String> errorMsgList = new ArrayList<>();
|
||||||
loopMapListGenerateTraining(loginUserInfoVO, mapList, lineCodeRuleMap, errorMsgList, publishTrainingIdMap);
|
loopMapListGenerateTraining(loginUserInfoVO, mapList, lineCodeRuleMap, errorMsgList, publishTrainingIdMap);
|
||||||
@ -237,7 +227,7 @@ public class Training2RuleService {
|
|||||||
List<String> errorMsgList = new ArrayList<>();
|
List<String> errorMsgList = new ArrayList<>();
|
||||||
mapRuleIdMap.forEach((k, v) -> {
|
mapRuleIdMap.forEach((k, v) -> {
|
||||||
// 地图信息
|
// 地图信息
|
||||||
MapInfo mapInfo = mapInfoDAO.selectByPrimaryKey(k);
|
MapInfo mapInfo = mapInfoDAO.selectByPrimaryKey(k);
|
||||||
// 规则列表
|
// 规则列表
|
||||||
RtsTraining2RuleExample rtsTraining2RuleExample = new RtsTraining2RuleExample();
|
RtsTraining2RuleExample rtsTraining2RuleExample = new RtsTraining2RuleExample();
|
||||||
rtsTraining2RuleExample.createCriteria().andIdIn(v).andLineCodeEqualTo(mapInfo.getLineCode());
|
rtsTraining2RuleExample.createCriteria().andIdIn(v).andLineCodeEqualTo(mapInfo.getLineCode());
|
||||||
@ -246,8 +236,8 @@ public class Training2RuleService {
|
|||||||
// 获取客户端参数
|
// 获取客户端参数
|
||||||
List<RtsMapFunction> entities = getRtsMapFunctions(k);
|
List<RtsMapFunction> entities = getRtsMapFunctions(k);
|
||||||
if (!CollectionUtils.isEmpty(entities)) {
|
if (!CollectionUtils.isEmpty(entities)) {
|
||||||
List<Map<String,String>> ruleNameMapList = ruleList.stream().map(r -> {
|
List<Map<String, String>> ruleNameMapList = ruleList.stream().map(r -> {
|
||||||
Map<String,String> map = new HashMap<>();
|
Map<String, String> map = new HashMap<>();
|
||||||
map.put("ruleName", r.getName());
|
map.put("ruleName", r.getName());
|
||||||
map.put("client", r.getClient());
|
map.put("client", r.getClient());
|
||||||
return map;
|
return map;
|
||||||
@ -255,7 +245,7 @@ public class Training2RuleService {
|
|||||||
// 需要删除的列表
|
// 需要删除的列表
|
||||||
List<Long> delTrainingIdList = publishedTraining2DAO.selectTrainingIdByRuleNameAndMapId(ruleNameMapList, k);
|
List<Long> delTrainingIdList = publishedTraining2DAO.selectTrainingIdByRuleNameAndMapId(ruleNameMapList, k);
|
||||||
try {
|
try {
|
||||||
Simulation simulation = simulationService.createSimulationPojo(entities.get(0).getId(), loginUserInfoVO, false);
|
Simulation simulation = simulationService.createSimulation(entities.get(0).getId(), loginUserInfoVO, false);
|
||||||
errorMsgList.addAll(generateTraining(simulation, ruleList, delTrainingIdList, delPublishTrainingByIds));
|
errorMsgList.addAll(generateTraining(simulation, ruleList, delTrainingIdList, delPublishTrainingByIds));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("创建仿真失败", e);
|
log.error("创建仿真失败", e);
|
||||||
@ -288,7 +278,7 @@ public class Training2RuleService {
|
|||||||
bloBs.setId(rule.getId());
|
bloBs.setId(rule.getId());
|
||||||
bloBs.setScoreRule(JsonUtils.writeValueAsString(detailVOList));
|
bloBs.setScoreRule(JsonUtils.writeValueAsString(detailVOList));
|
||||||
return bloBs;
|
return bloBs;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
rtsTraining2RuleMapper.updateScoreRule(ruleScoreList);
|
rtsTraining2RuleMapper.updateScoreRule(ruleScoreList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,7 +292,7 @@ public class Training2RuleService {
|
|||||||
List<RtsMapFunction> entities = getRtsMapFunctions(mapInfo.getId());
|
List<RtsMapFunction> entities = getRtsMapFunctions(mapInfo.getId());
|
||||||
if (!CollectionUtils.isEmpty(entities) && !CollectionUtils.isEmpty(lineCodeRuleMap.get(mapInfo.getLineCode()))) {
|
if (!CollectionUtils.isEmpty(entities) && !CollectionUtils.isEmpty(lineCodeRuleMap.get(mapInfo.getLineCode()))) {
|
||||||
try {
|
try {
|
||||||
Simulation simulation = simulationService.createSimulationPojo(entities.get(0).getId(), loginUserInfoVO, false);
|
Simulation simulation = simulationService.createSimulation(entities.get(0).getId(), loginUserInfoVO, false);
|
||||||
if (CollectionUtils.isEmpty(deleteTrainingIdMap)) {
|
if (CollectionUtils.isEmpty(deleteTrainingIdMap)) {
|
||||||
errorMsgList.addAll(generateTraining(simulation, lineCodeRuleMap.get(mapInfo.getLineCode()), null, delPublishTrainingByMapId));
|
errorMsgList.addAll(generateTraining(simulation, lineCodeRuleMap.get(mapInfo.getLineCode()), null, delPublishTrainingByMapId));
|
||||||
} else {
|
} else {
|
||||||
@ -318,8 +308,9 @@ public class Training2RuleService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成实训方法
|
* 生成实训方法
|
||||||
* @param simulation 对应地图仿真
|
*
|
||||||
* @param ruleList 生成规则
|
* @param simulation 对应地图仿真
|
||||||
|
* @param ruleList 生成规则
|
||||||
* @param delTrainingIds 要删除已发布的实训ID
|
* @param delTrainingIds 要删除已发布的实训ID
|
||||||
* @param delConsumer 删除实训方法
|
* @param delConsumer 删除实训方法
|
||||||
* @return
|
* @return
|
||||||
@ -358,11 +349,11 @@ public class Training2RuleService {
|
|||||||
publishedTraining2DAO.insertList(training2WithBLOBs);
|
publishedTraining2DAO.insertList(training2WithBLOBs);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
log.error("实训反序列化失败", e);
|
log.error("实训反序列化失败", e);
|
||||||
errorMsgList.add(String.format("地图%d实训[%s]反序列化,实训ID【%d】", mapId, rule.getName(), rule.getId(),Locale.ENGLISH));
|
errorMsgList.add(String.format("地图%d实训[%s]反序列化,实训ID【%d】", mapId, rule.getName(), rule.getId(), Locale.ENGLISH));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("实训生成失败", e);
|
log.error("实训生成失败", e);
|
||||||
errorMsgList.add(String.format("地图%d实训[%s]生成失败,设备信息【%s】,原因:%s", mapId,
|
errorMsgList.add(String.format("地图%d实训[%s]生成失败,设备信息【%s】,原因:%s", mapId,
|
||||||
rule.getName(), rule.getDeviceRule(),e.getMessage(),Locale.ENGLISH));
|
rule.getName(), rule.getDeviceRule(), e.getMessage(), Locale.ENGLISH));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,332 +16,360 @@ import club.joylink.rtss.simulation.cbtc.data.vo.ControlTransferReplyVO;
|
|||||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
import club.joylink.rtss.simulation.cbtc.exception.SimulationException;
|
||||||
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType;
|
||||||
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@OperateHandler
|
@OperateHandler
|
||||||
public class StationOperateHandler {
|
public class StationOperateHandler {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private AtsStationService atsStationService;
|
private AtsStationService atsStationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CiApiService ciApiService;
|
private CiApiService ciApiService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置折返站折返策略
|
* 设置折返站折返策略
|
||||||
*
|
*
|
||||||
* @param simulation
|
* @param simulation
|
||||||
* @param stationCode 折返车站code
|
* @param stationCode 折返车站code
|
||||||
* @param id 折返策略id
|
* @param id 折返策略id
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Turn_Back_Strategy)
|
@OperateHandlerMapping(type = Operation.Type.Station_Set_Turn_Back_Strategy)
|
||||||
public void setTurnBackStrategy(Simulation simulation, String stationCode, Integer id) {
|
public void setTurnBackStrategy(Simulation simulation, String stationCode, Integer id) {
|
||||||
this.atsStationService.setTurnBackStrategy(simulation, stationCode, id);
|
this.atsStationService.setTurnBackStrategy(simulation, stationCode, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全站设置联锁自动触发
|
* 全站设置联锁自动触发
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_CI_Auto_Trigger)
|
@OperateHandlerMapping(type = Operation.Type.Station_Set_CI_Auto_Trigger)
|
||||||
public void setCIAutoTrigger(Simulation simulation, String stationCode) {
|
public void setCIAutoTrigger(Simulation simulation, String stationCode) {
|
||||||
this.atsStationService.setCiAutoTrigger(simulation, stationCode);
|
this.atsStationService.setCiAutoTrigger(simulation, stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全站取消联锁自动触发
|
* 全站取消联锁自动触发
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_CI_Auto_Trigger)
|
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_CI_Auto_Trigger)
|
||||||
public void cancelCIAutoTrigger(Simulation simulation, String stationCode) {
|
public void cancelCIAutoTrigger(Simulation simulation, String stationCode) {
|
||||||
this.atsStationService.cancelCiAutoTrigger(simulation, stationCode);
|
this.atsStationService.cancelCiAutoTrigger(simulation, stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所有进路自排开
|
* 所有进路自排开
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Open_Auto_Setting)
|
@OperateHandlerMapping(type = Operation.Type.Station_Open_Auto_Setting)
|
||||||
public void openAutoSetting(Simulation simulation, String stationCode) {
|
public void openAutoSetting(Simulation simulation, String stationCode) {
|
||||||
this.atsStationService.openAutoSetting(simulation, stationCode);
|
this.atsStationService.openAutoSetting(simulation, stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 所有进路自排关
|
* 所有进路自排关
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Close_Auto_Setting)
|
@OperateHandlerMapping(type = Operation.Type.Station_Close_Auto_Setting)
|
||||||
public void closeAutoSetting(Simulation simulation, String stationCode) {
|
public void closeAutoSetting(Simulation simulation, String stationCode) {
|
||||||
this.atsStationService.closeAutoSetting(simulation, stationCode);
|
this.atsStationService.closeAutoSetting(simulation, stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行关键操作测试
|
* 执行关键操作测试
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Key_Operation_Test)
|
@OperateHandlerMapping(type = Operation.Type.Station_Key_Operation_Test)
|
||||||
public void keyOperationTest() {
|
public void keyOperationTest() {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "功能暂未实现");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "功能暂未实现");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上电解锁
|
* 上电解锁
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Power_On_Unlock)
|
@OperateHandlerMapping(type = Operation.Type.Station_Power_On_Unlock)
|
||||||
public void powerOnUnlock(Simulation simulation, String stationCode) {
|
public void powerOnUnlock(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
ciApiService.powerOnUnlock(simulation, repository.getByCode(stationCode, Station.class));
|
ciApiService.powerOnUnlock(simulation, repository.getByCode(stationCode, Station.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示车站信息
|
* 显示车站信息
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Info)
|
@OperateHandlerMapping(type = Operation.Type.Station_Info)
|
||||||
public StationStatus info(Simulation simulation, String stationCode) {
|
public StationStatus info(Simulation simulation, String stationCode) {
|
||||||
return atsStationService.info(simulation, stationCode);
|
return atsStationService.info(simulation, stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置引导总锁
|
* 设置引导总锁
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Master_Guide_Lock)
|
@OperateHandlerMapping(type = Operation.Type.Station_Set_Master_Guide_Lock)
|
||||||
public void setMasterGuideLock(Simulation simulation, String stationCode) {
|
public void setMasterGuideLock(Simulation simulation, String stationCode) {
|
||||||
atsStationService.setMasterGuideLock(simulation, stationCode);
|
atsStationService.setMasterGuideLock(simulation, stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消引导总锁
|
* 取消引导总锁
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_Master_Guide_Lock)
|
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_Master_Guide_Lock)
|
||||||
public void cancelMasterGuideLock(Simulation simulation, String stationCode) {
|
public void cancelMasterGuideLock(Simulation simulation, String stationCode) {
|
||||||
atsStationService.cancelMasterGuideLock(simulation, stationCode);
|
atsStationService.cancelMasterGuideLock(simulation, stationCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求站控lc
|
* 请求站控lc
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Apply_For_Station_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Apply_For_Station_Control)
|
||||||
public void applyForStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void applyForStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
atsStationService.applyForStationControl(simulation, fromMember, stationCodes);
|
List<String> stationCodes) {
|
||||||
}
|
atsStationService.applyForStationControl(simulation, fromMember, stationCodes);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求中控lc
|
* 请求中控lc
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Apply_For_Center_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Apply_For_Center_Control)
|
||||||
public void applyForCenterControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void applyForCenterControl(Simulation simulation, SimulationMember fromMember,
|
||||||
atsStationService.applyForCenterControl(simulation, fromMember, stationCodes);
|
List<String> stationCodes) {
|
||||||
}
|
atsStationService.applyForCenterControl(simulation, fromMember, stationCodes);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
@OperateHandlerMapping(type = Operation.Type.CM_Direct_Turn_Center_Control)
|
||||||
* 连锁控
|
public void directTurnCenterControl(Simulation simulation, String stationCode) {
|
||||||
*/
|
atsStationService.directTurnCenterControl(simulation, stationCode);
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Interlock_Control)
|
}
|
||||||
public void applyForInterlockControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
|
||||||
atsStationService.applyForInterlockControl(simulation, fromMember, stationCodes);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 强制站控-l
|
* 连锁控
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Force_Station_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Interlock_Control)
|
||||||
public void forceForStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void applyForInterlockControl(Simulation simulation, SimulationMember fromMember,
|
||||||
atsStationService.forceForStationControl(simulation, fromMember, stationCodes);
|
List<String> stationCodes) {
|
||||||
}
|
atsStationService.applyForInterlockControl(simulation, fromMember, stationCodes);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 紧急站控-l
|
* 强制站控-l
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Emergency_Station_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Force_Station_Control)
|
||||||
public void emergencyStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void forceForStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
atsStationService.emergencyStationControl(simulation, fromMember, stationCodes);
|
List<String> stationCodes) {
|
||||||
}
|
atsStationService.forceForStationControl(simulation, fromMember, stationCodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 紧急站控-l
|
||||||
|
*/
|
||||||
|
@OperateHandlerMapping(type = Operation.Type.CM_Emergency_Station_Control)
|
||||||
|
public void emergencyStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
|
atsStationService.emergencyStationControl(simulation, fromMember, stationCodes);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回复站控请求c
|
* 回复站控请求c
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Reply_Station_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Reply_Station_Control)
|
||||||
public void replyForStationControl(Simulation simulation, List<ControlTransferReplyVO> replyVOList) {
|
public void replyForStationControl(Simulation simulation,
|
||||||
atsStationService.replyForStationControl(simulation, replyVOList);
|
List<ControlTransferReplyVO> replyVOList) {
|
||||||
}
|
atsStationService.replyForStationControl(simulation, replyVOList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回复中控请求c
|
* 回复中控请求c
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Reply_Center_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Reply_Center_Control)
|
||||||
public void replyForCenterControl(Simulation simulation, List<ControlTransferReplyVO> replyVOList) {
|
public void replyForCenterControl(Simulation simulation,
|
||||||
atsStationService.replyForCenterControl(simulation, replyVOList);
|
List<ControlTransferReplyVO> replyVOList) {
|
||||||
}
|
atsStationService.replyForCenterControl(simulation, replyVOList);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关站信号
|
* 关站信号
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Close_AllSignal)
|
@OperateHandlerMapping(type = Operation.Type.Station_Close_AllSignal)
|
||||||
public void closeAllSignal(Simulation simulation, String stationCode) {
|
public void closeAllSignal(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
repository.getSignalList().stream()
|
repository.getSignalList().stream()
|
||||||
.filter(s -> s.getStation() != null && Objects.equals(stationCode, s.getStation().getCode()))
|
.filter(
|
||||||
.forEach(signal -> {
|
s -> s.getStation() != null && Objects.equals(stationCode, s.getStation().getCode()))
|
||||||
ciApiService.blockadeSignal(simulation, signal.getCode());
|
.forEach(signal -> {
|
||||||
if (signal.getLockedRoute() != null) {
|
ciApiService.blockadeSignal(simulation, signal.getCode());
|
||||||
ciApiService.closeSignal(simulation, signal.getCode());
|
if (signal.getLockedRoute() != null) {
|
||||||
}
|
ciApiService.closeSignal(simulation, signal.getCode());
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关区信号
|
* 关区信号
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_CIArea_Close_AllSignal)
|
@OperateHandlerMapping(type = Operation.Type.Station_CIArea_Close_AllSignal)
|
||||||
public void closeCIAreaAllSignal(Simulation simulation, String stationCode) {
|
public void closeCIAreaAllSignal(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
repository.getSignalList().stream()
|
repository.getSignalList().stream()
|
||||||
.filter(s -> Objects.equals(stationCode, s.getInterlockStation().getCode()))
|
.filter(s -> Objects.equals(stationCode, s.getInterlockStation().getCode()))
|
||||||
.forEach(signal -> {
|
.forEach(signal -> {
|
||||||
ciApiService.blockadeSignal(simulation, signal.getCode());
|
ciApiService.blockadeSignal(simulation, signal.getCode());
|
||||||
ciApiService.closeSignal(simulation, signal.getCode());
|
ciApiService.closeSignal(simulation, signal.getCode());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 交出控制权/下放站控
|
* 交出控制权/下放站控
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Surrender_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Surrender_Control)
|
||||||
public void surrenderControl(Simulation simulation, SimulationMember member, String stationCode) {
|
public void surrenderControl(Simulation simulation, SimulationMember member, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.atsStationService.surrenderControl(simulation, member, repository.getByCode(stationCode, Station.class));
|
this.atsStationService.surrenderControl(simulation, member,
|
||||||
}
|
repository.getByCode(stationCode, Station.class));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 接收控制权
|
* 接收控制权
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Receive_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Receive_Control)
|
||||||
public void receiveControl(Simulation simulation, SimulationMember member, String stationCode) {
|
public void receiveControl(Simulation simulation, SimulationMember member, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.atsStationService.receiveControl(simulation, member, repository.getByCode(stationCode, Station.class));
|
this.atsStationService.receiveControl(simulation, member,
|
||||||
}
|
repository.getByCode(stationCode, Station.class));
|
||||||
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Restart)
|
@OperateHandlerMapping(type = Operation.Type.Station_Restart)
|
||||||
public void restart(Simulation simulation, String stationCode) {
|
public void restart(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.ciApiService.restart(simulation, repository.getByCode(stationCode, Station.class));
|
this.ciApiService.restart(simulation, repository.getByCode(stationCode, Station.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Release)
|
@OperateHandlerMapping(type = Operation.Type.Station_Release)
|
||||||
public void release(Simulation simulation, String stationCode) {
|
public void release(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.ciApiService.release(simulation, repository.getByCode(stationCode, Station.class));
|
this.ciApiService.release(simulation, repository.getByCode(stationCode, Station.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_CI_Auto)
|
@OperateHandlerMapping(type = Operation.Type.Station_Set_CI_Auto)
|
||||||
public void setCIAuto(Simulation simulation, String stationCode) {
|
public void setCIAuto(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.atsStationService.setCIAuto(simulation, repository.getByCode(stationCode, Station.class));
|
this.atsStationService.setCIAuto(simulation, repository.getByCode(stationCode, Station.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_CI_Auto)
|
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_CI_Auto)
|
||||||
public void cancelCIAuto(Simulation simulation, String stationCode) {
|
public void cancelCIAuto(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.atsStationService.cancelCIAuto(simulation, repository.getByCode(stationCode, Station.class));
|
this.atsStationService.cancelCIAuto(simulation,
|
||||||
}
|
repository.getByCode(stationCode, Station.class));
|
||||||
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Set_Or_Cancel_Force_Physical_Signal)
|
@OperateHandlerMapping(type = Operation.Type.Station_Set_Or_Cancel_Force_Physical_Signal)
|
||||||
public void setOrCancelForcePhysicalSignal(Simulation simulation, String stationCode) {
|
public void setOrCancelForcePhysicalSignal(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.atsStationService.setOrCancelForcePhysicalSignal(simulation, repository.getByCode(stationCode, Station.class));
|
this.atsStationService.setOrCancelForcePhysicalSignal(simulation,
|
||||||
}
|
repository.getByCode(stationCode, Station.class));
|
||||||
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Apply)
|
@OperateHandlerMapping(type = Operation.Type.Station_Control_Apply)
|
||||||
public void applyControl(Simulation simulation, List<String> stationCodes, SimulationMember simulationMember) {
|
public void applyControl(Simulation simulation, List<String> stationCodes,
|
||||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站");
|
SimulationMember simulationMember) {
|
||||||
this.atsStationService.applyControl(simulation, stationCodes, simulationMember);
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||||
}
|
"未选择车站");
|
||||||
|
this.atsStationService.applyControl(simulation, stationCodes, simulationMember);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Transfer)
|
@OperateHandlerMapping(type = Operation.Type.Station_Control_Transfer)
|
||||||
public void transferControl(Simulation simulation, List<String> stationCodes, boolean agree, SimulationMember simulationMember) {
|
public void transferControl(Simulation simulation, List<String> stationCodes, boolean agree,
|
||||||
this.atsStationService.transferControl(simulation, stationCodes, agree, simulationMember);
|
SimulationMember simulationMember) {
|
||||||
}
|
this.atsStationService.transferControl(simulation, stationCodes, agree, simulationMember);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Devolve)
|
@OperateHandlerMapping(type = Operation.Type.Station_Control_Devolve)
|
||||||
public void devolveControl(Simulation simulation, List<String> stationCodes, SimulationMember simulationMember) {
|
public void devolveControl(Simulation simulation, List<String> stationCodes,
|
||||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站");
|
SimulationMember simulationMember) {
|
||||||
this.atsStationService.devolveControl(simulation, stationCodes, simulationMember);
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||||
}
|
"未选择车站");
|
||||||
|
this.atsStationService.devolveControl(simulation, stationCodes, simulationMember);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Control_Revoke)
|
@OperateHandlerMapping(type = Operation.Type.Station_Control_Revoke)
|
||||||
public void revokeControl(Simulation simulation, List<String> stationCodes, SimulationMember simulationMember) {
|
public void revokeControl(Simulation simulation, List<String> stationCodes,
|
||||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes, "未选择车站");
|
SimulationMember simulationMember) {
|
||||||
this.atsStationService.revokeControl(simulation, stationCodes, simulationMember);
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||||
}
|
"未选择车站");
|
||||||
|
this.atsStationService.revokeControl(simulation, stationCodes, simulationMember);
|
||||||
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Pre_Reset)
|
@OperateHandlerMapping(type = Operation.Type.Station_Pre_Reset)
|
||||||
public void preReset(Simulation simulation, String stationCode) {
|
public void preReset(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.atsStationService.preReset(simulation, repository.getByCode(stationCode, Station.class));
|
this.atsStationService.preReset(simulation, repository.getByCode(stationCode, Station.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_Pre_Reset)
|
@OperateHandlerMapping(type = Operation.Type.Station_Cancel_Pre_Reset)
|
||||||
public void cancelPreReset(Simulation simulation, String stationCode) {
|
public void cancelPreReset(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.atsStationService.cancelPreReset(simulation, repository.getByCode(stationCode, Station.class));
|
this.atsStationService.cancelPreReset(simulation,
|
||||||
}
|
repository.getByCode(stationCode, Station.class));
|
||||||
|
}
|
||||||
|
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Restart_Interlock_Machine)
|
@OperateHandlerMapping(type = Operation.Type.Station_Restart_Interlock_Machine)
|
||||||
public void restartInterlock(Simulation simulation, String stationCode) {
|
public void restartInterlock(Simulation simulation, String stationCode) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
this.atsStationService.restartInterlock(simulation, repository.getByCode(stationCode, Station.class));
|
this.atsStationService.restartInterlock(simulation,
|
||||||
}
|
repository.getByCode(stationCode, Station.class));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 引导总锁(大铁)
|
* 引导总锁(大铁)
|
||||||
*
|
*
|
||||||
* @param stationCode 车站
|
* @param stationCode 车站
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Master_Lock)
|
@OperateHandlerMapping(type = Operation.Type.Station_Master_Lock)
|
||||||
public void masterLock(Simulation simulation, String stationCode, Station.Throat throat) {
|
public void masterLock(Simulation simulation, String stationCode, Station.Throat throat) {
|
||||||
ciApiService.switchMasterLock(simulation, stationCode, throat);
|
ciApiService.switchMasterLock(simulation, stationCode, throat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解除引导总锁(大铁)
|
* 解除引导总锁(大铁)
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Master_Unlock)
|
@OperateHandlerMapping(type = Operation.Type.Station_Master_Unlock)
|
||||||
public void masterUnlock(Simulation simulation, String stationCode, Station.Throat throat) {
|
public void masterUnlock(Simulation simulation, String stationCode, Station.Throat throat) {
|
||||||
ciApiService.switchMasterUnlock(simulation, stationCode, throat);
|
ciApiService.switchMasterUnlock(simulation, stationCode, throat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 大铁非常站控(大铁)
|
* 大铁非常站控(大铁)
|
||||||
*
|
*
|
||||||
* @param stationCode 车站编号
|
* @param stationCode 车站编号
|
||||||
* @param pressDown 弹起:0;按下:1
|
* @param pressDown 弹起:0;按下:1
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Special_Station_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Special_Station_Control)
|
||||||
public void specialStationControl(Simulation simulation, SimulationMember fromMember, String stationCode, Integer pressDown) {
|
public void specialStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
atsStationService.specialStationControl(simulation, fromMember, stationCode, pressDown);
|
String stationCode, Integer pressDown) {
|
||||||
}
|
atsStationService.specialStationControl(simulation, fromMember, stationCode, pressDown);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车站状态选择切换
|
* 车站状态选择切换
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Switch_Route_Set_Model)
|
@OperateHandlerMapping(type = Operation.Type.Station_Switch_Route_Set_Model)
|
||||||
public void switchRouteSetModel(Simulation simulation, List<RouteModelParam> routeSetModeParams) {
|
public void switchRouteSetModel(Simulation simulation, List<RouteModelParam> routeSetModeParams) {
|
||||||
atsStationService.switchRouteSetModel(simulation, routeSetModeParams);
|
atsStationService.switchRouteSetModel(simulation, routeSetModeParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车站在分散自律时,操作模式转换
|
* 车站在分散自律时,操作模式转换
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Switch_Control_Operation_Mode)
|
@OperateHandlerMapping(type = Operation.Type.Station_Switch_Control_Operation_Mode)
|
||||||
public void controlOperationModeSwitch(Simulation simulation, SimulationMember fromMember, List<OperationModeParam> params) {
|
public void controlOperationModeSwitch(Simulation simulation, SimulationMember fromMember,
|
||||||
atsStationService.controlOperationModeSwitch(simulation, fromMember, params);
|
List<OperationModeParam> params) {
|
||||||
}
|
atsStationService.controlOperationModeSwitch(simulation, fromMember, params);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分散自律同意、不同意转换模式操作
|
* 分散自律同意、不同意转换模式操作
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.Station_Handle_Operation_Mode_Apply)
|
@OperateHandlerMapping(type = Operation.Type.Station_Handle_Operation_Mode_Apply)
|
||||||
public void handleOperationModelApply(Simulation simulation, List<String> agreeStationCodes, List<String> noAgreeStationCodes) {
|
public void handleOperationModelApply(Simulation simulation, List<String> agreeStationCodes,
|
||||||
atsStationService.handleOperationModelApply(simulation, agreeStationCodes, noAgreeStationCodes);
|
List<String> noAgreeStationCodes) {
|
||||||
}
|
atsStationService.handleOperationModelApply(simulation, agreeStationCodes, noAgreeStationCodes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -494,15 +494,17 @@ public class CiApiServiceImpl2 implements CiApiService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (signal.getGuideRemain() > 0) {
|
if (repository.getConfig().isRailway() && signal.isHigherThanGuideLevel()) {
|
||||||
// Route lockedRoute = signal.getLockedRoute();
|
Route lockedRoute = signal.getLockedRoute();
|
||||||
// if (lockedRoute != null && lockedRoute.getFirstLogicSection().isOccupied() && signal.isGuideAspect()) {
|
if (lockedRoute != null && lockedRoute.getFirstLogicSection().isOccupied()) {
|
||||||
// signal.guideDelayStart();
|
signal.guideDelayStart();
|
||||||
// }
|
}
|
||||||
signal.setGuideRemain(0);
|
|
||||||
} else {
|
|
||||||
signal.guideDelayStart();
|
|
||||||
}
|
}
|
||||||
|
// if (signal.getGuideRemain() > 0) {
|
||||||
|
// signal.setGuideRemain(0);
|
||||||
|
// } else {
|
||||||
|
// signal.guideDelayStart();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,7 +6,6 @@ import club.joylink.rtss.simulation.vo.SimulationInfoVO;
|
|||||||
import club.joylink.rtss.vo.AccountVO;
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
import club.joylink.rtss.vo.LoginUserInfoVO;
|
import club.joylink.rtss.vo.LoginUserInfoVO;
|
||||||
import club.joylink.rtss.vo.client.PageVO;
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
import club.joylink.rtss.vo.client.mapFunction.MapFunctionVO;
|
|
||||||
import club.joylink.rtss.vo.client.simulationv1.RunAsPlanParam;
|
import club.joylink.rtss.vo.client.simulationv1.RunAsPlanParam;
|
||||||
import club.joylink.rtss.vo.client.simulationv1.SimulationInfoQueryVO;
|
import club.joylink.rtss.vo.client.simulationv1.SimulationInfoQueryVO;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
@ -18,9 +17,7 @@ public interface SimulationService {
|
|||||||
/**
|
/**
|
||||||
* 创建仿真
|
* 创建仿真
|
||||||
*/
|
*/
|
||||||
String createSimulation(long mapId, MapFunctionVO mapFunctionVO, @NonNull LoginUserInfoVO loginUserInfoVO, Map<String, Boolean> createUserType);
|
String createSimulation(long mapId, SimulationWorkParamVO workParamVO, @NonNull LoginUserInfoVO loginUserInfoVO);
|
||||||
|
|
||||||
String createSimulation(Long mapFunctionId, LoginUserInfoVO loginInfo);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 给仿真添加功能
|
* 给仿真添加功能
|
||||||
@ -44,7 +41,8 @@ public interface SimulationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据地图和功能ID获取仿真GroupId
|
* 根据地图和功能ID获取仿真GroupId
|
||||||
* @param mapId 地图ID
|
*
|
||||||
|
* @param mapId 地图ID
|
||||||
* @param mapFunctionId 功能ID
|
* @param mapFunctionId 功能ID
|
||||||
* @return 仿真GroupId
|
* @return 仿真GroupId
|
||||||
*/
|
*/
|
||||||
@ -53,7 +51,8 @@ public interface SimulationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据地图和功能ID获取仿真GroupId返回仿真对象
|
* 根据地图和功能ID获取仿真GroupId返回仿真对象
|
||||||
* @param mapId 地图ID
|
*
|
||||||
|
* @param mapId 地图ID
|
||||||
* @param mapFunctionId 功能ID
|
* @param mapFunctionId 功能ID
|
||||||
* @return 仿真GroupId
|
* @return 仿真GroupId
|
||||||
*/
|
*/
|
||||||
@ -64,17 +63,15 @@ public interface SimulationService {
|
|||||||
*/
|
*/
|
||||||
void monitor(String simulationId, AccountVO user);
|
void monitor(String simulationId, AccountVO user);
|
||||||
|
|
||||||
Simulation createSimulationPojo(long mapId, MapFunctionVO mapFunctionVO, @NonNull LoginUserInfoVO loginUserInfoVO, Map<String, Boolean> createUserType);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后台创建仿真
|
* 后台创建仿真
|
||||||
*
|
*
|
||||||
* @param mapFunctionId mapFunctionId 功能ID
|
* @param mapFunctionId mapFunctionId 功能ID
|
||||||
* @param loginInfo 登录信息
|
* @param loginInfo 登录信息
|
||||||
* @param checkAuth 是否检查权限
|
* @param checkAuth 是否检查权限
|
||||||
* @return 仿真对象
|
* @return 仿真对象
|
||||||
*/
|
*/
|
||||||
Simulation createSimulationPojo(Long mapFunctionId, LoginUserInfoVO loginInfo, boolean checkAuth);
|
Simulation createSimulation(Long mapFunctionId, LoginUserInfoVO loginInfo, boolean checkAuth);
|
||||||
|
|
||||||
void loadDraftRunPlan(String simulationId, long draftRunPlanId);
|
void loadDraftRunPlan(String simulationId, long draftRunPlanId);
|
||||||
|
|
||||||
|
@ -80,19 +80,20 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String createSimulation(long mapId, MapFunctionVO mapFunctionVO, @NonNull LoginUserInfoVO loginUserInfoVO, Map<String, Boolean> createUserType) {
|
public String createSimulation(long mapId, SimulationWorkParamVO workParamVO, @NonNull LoginUserInfoVO loginUserInfoVO) {
|
||||||
return createSimulationPojo(mapId,mapFunctionVO, loginUserInfoVO, createUserType).getId();
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotTrue(workParamVO.containsRealDeviceItem(), "此途径创建的仿真不能连接真实设备");
|
||||||
|
return createSimulation(mapId, null, workParamVO, loginUserInfoVO, null).getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
//只获取所有与该功能相关的权限信息
|
//只获取所有与该功能相关的权限信息
|
||||||
private List<PermissionSubjectVO> filterUserPermission(List<PermissionSubjectVO> subjectVOList, MapFunctionVO functionVO, LoginUserInfoVO loginUserInfoVO){
|
private List<PermissionSubjectVO> filterUserPermission(List<PermissionSubjectVO> subjectVOList, MapFunctionVO functionVO, LoginUserInfoVO loginUserInfoVO) {
|
||||||
List<PermissionSubjectVO> newVoList = Lists.newArrayList();
|
List<PermissionSubjectVO> newVoList = Lists.newArrayList();
|
||||||
for (PermissionSubjectVO subjectVO : subjectVOList) {
|
for (PermissionSubjectVO subjectVO : subjectVOList) {
|
||||||
if(subjectVO.getStartTime().isAfter(LocalDateTime.now())){
|
if (subjectVO.getStartTime().isAfter(LocalDateTime.now())) {
|
||||||
log.info("权限主体id:[{}] 用户id:[{}] 开始时间:[{}]未到时间",subjectVO.getId(),subjectVO.getSubjectId(),subjectVO.getStartTime());
|
log.info("权限主体id:[{}] 用户id:[{}] 开始时间:[{}]未到时间", subjectVO.getId(), subjectVO.getSubjectId(), subjectVO.getStartTime());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(!CollectionUtils.isEmpty(subjectVO.getSystemAbilityList())){
|
if (!CollectionUtils.isEmpty(subjectVO.getSystemAbilityList())) {
|
||||||
/* if(Objects.equals(PermissionTypeEnum.PROJECT.getValue(),subjectVO.getPermissionType())){
|
/* if(Objects.equals(PermissionTypeEnum.PROJECT.getValue(),subjectVO.getPermissionType())){
|
||||||
if(Objects.equals(subjectVO.getPermissionProjectCode(),loginUserInfoVO.getProject().toLowerCase())){
|
if(Objects.equals(subjectVO.getPermissionProjectCode(),loginUserInfoVO.getProject().toLowerCase())){
|
||||||
newVoList.add(subjectVO);
|
newVoList.add(subjectVO);
|
||||||
@ -103,15 +104,15 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
newVoList.add(subjectVO);
|
newVoList.add(subjectVO);
|
||||||
}
|
}
|
||||||
}else{*/
|
}else{*/
|
||||||
for (PermissionSystemAbilityVO permissionSystemAbilityVO : subjectVO.getSystemAbilityList()) {
|
for (PermissionSystemAbilityVO permissionSystemAbilityVO : subjectVO.getSystemAbilityList()) {
|
||||||
if(Objects.equals(permissionSystemAbilityVO.getAbilityId(), functionVO.getId())) {
|
if (Objects.equals(permissionSystemAbilityVO.getAbilityId(), functionVO.getId())) {
|
||||||
newVoList.add(subjectVO);
|
newVoList.add(subjectVO);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
}else {
|
} else {
|
||||||
log.error("权限主体对应的功能是空 主体id:[{}],subjectId:[{}],subjectType:[{}]",subjectVO.getId(),subjectVO.getSubjectId(),subjectVO.getSubjectType());
|
log.error("权限主体对应的功能是空 主体id:[{}],subjectId:[{}],subjectType:[{}]", subjectVO.getId(), subjectVO.getSubjectId(), subjectVO.getSubjectType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return newVoList;
|
return newVoList;
|
||||||
@ -119,122 +120,71 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 检测用户对应的权限是否满足
|
* 检测用户对应的权限是否满足
|
||||||
|
*
|
||||||
* @param functionVO
|
* @param functionVO
|
||||||
* @param loginInfo
|
* @param loginInfo
|
||||||
|
|
||||||
*/
|
*/
|
||||||
private Map<String,Boolean> checkUserPermission(MapFunctionVO functionVO, LoginUserInfoVO loginInfo){
|
private Map<String, Boolean> checkUserPermission(MapFunctionVO functionVO, LoginUserInfoVO loginInfo) {
|
||||||
if(loginInfo.getAccountVO().isAdmin()){
|
if (loginInfo.getAccountVO().isAdmin()) {
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
LoginUserInfoVO newLoginUser = loginInfo;
|
LoginUserInfoVO newLoginUser = loginInfo;
|
||||||
if(loginInfo.getAccountVO().isThirdChildAccount()){
|
if (loginInfo.getAccountVO().isThirdChildAccount()) {
|
||||||
AccountVO user = this.iSysUserService.queryUserByAccountForMaster(loginInfo.getAccountVO().getParentAccount());
|
AccountVO user = this.iSysUserService.queryUserByAccountForMaster(loginInfo.getAccountVO().getParentAccount());
|
||||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(user),"未找到主账号相关权限");
|
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(user), "未找到主账号相关权限");
|
||||||
newLoginUser = new LoginUserInfoVO();
|
newLoginUser = new LoginUserInfoVO();
|
||||||
user.setCompanyId(loginInfo.getAccountVO().getCompanyId());
|
user.setCompanyId(loginInfo.getAccountVO().getCompanyId());
|
||||||
newLoginUser.setAccountVO(user);
|
newLoginUser.setAccountVO(user);
|
||||||
newLoginUser.setProjectInfo(loginInfo.getProjectInfo());
|
newLoginUser.setProjectInfo(loginInfo.getProjectInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PermissionSubjectVO> subjectVOList = this.subjectService.findPermissionWithMapIdAndUserInfo(functionVO.getMapId(),newLoginUser);
|
List<PermissionSubjectVO> subjectVOList = this.subjectService.findPermissionWithMapIdAndUserInfo(functionVO.getMapId(), newLoginUser);
|
||||||
|
|
||||||
List<PermissionSubjectVO> newVOLIst = this.filterUserPermission(subjectVOList,functionVO,newLoginUser);
|
List<PermissionSubjectVO> newVOLIst = this.filterUserPermission(subjectVOList, functionVO, newLoginUser);
|
||||||
if(CollectionUtils.isEmpty(newVOLIst)){
|
if (CollectionUtils.isEmpty(newVOLIst)) {
|
||||||
log.error("未找到对应的权限数据mapId[{}],functionId[{}],userId[{}]",functionVO.getMapId(),functionVO.getId(),newLoginUser.getAccountVO().getId());
|
log.error("未找到对应的权限数据mapId[{}],functionId[{}],userId[{}]", functionVO.getMapId(), functionVO.getId(), newLoginUser.getAccountVO().getId());
|
||||||
BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertNotTrue(true,"未找到该权限");
|
BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertNotTrue(true, "未找到该权限");
|
||||||
}
|
}
|
||||||
Map<String,Boolean> resultMap2 = Maps.newHashMap();
|
Map<String, Boolean> resultMap2 = Maps.newHashMap();
|
||||||
Map<String,List<PermissionSubjectVO>> subjectMapList = newVOLIst.stream().collect(Collectors.groupingBy(PermissionSubjectVO::getSubjectType));
|
Map<String, List<PermissionSubjectVO>> subjectMapList = newVOLIst.stream().collect(Collectors.groupingBy(PermissionSubjectVO::getSubjectType));
|
||||||
for (PermissionSubjectTypeEnum st : PermissionSubjectTypeEnum.SORT_ENUM) {
|
for (PermissionSubjectTypeEnum st : PermissionSubjectTypeEnum.SORT_ENUM) {
|
||||||
List<PermissionSubjectVO> tmpSubjectVOList = subjectMapList.get(st.name());
|
List<PermissionSubjectVO> tmpSubjectVOList = subjectMapList.get(st.name());
|
||||||
if(CollectionUtils.isEmpty(tmpSubjectVOList)){
|
if (CollectionUtils.isEmpty(tmpSubjectVOList)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
List<PermissionSubjectVO> canUseSubjectList = this.findCanUsedPermission(tmpSubjectVOList,functionVO,loginInfo);
|
List<PermissionSubjectVO> canUseSubjectList = this.findCanUsedPermission(tmpSubjectVOList, functionVO, loginInfo);
|
||||||
BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertNotTrue(CollectionUtils.isEmpty(canUseSubjectList),"该权限过期");
|
BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertNotTrue(CollectionUtils.isEmpty(canUseSubjectList), "该权限过期");
|
||||||
for (PermissionSubjectVO subjectVO : canUseSubjectList) {
|
for (PermissionSubjectVO subjectVO : canUseSubjectList) {
|
||||||
String key = String.format("%s-%s",st.name(),subjectVO.getId());
|
String key = String.format("%s-%s", st.name(), subjectVO.getId());
|
||||||
List<Simulation> findSimList = this.simulationManager.finder(key);
|
List<Simulation> findSimList = this.simulationManager.finder(key);
|
||||||
resultMap2.put(key,false);
|
resultMap2.put(key, false);
|
||||||
if(findSimList.size() +1 <= subjectVO.getAmount()){
|
if (findSimList.size() + 1 <= subjectVO.getAmount()) {
|
||||||
resultMap2.put(key,true);
|
resultMap2.put(key, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(resultMap2.values().stream().anyMatch(d->Objects.equals(true,d))){
|
if (resultMap2.values().stream().anyMatch(d -> Objects.equals(true, d))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertNotTrue(resultMap2.values().stream().allMatch(d->Objects.equals(false,d)),"仿真生成数量过载");
|
BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertNotTrue(resultMap2.values().stream().allMatch(d -> Objects.equals(false, d)), "仿真生成数量过载");
|
||||||
return resultMap2;
|
return resultMap2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<PermissionSubjectVO> findCanUsedPermission(List<PermissionSubjectVO> newVOLIst, MapFunctionVO functionVO, LoginUserInfoVO loginInfo){
|
private List<PermissionSubjectVO> findCanUsedPermission(List<PermissionSubjectVO> newVOLIst, MapFunctionVO functionVO, LoginUserInfoVO loginInfo) {
|
||||||
List<PermissionSubjectVO> canUseSubjectList = newVOLIst.stream().filter(d->Objects.equals(true,d.getForever())).collect(Collectors.toList());
|
List<PermissionSubjectVO> canUseSubjectList = newVOLIst.stream().filter(d -> Objects.equals(true, d.getForever())).collect(Collectors.toList());
|
||||||
if(CollectionUtils.isEmpty(canUseSubjectList)){
|
if (CollectionUtils.isEmpty(canUseSubjectList)) {
|
||||||
List<Long> timeOverIdList = newVOLIst.stream().filter(d->Objects.nonNull(d.getEndTime()) && d.getEndTime().isAfter(LocalDateTime.now()))
|
List<Long> timeOverIdList = newVOLIst.stream().filter(d -> Objects.nonNull(d.getEndTime()) && d.getEndTime().isAfter(LocalDateTime.now()))
|
||||||
.map(d->d.getId())
|
.map(d -> d.getId())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if(CollectionUtils.isEmpty(timeOverIdList)){
|
if (CollectionUtils.isEmpty(timeOverIdList)) {
|
||||||
log.error("mapId[{}],functionId[{}] userId[{}] 权限过期",functionVO.getMapId(),functionVO.getId(),loginInfo.getAccountVO().getId());
|
log.error("mapId[{}],functionId[{}] userId[{}] 权限过期", functionVO.getMapId(), functionVO.getId(), loginInfo.getAccountVO().getId());
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
canUseSubjectList = newVOLIst.stream().filter(d->timeOverIdList.contains(d.getId())).collect(Collectors.toList());
|
canUseSubjectList = newVOLIst.stream().filter(d -> timeOverIdList.contains(d.getId())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
return canUseSubjectList;
|
return canUseSubjectList;
|
||||||
}
|
}
|
||||||
private boolean checkUserPermissionDetail(List<PermissionSubjectVO> newVOLIst, MapFunctionVO functionVO, LoginUserInfoVO loginInfo){
|
|
||||||
boolean isForever = newVOLIst.stream().anyMatch(d->Objects.equals(true,d.getForever()));
|
|
||||||
if(Objects.equals(false,isForever)){
|
|
||||||
boolean timeOver = newVOLIst.stream().allMatch(d->Objects.nonNull(d.getEndTime()) && d.getEndTime().isBefore(LocalDateTime.now()));
|
|
||||||
if(timeOver){
|
|
||||||
log.error("mapId[{}],functionId[{}] userId[{}] 权限过期",functionVO.getMapId(),functionVO.getId(),loginInfo.getAccountVO().getId());
|
|
||||||
// BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertNotTrue(timeOver,"该权限过期");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String checkUserExistSimulation(MapFunctionVO mapFunctionVO, AccountVO user){
|
|
||||||
List<String> userExistGroup = this.groupSimulationService.getUserRunningSimulationGroups(user);
|
|
||||||
if(!CollectionUtils.isEmpty(userExistGroup)){
|
|
||||||
Optional<Simulation> optional = userExistGroup.stream()
|
|
||||||
.map(d->this.groupSimulationService.getSimulationByGroup(d))
|
|
||||||
.filter(d->Objects.equals(d.getMapFunctionId(), mapFunctionVO.getId())).findAny();
|
|
||||||
if(optional.isPresent()){
|
|
||||||
BusinessExceptionAssertEnum.OPERATION_REPEAT.assertNotTrue(mapFunctionVO.getParamVO().getDomConfig().isHasExam(),"考试只能单独用户操作");
|
|
||||||
Simulation simulation = optional.get();
|
|
||||||
return simulation.getId();
|
|
||||||
}
|
|
||||||
BusinessExceptionAssertEnum.OPERATION_REPEAT.assertNotTrue(userExistGroup.size() >= 1,"用户重复创建仿真");
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public String createSimulation(Long mapFunctionId, LoginUserInfoVO loginInfo) {
|
|
||||||
MapFunctionVO mapFunctionVO = rtsMapFunctionService.get(mapFunctionId);
|
|
||||||
/* String group = this.checkUserExistSimulation(mapFunctionVO,loginInfo.getAccountVO());
|
|
||||||
if(StringUtils.isNotEmpty(group)){
|
|
||||||
return group;
|
|
||||||
}*/
|
|
||||||
Long mapId = mapFunctionVO.getMapId();
|
|
||||||
Map<String,Boolean> createUserType = this.checkUserPermission(mapFunctionVO,loginInfo);
|
|
||||||
SimulationWorkParamVO workParamVO = mapFunctionVO.getParamVO();
|
|
||||||
|
|
||||||
if (workParamVO.containsRealDeviceItem()) {
|
|
||||||
//有实体设备加载项的地图功能(实训室)同时只能存在一个
|
|
||||||
Stream<Simulation> stream = simulationManager.getSimulationStream(Simulation.class);
|
|
||||||
Optional<Simulation> oldSimulationOptional = stream
|
|
||||||
.filter(sim -> Objects.equals(sim.getMapFunctionId(), mapFunctionId))
|
|
||||||
.findFirst();
|
|
||||||
oldSimulationOptional.ifPresent(simulation -> simulationManager.destroy(simulation.getId()));
|
|
||||||
}
|
|
||||||
|
|
||||||
return createSimulation(mapId, mapFunctionVO, loginInfo,createUserType);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addItems(@NonNull String simulationId, Map<SimulationWorkParamVO.Item, String> itemMap) {
|
public void addItems(@NonNull String simulationId, Map<SimulationWorkParamVO.Item, String> itemMap) {
|
||||||
@ -285,7 +235,7 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
/**
|
/**
|
||||||
* 根据地图、功能ID获取仿真ID
|
* 根据地图、功能ID获取仿真ID
|
||||||
*
|
*
|
||||||
* @param mapId 地图ID
|
* @param mapId 地图ID
|
||||||
* @param mapFunctionId 功能ID
|
* @param mapFunctionId 功能ID
|
||||||
* @return 仿真ID
|
* @return 仿真ID
|
||||||
*/
|
*/
|
||||||
@ -316,9 +266,8 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
simulationWorkServiceManager.addSimulationUser(simulation, simulationUser);
|
simulationWorkServiceManager.addSimulationUser(simulation, simulationUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
private Simulation createSimulation(long mapId, MapFunctionVO mapFunctionVO, @NonNull SimulationWorkParamVO workParamVO,
|
||||||
public Simulation createSimulationPojo(long mapId, MapFunctionVO mapFunctionVO, @NonNull LoginUserInfoVO loginUserInfoVO, Map<String, Boolean> createUserType) {
|
@NonNull LoginUserInfoVO loginUserInfoVO, Map<String, Boolean> createUserType) {
|
||||||
SimulationWorkParamVO workParamVO = mapFunctionVO.getParamVO();
|
|
||||||
//获取仿真工作服务
|
//获取仿真工作服务
|
||||||
SimulationWorkService initService = simulationWorkServiceManager.getWorkService(workParamVO.getType());
|
SimulationWorkService initService = simulationWorkServiceManager.getWorkService(workParamVO.getType());
|
||||||
|
|
||||||
@ -359,12 +308,12 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Simulation createSimulationPojo(Long mapFunctionId, LoginUserInfoVO loginInfo, boolean checkAuth) {
|
public Simulation createSimulation(Long mapFunctionId, LoginUserInfoVO loginInfo, boolean checkAuth) {
|
||||||
MapFunctionVO mapFunctionVO = rtsMapFunctionService.get(mapFunctionId);
|
MapFunctionVO mapFunctionVO = rtsMapFunctionService.get(mapFunctionId);
|
||||||
Long mapId = mapFunctionVO.getMapId();
|
Long mapId = mapFunctionVO.getMapId();
|
||||||
Map<String,Boolean> createUserType = Maps.newHashMap();
|
Map<String, Boolean> createUserType = Maps.newHashMap();
|
||||||
if (checkAuth) {
|
if (checkAuth) {
|
||||||
createUserType = this.checkUserPermission(mapFunctionVO,loginInfo);
|
createUserType = this.checkUserPermission(mapFunctionVO, loginInfo);
|
||||||
}
|
}
|
||||||
SimulationWorkParamVO workParamVO = mapFunctionVO.getParamVO();
|
SimulationWorkParamVO workParamVO = mapFunctionVO.getParamVO();
|
||||||
|
|
||||||
@ -377,7 +326,7 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
oldSimulationOptional.ifPresent(simulation -> simulationManager.destroy(simulation.getId()));
|
oldSimulationOptional.ifPresent(simulation -> simulationManager.destroy(simulation.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return createSimulationPojo(mapId, mapFunctionVO, loginInfo, createUserType);
|
return createSimulation(mapId, mapFunctionVO, mapFunctionVO.getParamVO(), loginInfo, createUserType);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -441,7 +441,7 @@ public class Route extends MapNamedElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isApproachLock() {
|
public boolean isApproachLock() {
|
||||||
return this.isOpenMain() && this.getStart().isApproachLock();
|
return /*this.isOpenMain() &&*/ this.getStart().isApproachLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAnySectionOccupied() {
|
public boolean isAnySectionOccupied() {
|
||||||
|
@ -1,80 +1,85 @@
|
|||||||
package club.joylink.rtss.util;
|
package club.joylink.rtss.util;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.JavaType;
|
import com.fasterxml.jackson.databind.JavaType;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.hubspot.jackson.datatype.protobuf.ProtobufModule;
|
||||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JsonUtils {
|
public class JsonUtils {
|
||||||
|
|
||||||
public static ObjectMapper objectMapper;
|
public static ObjectMapper objectMapper;
|
||||||
|
|
||||||
public static ObjectMapper objectNullableMapper;
|
public static ObjectMapper objectNullableMapper;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Jackson2ObjectMapperBuilder builder = Jackson2ObjectMapperBuilder.json();
|
Jackson2ObjectMapperBuilder builder = Jackson2ObjectMapperBuilder.json();
|
||||||
builder
|
builder
|
||||||
.simpleDateFormat("yyyy-MM-dd HH:mm:ss") // 格式化日期
|
.simpleDateFormat("yyyy-MM-dd HH:mm:ss") // 格式化日期
|
||||||
.timeZone("GMT+8") // 设置时区
|
.timeZone("GMT+8") // 设置时区
|
||||||
.failOnUnknownProperties(false) // 未知属性不抛出异常
|
.failOnUnknownProperties(false) // 未知属性不抛出异常
|
||||||
.serializationInclusion(JsonInclude.Include.NON_NULL) // 忽略null属性
|
.serializationInclusion(JsonInclude.Include.NON_NULL) // 忽略null属性
|
||||||
;
|
.serializationInclusion(Include.NON_EMPTY)
|
||||||
objectMapper = builder.build();
|
.modulesToInstall(ProtobufModule.class)
|
||||||
Jackson2ObjectMapperBuilder nullableBuilder = Jackson2ObjectMapperBuilder.json();
|
;
|
||||||
nullableBuilder
|
objectMapper = builder.build();
|
||||||
.simpleDateFormat("yyyy-MM-dd HH:mm:ss") // 格式化日期
|
Jackson2ObjectMapperBuilder nullableBuilder = Jackson2ObjectMapperBuilder.json();
|
||||||
.timeZone("GMT+8") // 设置时区
|
nullableBuilder
|
||||||
.failOnUnknownProperties(false) // 未知属性不抛出异常
|
.simpleDateFormat("yyyy-MM-dd HH:mm:ss") // 格式化日期
|
||||||
;
|
.timeZone("GMT+8") // 设置时区
|
||||||
objectNullableMapper = nullableBuilder.build();
|
.failOnUnknownProperties(false) // 未知属性不抛出异常
|
||||||
|
.modulesToInstall(ProtobufModule.class)
|
||||||
|
;
|
||||||
|
objectNullableMapper = nullableBuilder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String writeValueNullableFieldAsString(Object value) {
|
||||||
|
try {
|
||||||
|
return objectNullableMapper.writeValueAsString(value);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
throw new RuntimeException("Json write value as String exception", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static String writeValueNullableFieldAsString(Object value) {
|
public static String writeValueAsString(Object value) {
|
||||||
try {
|
try {
|
||||||
return objectNullableMapper.writeValueAsString(value);
|
return objectMapper.writeValueAsString(value);
|
||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
throw new RuntimeException("Json write value as String exception", e);
|
throw new RuntimeException("Json write value as String exception", e);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static String writeValueAsString(Object value) {
|
public static <T> T read(String text, Class<T> valueType) {
|
||||||
try {
|
try {
|
||||||
return objectMapper.writeValueAsString(value);
|
return objectMapper.readValue(text, valueType);
|
||||||
} catch (JsonProcessingException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException("Json write value as String exception", e);
|
throw new RuntimeException("Json read String to Object exception", e);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static <T> T read(String text, Class<T> valueType) {
|
public static <T> T read(String text, JavaType valueType) {
|
||||||
try {
|
try {
|
||||||
return objectMapper.readValue(text, valueType);
|
return objectMapper.readValue(text, valueType);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException("Json read String to Object exception", e);
|
throw new RuntimeException("Json read String to Object exception", e);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static <T> T read(String text, JavaType valueType) {
|
public static <T> T readCollection(String text, Class<?> collectionClass, Class<?>... elementClasses) {
|
||||||
try {
|
try {
|
||||||
return objectMapper.readValue(text, valueType);
|
JavaType javaType = objectMapper.getTypeFactory().constructParametricType(collectionClass, elementClasses);
|
||||||
} catch (IOException e) {
|
return objectMapper.readValue(text, javaType);
|
||||||
throw new RuntimeException("Json read String to Object exception", e);
|
} catch (IOException e) {
|
||||||
}
|
throw new RuntimeException("Json read String to Object Collection exception", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static <T> T readCollection(String text, Class<?> collectionClass, Class<?>... elementClasses) {
|
public static JavaType getCollectionType(Class<?> collectionClass, Class<?>... elementClasses) {
|
||||||
try {
|
return objectMapper.getTypeFactory().constructParametricType(collectionClass, elementClasses);
|
||||||
JavaType javaType = objectMapper.getTypeFactory().constructParametricType(collectionClass, elementClasses);
|
}
|
||||||
return objectMapper.readValue(text, javaType);
|
|
||||||
} catch (IOException e) {
|
|
||||||
throw new RuntimeException("Json read String to Object Collection exception", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static JavaType getCollectionType(Class<?> collectionClass, Class<?>... elementClasses) {
|
|
||||||
return objectMapper.getTypeFactory().constructParametricType(collectionClass, elementClasses);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ public class ProjectDeviceVO {
|
|||||||
case ProjectCode.THAILAND_SANDBOX: {
|
case ProjectCode.THAILAND_SANDBOX: {
|
||||||
return thailandSandboxDeviceConfigConvert(voList);
|
return thailandSandboxDeviceConfigConvert(voList);
|
||||||
}
|
}
|
||||||
case "GXSD": {
|
case "gxsd": {
|
||||||
return gxsdDeviceConfigConvert(voList);
|
return gxsdDeviceConfigConvert(voList);
|
||||||
}
|
}
|
||||||
case ProjectCode.CDGXY: {
|
case ProjectCode.CDGXY: {
|
||||||
|
1169
src/main/java/club/joylink/rtss/vo/common/ModifyInfo.java
Normal file
1169
src/main/java/club/joylink/rtss/vo/common/ModifyInfo.java
Normal file
File diff suppressed because it is too large
Load Diff
572
src/main/java/club/joylink/rtss/vo/common/PageQuery.java
Normal file
572
src/main/java/club/joylink/rtss/vo/common/PageQuery.java
Normal file
@ -0,0 +1,572 @@
|
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: page_query.proto
|
||||||
|
|
||||||
|
package club.joylink.rtss.vo.common;
|
||||||
|
|
||||||
|
public final class PageQuery {
|
||||||
|
private PageQuery() {}
|
||||||
|
public static void registerAllExtensions(
|
||||||
|
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerAllExtensions(
|
||||||
|
com.google.protobuf.ExtensionRegistry registry) {
|
||||||
|
registerAllExtensions(
|
||||||
|
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||||
|
}
|
||||||
|
public interface PageQueryVOOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:common.PageQueryVO)
|
||||||
|
com.google.protobuf.MessageOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>int32 page = 1;</code>
|
||||||
|
* @return The page.
|
||||||
|
*/
|
||||||
|
int getPage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>int32 size = 2;</code>
|
||||||
|
* @return The size.
|
||||||
|
*/
|
||||||
|
int getSize();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
*分页查询的公共参数
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* Protobuf type {@code common.PageQueryVO}
|
||||||
|
*/
|
||||||
|
public static final class PageQueryVO extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3 implements
|
||||||
|
// @@protoc_insertion_point(message_implements:common.PageQueryVO)
|
||||||
|
PageQueryVOOrBuilder {
|
||||||
|
private static final long serialVersionUID = 0L;
|
||||||
|
// Use PageQueryVO.newBuilder() to construct.
|
||||||
|
private PageQueryVO(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||||
|
super(builder);
|
||||||
|
}
|
||||||
|
private PageQueryVO() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
@SuppressWarnings({"unused"})
|
||||||
|
protected java.lang.Object newInstance(
|
||||||
|
UnusedPrivateParameter unused) {
|
||||||
|
return new PageQueryVO();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return club.joylink.rtss.vo.common.PageQuery.internal_static_common_PageQueryVO_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return club.joylink.rtss.vo.common.PageQuery.internal_static_common_PageQueryVO_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
club.joylink.rtss.vo.common.PageQuery.PageQueryVO.class, club.joylink.rtss.vo.common.PageQuery.PageQueryVO.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int PAGE_FIELD_NUMBER = 1;
|
||||||
|
private int page_ = 0;
|
||||||
|
/**
|
||||||
|
* <code>int32 page = 1;</code>
|
||||||
|
* @return The page.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getPage() {
|
||||||
|
return page_;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int SIZE_FIELD_NUMBER = 2;
|
||||||
|
private int size_ = 0;
|
||||||
|
/**
|
||||||
|
* <code>int32 size = 2;</code>
|
||||||
|
* @return The size.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSize() {
|
||||||
|
return size_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
memoizedIsInitialized = 1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (page_ != 0) {
|
||||||
|
output.writeInt32(1, page_);
|
||||||
|
}
|
||||||
|
if (size_ != 0) {
|
||||||
|
output.writeInt32(2, size_);
|
||||||
|
}
|
||||||
|
getUnknownFields().writeTo(output);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSerializedSize() {
|
||||||
|
int size = memoizedSize;
|
||||||
|
if (size != -1) return size;
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
if (page_ != 0) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(1, page_);
|
||||||
|
}
|
||||||
|
if (size_ != 0) {
|
||||||
|
size += com.google.protobuf.CodedOutputStream
|
||||||
|
.computeInt32Size(2, size_);
|
||||||
|
}
|
||||||
|
size += getUnknownFields().getSerializedSize();
|
||||||
|
memoizedSize = size;
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public boolean equals(final java.lang.Object obj) {
|
||||||
|
if (obj == this) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!(obj instanceof club.joylink.rtss.vo.common.PageQuery.PageQueryVO)) {
|
||||||
|
return super.equals(obj);
|
||||||
|
}
|
||||||
|
club.joylink.rtss.vo.common.PageQuery.PageQueryVO other = (club.joylink.rtss.vo.common.PageQuery.PageQueryVO) obj;
|
||||||
|
|
||||||
|
if (getPage()
|
||||||
|
!= other.getPage()) return false;
|
||||||
|
if (getSize()
|
||||||
|
!= other.getSize()) return false;
|
||||||
|
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public int hashCode() {
|
||||||
|
if (memoizedHashCode != 0) {
|
||||||
|
return memoizedHashCode;
|
||||||
|
}
|
||||||
|
int hash = 41;
|
||||||
|
hash = (19 * hash) + getDescriptor().hashCode();
|
||||||
|
hash = (37 * hash) + PAGE_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getPage();
|
||||||
|
hash = (37 * hash) + SIZE_FIELD_NUMBER;
|
||||||
|
hash = (53 * hash) + getSize();
|
||||||
|
hash = (29 * hash) + getUnknownFields().hashCode();
|
||||||
|
memoizedHashCode = hash;
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(
|
||||||
|
java.nio.ByteBuffer data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(
|
||||||
|
java.nio.ByteBuffer data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(
|
||||||
|
com.google.protobuf.ByteString data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(
|
||||||
|
com.google.protobuf.ByteString data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(byte[] data)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(
|
||||||
|
byte[] data,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseDelimitedFrom(
|
||||||
|
java.io.InputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input);
|
||||||
|
}
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO parseFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return com.google.protobuf.GeneratedMessageV3
|
||||||
|
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder newBuilderForType() { return newBuilder(); }
|
||||||
|
public static Builder newBuilder() {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder();
|
||||||
|
}
|
||||||
|
public static Builder newBuilder(club.joylink.rtss.vo.common.PageQuery.PageQueryVO prototype) {
|
||||||
|
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder toBuilder() {
|
||||||
|
return this == DEFAULT_INSTANCE
|
||||||
|
? new Builder() : new Builder().mergeFrom(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected Builder newBuilderForType(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
Builder builder = new Builder(parent);
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
*分页查询的公共参数
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* Protobuf type {@code common.PageQueryVO}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:common.PageQueryVO)
|
||||||
|
club.joylink.rtss.vo.common.PageQuery.PageQueryVOOrBuilder {
|
||||||
|
public static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return club.joylink.rtss.vo.common.PageQuery.internal_static_common_PageQueryVO_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internalGetFieldAccessorTable() {
|
||||||
|
return club.joylink.rtss.vo.common.PageQuery.internal_static_common_PageQueryVO_fieldAccessorTable
|
||||||
|
.ensureFieldAccessorsInitialized(
|
||||||
|
club.joylink.rtss.vo.common.PageQuery.PageQueryVO.class, club.joylink.rtss.vo.common.PageQuery.PageQueryVO.Builder.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Construct using club.joylink.rtss.vo.common.PageQuery.PageQueryVO.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private Builder(
|
||||||
|
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||||
|
super(parent);
|
||||||
|
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
bitField0_ = 0;
|
||||||
|
page_ = 0;
|
||||||
|
size_ = 0;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Descriptors.Descriptor
|
||||||
|
getDescriptorForType() {
|
||||||
|
return club.joylink.rtss.vo.common.PageQuery.internal_static_common_PageQueryVO_descriptor;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public club.joylink.rtss.vo.common.PageQuery.PageQueryVO getDefaultInstanceForType() {
|
||||||
|
return club.joylink.rtss.vo.common.PageQuery.PageQueryVO.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public club.joylink.rtss.vo.common.PageQuery.PageQueryVO build() {
|
||||||
|
club.joylink.rtss.vo.common.PageQuery.PageQueryVO result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public club.joylink.rtss.vo.common.PageQuery.PageQueryVO buildPartial() {
|
||||||
|
club.joylink.rtss.vo.common.PageQuery.PageQueryVO result = new club.joylink.rtss.vo.common.PageQuery.PageQueryVO(this);
|
||||||
|
if (bitField0_ != 0) { buildPartial0(result); }
|
||||||
|
onBuilt();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buildPartial0(club.joylink.rtss.vo.common.PageQuery.PageQueryVO result) {
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
if (((from_bitField0_ & 0x00000001) != 0)) {
|
||||||
|
result.page_ = page_;
|
||||||
|
}
|
||||||
|
if (((from_bitField0_ & 0x00000002) != 0)) {
|
||||||
|
result.size_ = size_;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||||
|
if (other instanceof club.joylink.rtss.vo.common.PageQuery.PageQueryVO) {
|
||||||
|
return mergeFrom((club.joylink.rtss.vo.common.PageQuery.PageQueryVO)other);
|
||||||
|
} else {
|
||||||
|
super.mergeFrom(other);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(club.joylink.rtss.vo.common.PageQuery.PageQueryVO other) {
|
||||||
|
if (other == club.joylink.rtss.vo.common.PageQuery.PageQueryVO.getDefaultInstance()) return this;
|
||||||
|
if (other.getPage() != 0) {
|
||||||
|
setPage(other.getPage());
|
||||||
|
}
|
||||||
|
if (other.getSize() != 0) {
|
||||||
|
setSize(other.getSize());
|
||||||
|
}
|
||||||
|
this.mergeUnknownFields(other.getUnknownFields());
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public Builder mergeFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws java.io.IOException {
|
||||||
|
if (extensionRegistry == null) {
|
||||||
|
throw new java.lang.NullPointerException();
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
boolean done = false;
|
||||||
|
while (!done) {
|
||||||
|
int tag = input.readTag();
|
||||||
|
switch (tag) {
|
||||||
|
case 0:
|
||||||
|
done = true;
|
||||||
|
break;
|
||||||
|
case 8: {
|
||||||
|
page_ = input.readInt32();
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
break;
|
||||||
|
} // case 8
|
||||||
|
case 16: {
|
||||||
|
size_ = input.readInt32();
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
break;
|
||||||
|
} // case 16
|
||||||
|
default: {
|
||||||
|
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
|
||||||
|
done = true; // was an endgroup tag
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
} // default:
|
||||||
|
} // switch (tag)
|
||||||
|
} // while (!done)
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.unwrapIOException();
|
||||||
|
} finally {
|
||||||
|
onChanged();
|
||||||
|
} // finally
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private int page_ ;
|
||||||
|
/**
|
||||||
|
* <code>int32 page = 1;</code>
|
||||||
|
* @return The page.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getPage() {
|
||||||
|
return page_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>int32 page = 1;</code>
|
||||||
|
* @param value The page to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setPage(int value) {
|
||||||
|
|
||||||
|
page_ = value;
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>int32 page = 1;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearPage() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
page_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int size_ ;
|
||||||
|
/**
|
||||||
|
* <code>int32 size = 2;</code>
|
||||||
|
* @return The size.
|
||||||
|
*/
|
||||||
|
@java.lang.Override
|
||||||
|
public int getSize() {
|
||||||
|
return size_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>int32 size = 2;</code>
|
||||||
|
* @param value The size to set.
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder setSize(int value) {
|
||||||
|
|
||||||
|
size_ = value;
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>int32 size = 2;</code>
|
||||||
|
* @return This builder for chaining.
|
||||||
|
*/
|
||||||
|
public Builder clearSize() {
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
size_ = 0;
|
||||||
|
onChanged();
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder setUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.setUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public final Builder mergeUnknownFields(
|
||||||
|
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||||
|
return super.mergeUnknownFields(unknownFields);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:common.PageQueryVO)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:common.PageQueryVO)
|
||||||
|
private static final club.joylink.rtss.vo.common.PageQuery.PageQueryVO DEFAULT_INSTANCE;
|
||||||
|
static {
|
||||||
|
DEFAULT_INSTANCE = new club.joylink.rtss.vo.common.PageQuery.PageQueryVO();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static club.joylink.rtss.vo.common.PageQuery.PageQueryVO getDefaultInstance() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final com.google.protobuf.Parser<PageQueryVO>
|
||||||
|
PARSER = new com.google.protobuf.AbstractParser<PageQueryVO>() {
|
||||||
|
@java.lang.Override
|
||||||
|
public PageQueryVO parsePartialFrom(
|
||||||
|
com.google.protobuf.CodedInputStream input,
|
||||||
|
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||||
|
Builder builder = newBuilder();
|
||||||
|
try {
|
||||||
|
builder.mergeFrom(input, extensionRegistry);
|
||||||
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(builder.buildPartial());
|
||||||
|
} catch (com.google.protobuf.UninitializedMessageException e) {
|
||||||
|
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new com.google.protobuf.InvalidProtocolBufferException(e)
|
||||||
|
.setUnfinishedMessage(builder.buildPartial());
|
||||||
|
}
|
||||||
|
return builder.buildPartial();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public static com.google.protobuf.Parser<PageQueryVO> parser() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public com.google.protobuf.Parser<PageQueryVO> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public club.joylink.rtss.vo.common.PageQuery.PageQueryVO getDefaultInstanceForType() {
|
||||||
|
return DEFAULT_INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final com.google.protobuf.Descriptors.Descriptor
|
||||||
|
internal_static_common_PageQueryVO_descriptor;
|
||||||
|
private static final
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||||
|
internal_static_common_PageQueryVO_fieldAccessorTable;
|
||||||
|
|
||||||
|
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||||
|
getDescriptor() {
|
||||||
|
return descriptor;
|
||||||
|
}
|
||||||
|
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||||
|
descriptor;
|
||||||
|
static {
|
||||||
|
java.lang.String[] descriptorData = {
|
||||||
|
"\n\020page_query.proto\022\006common\")\n\013PageQueryV" +
|
||||||
|
"O\022\014\n\004page\030\001 \001(\005\022\014\n\004size\030\002 \001(\005B\035\n\033club.jo" +
|
||||||
|
"ylink.rtss.vo.commonb\006proto3"
|
||||||
|
};
|
||||||
|
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||||
|
.internalBuildGeneratedFileFrom(descriptorData,
|
||||||
|
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||||
|
});
|
||||||
|
internal_static_common_PageQueryVO_descriptor =
|
||||||
|
getDescriptor().getMessageTypes().get(0);
|
||||||
|
internal_static_common_PageQueryVO_fieldAccessorTable = new
|
||||||
|
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||||
|
internal_static_common_PageQueryVO_descriptor,
|
||||||
|
new java.lang.String[] { "Page", "Size", });
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(outer_class_scope)
|
||||||
|
}
|
5653
src/main/java/club/joylink/rtss/vo/race/RaceModule.java
Normal file
5653
src/main/java/club/joylink/rtss/vo/race/RaceModule.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,12 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RaceModuleQueryVO extends PageQueryVO {
|
||||||
|
|
||||||
|
private String paperName;
|
||||||
|
private String code;
|
||||||
|
private Long paperId;
|
||||||
|
}
|
6949
src/main/java/club/joylink/rtss/vo/race/RacePaper.java
Normal file
6949
src/main/java/club/joylink/rtss/vo/race/RacePaper.java
Normal file
File diff suppressed because it is too large
Load Diff
23
src/main/java/club/joylink/rtss/vo/race/RacePaperPageVO.java
Normal file
23
src/main/java/club/joylink/rtss/vo/race/RacePaperPageVO.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RacePaperPageVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String name;
|
||||||
|
private String desc;
|
||||||
|
private Boolean supportCopy;
|
||||||
|
private Long seasonId;
|
||||||
|
private String seasonName;
|
||||||
|
private Long creatorId;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private Long updaterId;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
private String creatorName;
|
||||||
|
private String updaterName;
|
||||||
|
private byte[] configs;
|
||||||
|
private String group;
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeason.Group;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RacePaperQueryVO extends PageQueryVO {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GZ, ZZ
|
||||||
|
*/
|
||||||
|
private String group;
|
||||||
|
|
||||||
|
private Long seasonId;
|
||||||
|
private String seasonName;
|
||||||
|
}
|
18
src/main/java/club/joylink/rtss/vo/race/RaceRuleListVO.java
Normal file
18
src/main/java/club/joylink/rtss/vo/race/RaceRuleListVO.java
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RaceRuleListVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String name;
|
||||||
|
private Long creatorId;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private Long updaterId;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
private String creatorName;
|
||||||
|
private String updaterName;
|
||||||
|
private byte[] rule;
|
||||||
|
}
|
5662
src/main/java/club/joylink/rtss/vo/race/RaceSceneOuterClass.java
Normal file
5662
src/main/java/club/joylink/rtss/vo/race/RaceSceneOuterClass.java
Normal file
File diff suppressed because it is too large
Load Diff
21
src/main/java/club/joylink/rtss/vo/race/RaceScenePageVO.java
Normal file
21
src/main/java/club/joylink/rtss/vo/race/RaceScenePageVO.java
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RaceScenePageVO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String name;
|
||||||
|
private String type;
|
||||||
|
private Long mapId;
|
||||||
|
private String mapName;
|
||||||
|
private Long creatorId;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private Long updaterId;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
private String creatorName;
|
||||||
|
private String updaterName;
|
||||||
|
private byte[] proto;
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceScene.Type;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RaceSceneQueryVO extends PageQueryVO {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private Type type;
|
||||||
|
}
|
3731
src/main/java/club/joylink/rtss/vo/race/RaceScoringRule.java
Normal file
3731
src/main/java/club/joylink/rtss/vo/race/RaceScoringRule.java
Normal file
File diff suppressed because it is too large
Load Diff
2536
src/main/java/club/joylink/rtss/vo/race/RaceSeasonOuterClass.java
Normal file
2536
src/main/java/club/joylink/rtss/vo/race/RaceSeasonOuterClass.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,13 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeason.Group;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RaceSeasonQueryVO extends PageQueryVO {
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
private String term;
|
||||||
|
private Group group;
|
||||||
|
}
|
10671
src/main/java/club/joylink/rtss/vo/race/RaceTask.java
Normal file
10671
src/main/java/club/joylink/rtss/vo/race/RaceTask.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class RaceTaskDetailDTO {
|
||||||
|
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String name;
|
||||||
|
private String desc;
|
||||||
|
private String content;
|
||||||
|
private String standards;
|
||||||
|
private Long sceneId;
|
||||||
|
private String sceneName;
|
||||||
|
private Long ruleId;
|
||||||
|
private String ruleName;
|
||||||
|
private Long parentId;
|
||||||
|
private Long creatorId;
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
private Long updaterId;
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
private String creatorName;
|
||||||
|
private String updaterName;
|
||||||
|
}
|
24
src/main/java/club/joylink/rtss/vo/race/RaceTaskTreeVO.java
Normal file
24
src/main/java/club/joylink/rtss/vo/race/RaceTaskTreeVO.java
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.entity.racetr.RacetrTask;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class RaceTaskTreeVO {
|
||||||
|
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
private String name;
|
||||||
|
private Long parentId;
|
||||||
|
private List<RaceTaskTreeVO> children;
|
||||||
|
|
||||||
|
public RaceTaskTreeVO(RacetrTask task) {
|
||||||
|
this.id = task.getId();
|
||||||
|
this.name = task.getName();
|
||||||
|
this.parentId = task.getParentId();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
11
src/main/java/club/joylink/rtss/vo/race/TaskRuleQueryVO.java
Normal file
11
src/main/java/club/joylink/rtss/vo/race/TaskRuleQueryVO.java
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package club.joylink.rtss.vo.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.vo.client.PageQueryVO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class TaskRuleQueryVO extends PageQueryVO {
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private Long id;
|
||||||
|
}
|
@ -1,57 +1,57 @@
|
|||||||
server:
|
server:
|
||||||
port: 9000
|
port: 9000
|
||||||
|
|
||||||
modbus-tcp:
|
modbus-tcp:
|
||||||
port: 19000
|
port: 19000
|
||||||
afc-transfer-port: 19001
|
afc-transfer-port: 19001
|
||||||
|
|
||||||
udp:
|
udp:
|
||||||
serverPort: 20002
|
serverPort: 20002
|
||||||
clientPort: 20001
|
clientPort: 20001
|
||||||
yjddzh:
|
yjddzh:
|
||||||
receiveTimeOver: 60
|
receiveTimeOver: 60
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: dev
|
active: dev
|
||||||
application:
|
application:
|
||||||
name: joylink-rtss
|
name: joylink-rtss
|
||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
default-property-inclusion: non_null
|
default-property-inclusion: non_null
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 10MB
|
max-file-size: 10MB
|
||||||
# JavaMailSender 邮件发送的配置
|
# JavaMailSender 邮件发送的配置
|
||||||
mail:
|
mail:
|
||||||
host: smtp.exmail.qq.com
|
host: smtp.exmail.qq.com
|
||||||
port: 465
|
port: 465
|
||||||
username: serviceemai@joylink.club
|
username: serviceemai@joylink.club
|
||||||
password: Jiulian0503
|
password: Jiulian0503
|
||||||
properties:
|
properties:
|
||||||
mail:
|
mail:
|
||||||
smtp:
|
smtp:
|
||||||
auth: true
|
auth: true
|
||||||
starttls:
|
starttls:
|
||||||
enable: true
|
enable: true
|
||||||
required: true
|
required: true
|
||||||
socketFactory:
|
socketFactory:
|
||||||
port: 465
|
port: 465
|
||||||
class: javax.net.ssl.SSLSocketFactory
|
class: javax.net.ssl.SSLSocketFactory
|
||||||
fallback: false
|
fallback: false
|
||||||
datasource:
|
datasource:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
hikari:
|
hikari:
|
||||||
minimum-idle: 5 # 连接池维护的最小空闲连接数
|
minimum-idle: 5 # 连接池维护的最小空闲连接数
|
||||||
maximum-pool-size: 10 #配置最大连接池大小
|
maximum-pool-size: 10 #配置最大连接池大小
|
||||||
auto-commit: true #配置从池返回的连接的默认自动提交行为
|
auto-commit: true #配置从池返回的连接的默认自动提交行为
|
||||||
idle-timeout: 30000 # 允许连接在连接池中空闲的最长时间,单位ms
|
idle-timeout: 30000 # 允许连接在连接池中空闲的最长时间,单位ms
|
||||||
pool-name: HikariPool
|
pool-name: HikariPool
|
||||||
max-lifetime: 1800000 # 池中连接关闭后的最长生命周期,单位ms
|
max-lifetime: 1800000 # 池中连接关闭后的最长生命周期,单位ms
|
||||||
connection-timeout: 30000 # 等待连接的超时时间,单位ms
|
connection-timeout: 30000 # 等待连接的超时时间,单位ms
|
||||||
mybatis:
|
mybatis:
|
||||||
mapper-locations: classpath:mybatis/mapper/**/*.xml
|
mapper-locations: classpath:mybatis/mapper/**/*.xml
|
||||||
# type-aliases-package: club.joylink.rtss.entity
|
# type-aliases-package: club.joylink.rtss.entity
|
||||||
configuration:
|
configuration:
|
||||||
map-underscore-to-camel-case: true
|
map-underscore-to-camel-case: true
|
||||||
pagehelper:
|
pagehelper:
|
||||||
@ -62,22 +62,22 @@ pagehelper:
|
|||||||
|
|
||||||
# 微信配置
|
# 微信配置
|
||||||
wechat:
|
wechat:
|
||||||
app-id: wx41cb66db5faf330f
|
app-id: wx41cb66db5faf330f
|
||||||
app-secret: eb7199c1e73417be6a4d38b4a848effb
|
app-secret: eb7199c1e73417be6a4d38b4a848effb
|
||||||
domain-uri: https://api.weixin.qq.com
|
domain-uri: https://api.weixin.qq.com
|
||||||
wx-api-url: https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wechat.app-id}&redirect_uri=http://joylink.club/wx/%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect
|
wx-api-url: https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wechat.app-id}&redirect_uri=http://joylink.club/wx/%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect
|
||||||
sp-app-id: wxe9150dbbcbf9440b
|
sp-app-id: wxe9150dbbcbf9440b
|
||||||
sp-app-secret: 4b5d453e5ec246a3f1b72360c59e4fab
|
sp-app-secret: 4b5d453e5ec246a3f1b72360c59e4fab
|
||||||
sp-app2-id: wxecb0321367be529c
|
sp-app2-id: wxecb0321367be529c
|
||||||
sp-app2-secret: 3c31cb41588f27a78160092249123766
|
sp-app2-secret: 3c31cb41588f27a78160092249123766
|
||||||
sp-app3-id: wxe6140d5985333338
|
sp-app3-id: wxe6140d5985333338
|
||||||
sp-app3-secret: 6b7359860c22e3607467df421cd24eef
|
sp-app3-secret: 6b7359860c22e3607467df421cd24eef
|
||||||
wm-base-url: https://joylink.club/oss/joylink/%s?state=%s
|
wm-base-url: https://joylink.club/oss/joylink/%s?state=%s
|
||||||
wx-module-url: http://localhost:9001
|
wx-module-url: http://localhost:9001
|
||||||
mini:
|
mini:
|
||||||
access-token-task-on: false
|
access-token-task-on: false
|
||||||
app-id: wxe9150dbbcbf9440b
|
app-id: wxe9150dbbcbf9440b
|
||||||
app-secret: 4b5d453e5ec246a3f1b72360c59e4fab
|
app-secret: 4b5d453e5ec246a3f1b72360c59e4fab
|
||||||
|
|
||||||
# 腾讯云
|
# 腾讯云
|
||||||
tencent-cloud:
|
tencent-cloud:
|
||||||
@ -91,7 +91,7 @@ tencent-cloud:
|
|||||||
spring:
|
spring:
|
||||||
profiles: dev
|
profiles: dev
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://192.168.3.233:3306/joylink?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://192.168.33.233:3306/joylink?useSSL=false&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||||
username: root
|
username: root
|
||||||
password: joylink0503
|
password: joylink0503
|
||||||
|
|
||||||
@ -117,17 +117,17 @@ common:
|
|||||||
license-secret-key: joylink
|
license-secret-key: joylink
|
||||||
---
|
---
|
||||||
spring:
|
spring:
|
||||||
profiles: test
|
profiles: test
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://172.16.0.128:3306/joylink?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://172.16.0.128:3306/joylink?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: Joylink@0503
|
password: Joylink@0503
|
||||||
|
|
||||||
wechat:
|
wechat:
|
||||||
wx-api-url: https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wechat.app-id}&redirect_uri=https://test.joylink.club/wx/%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect
|
wx-api-url: https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wechat.app-id}&redirect_uri=https://test.joylink.club/wx/%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect
|
||||||
wx-module-url: https://joylink.club/jlwxs
|
wx-module-url: https://joylink.club/jlwxs
|
||||||
tencent-cloud:
|
tencent-cloud:
|
||||||
allow-send: false
|
allow-send: false
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
@ -179,21 +179,21 @@ common:
|
|||||||
|
|
||||||
---
|
---
|
||||||
spring:
|
spring:
|
||||||
profiles: prd
|
profiles: prd
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://192.168.0.169:3306/joylink?useSSL=false&serverTimezone=Asia/Shanghai
|
url: jdbc:mysql://192.168.0.169:3306/joylink?useSSL=false&serverTimezone=Asia/Shanghai
|
||||||
username: root
|
username: root
|
||||||
password: joylink@0503
|
password: joylink@0503
|
||||||
wechat:
|
wechat:
|
||||||
app-id: wx41cb66db5faf330f
|
app-id: wx41cb66db5faf330f
|
||||||
app-secret: eb7199c1e73417be6a4d38b4a848effb
|
app-secret: eb7199c1e73417be6a4d38b4a848effb
|
||||||
wx-api-url: https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wechat.app-id}&redirect_uri=https://joylink.club/wx/%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect
|
wx-api-url: https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wechat.app-id}&redirect_uri=https://joylink.club/wx/%s&response_type=code&scope=snsapi_base&state=%s#wechat_redirect
|
||||||
wx-module-url: http://172.21.0.4:9001
|
wx-module-url: http://172.21.0.4:9001
|
||||||
mini:
|
mini:
|
||||||
access-token-task-on: true
|
access-token-task-on: true
|
||||||
|
|
||||||
file:
|
file:
|
||||||
path: https://joylink.club/jlfile/api/upload/joylink/avatar
|
path: https://joylink.club/jlfile/api/upload/joylink/avatar
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
file:
|
file:
|
||||||
|
331
src/main/resources/mybatis/mapper/racetr/RacetrPaperDAO.xml
Normal file
331
src/main/resources/mybatis/mapper/racetr/RacetrPaperDAO.xml
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
<?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="club.joylink.rtss.dao.racetr.RacetrPaperDAO">
|
||||||
|
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.racetr.RacetrPaper">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="desc" jdbcType="VARCHAR" property="desc" />
|
||||||
|
<result column="season_id" jdbcType="BIGINT" property="seasonId" />
|
||||||
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="updater_id" jdbcType="BIGINT" property="updaterId" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.racetr.RacetrPaper">
|
||||||
|
<result column="configs" jdbcType="LONGVARBINARY" property="configs" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, `name`, `desc`, season_id, creator_id, create_time, updater_id, update_time
|
||||||
|
</sql>
|
||||||
|
<sql id="Blob_Column_List">
|
||||||
|
configs
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.racetr.RacetrPaperExample" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from racetr_paper
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrPaperExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from racetr_paper
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from racetr_paper
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete from racetr_paper
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrPaperExample">
|
||||||
|
delete from racetr_paper
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrPaper" useGeneratedKeys="true">
|
||||||
|
insert into racetr_paper (`name`, `desc`, season_id,
|
||||||
|
creator_id, create_time, updater_id,
|
||||||
|
update_time, configs)
|
||||||
|
values (#{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{seasonId,jdbcType=BIGINT},
|
||||||
|
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT},
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP}, #{configs,jdbcType=LONGVARBINARY})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrPaper" useGeneratedKeys="true">
|
||||||
|
insert into racetr_paper
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
<if test="desc != null">
|
||||||
|
`desc`,
|
||||||
|
</if>
|
||||||
|
<if test="seasonId != null">
|
||||||
|
season_id,
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="configs != null">
|
||||||
|
configs,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="desc != null">
|
||||||
|
#{desc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="seasonId != null">
|
||||||
|
#{seasonId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
#{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
#{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="configs != null">
|
||||||
|
#{configs,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrPaperExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from racetr_paper
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update racetr_paper
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.name != null">
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.desc != null">
|
||||||
|
`desc` = #{record.desc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.seasonId != null">
|
||||||
|
season_id = #{record.seasonId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.creatorId != null">
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.updaterId != null">
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.configs != null">
|
||||||
|
configs = #{record.configs,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
|
update racetr_paper
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
`desc` = #{record.desc,jdbcType=VARCHAR},
|
||||||
|
season_id = #{record.seasonId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
configs = #{record.configs,jdbcType=LONGVARBINARY}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update racetr_paper
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
`desc` = #{record.desc,jdbcType=VARCHAR},
|
||||||
|
season_id = #{record.seasonId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.racetr.RacetrPaper">
|
||||||
|
update racetr_paper
|
||||||
|
<set>
|
||||||
|
<if test="name != null">
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="desc != null">
|
||||||
|
`desc` = #{desc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="seasonId != null">
|
||||||
|
season_id = #{seasonId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="configs != null">
|
||||||
|
configs = #{configs,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.racetr.RacetrPaper">
|
||||||
|
update racetr_paper
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
`desc` = #{desc,jdbcType=VARCHAR},
|
||||||
|
season_id = #{seasonId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
configs = #{configs,jdbcType=LONGVARBINARY}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.racetr.RacetrPaper">
|
||||||
|
update racetr_paper
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
`desc` = #{desc,jdbcType=VARCHAR},
|
||||||
|
season_id = #{seasonId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
368
src/main/resources/mybatis/mapper/racetr/RacetrSceneDAO.xml
Normal file
368
src/main/resources/mybatis/mapper/racetr/RacetrSceneDAO.xml
Normal file
@ -0,0 +1,368 @@
|
|||||||
|
<?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="club.joylink.rtss.dao.racetr.RacetrSceneDAO">
|
||||||
|
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.racetr.RacetrScene">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||||
|
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||||
|
<result column="function_id" jdbcType="BIGINT" property="functionId" />
|
||||||
|
<result column="draft_training_id" jdbcType="BIGINT" property="draftTrainingId" />
|
||||||
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="updater_id" jdbcType="BIGINT" property="updaterId" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.racetr.RacetrScene">
|
||||||
|
<result column="proto" jdbcType="LONGVARBINARY" property="proto" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, `name`, `type`, map_id, function_id, draft_training_id, creator_id, create_time,
|
||||||
|
updater_id, update_time
|
||||||
|
</sql>
|
||||||
|
<sql id="Blob_Column_List">
|
||||||
|
proto
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.racetr.RacetrSceneExample" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from racetr_scene
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrSceneExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from racetr_scene
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from racetr_scene
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete from racetr_scene
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrSceneExample">
|
||||||
|
delete from racetr_scene
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrScene" useGeneratedKeys="true">
|
||||||
|
insert into racetr_scene (`name`, `type`, map_id,
|
||||||
|
function_id, draft_training_id, creator_id,
|
||||||
|
create_time, updater_id, update_time,
|
||||||
|
proto)
|
||||||
|
values (#{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT},
|
||||||
|
#{functionId,jdbcType=BIGINT}, #{draftTrainingId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT},
|
||||||
|
#{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
#{proto,jdbcType=LONGVARBINARY})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrScene" useGeneratedKeys="true">
|
||||||
|
insert into racetr_scene
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
`type`,
|
||||||
|
</if>
|
||||||
|
<if test="mapId != null">
|
||||||
|
map_id,
|
||||||
|
</if>
|
||||||
|
<if test="functionId != null">
|
||||||
|
function_id,
|
||||||
|
</if>
|
||||||
|
<if test="draftTrainingId != null">
|
||||||
|
draft_training_id,
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="proto != null">
|
||||||
|
proto,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
#{type,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="mapId != null">
|
||||||
|
#{mapId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="functionId != null">
|
||||||
|
#{functionId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="draftTrainingId != null">
|
||||||
|
#{draftTrainingId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
#{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
#{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="proto != null">
|
||||||
|
#{proto,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrSceneExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from racetr_scene
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update racetr_scene
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.name != null">
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.type != null">
|
||||||
|
`type` = #{record.type,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.mapId != null">
|
||||||
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.functionId != null">
|
||||||
|
function_id = #{record.functionId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.draftTrainingId != null">
|
||||||
|
draft_training_id = #{record.draftTrainingId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.creatorId != null">
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.updaterId != null">
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.proto != null">
|
||||||
|
proto = #{record.proto,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
|
update racetr_scene
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
`type` = #{record.type,jdbcType=VARCHAR},
|
||||||
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||||
|
function_id = #{record.functionId,jdbcType=BIGINT},
|
||||||
|
draft_training_id = #{record.draftTrainingId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
proto = #{record.proto,jdbcType=LONGVARBINARY}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update racetr_scene
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
`type` = #{record.type,jdbcType=VARCHAR},
|
||||||
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||||
|
function_id = #{record.functionId,jdbcType=BIGINT},
|
||||||
|
draft_training_id = #{record.draftTrainingId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.racetr.RacetrScene">
|
||||||
|
update racetr_scene
|
||||||
|
<set>
|
||||||
|
<if test="name != null">
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
`type` = #{type,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="mapId != null">
|
||||||
|
map_id = #{mapId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="functionId != null">
|
||||||
|
function_id = #{functionId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="draftTrainingId != null">
|
||||||
|
draft_training_id = #{draftTrainingId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="proto != null">
|
||||||
|
proto = #{proto,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.racetr.RacetrScene">
|
||||||
|
update racetr_scene
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
`type` = #{type,jdbcType=VARCHAR},
|
||||||
|
map_id = #{mapId,jdbcType=BIGINT},
|
||||||
|
function_id = #{functionId,jdbcType=BIGINT},
|
||||||
|
draft_training_id = #{draftTrainingId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
proto = #{proto,jdbcType=LONGVARBINARY}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.racetr.RacetrScene">
|
||||||
|
update racetr_scene
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
`type` = #{type,jdbcType=VARCHAR},
|
||||||
|
map_id = #{mapId,jdbcType=BIGINT},
|
||||||
|
function_id = #{functionId,jdbcType=BIGINT},
|
||||||
|
draft_training_id = #{draftTrainingId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
@ -0,0 +1,297 @@
|
|||||||
|
<?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="club.joylink.rtss.dao.racetr.RacetrScoringRuleDAO">
|
||||||
|
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.racetr.RacetrScoringRule">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="updater_id" jdbcType="BIGINT" property="updaterId" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.racetr.RacetrScoringRule">
|
||||||
|
<result column="rule" jdbcType="LONGVARBINARY" property="rule" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, `name`, creator_id, create_time, updater_id, update_time
|
||||||
|
</sql>
|
||||||
|
<sql id="Blob_Column_List">
|
||||||
|
`rule`
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRuleExample" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from racetr_scoring_rule
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRuleExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from racetr_scoring_rule
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from racetr_scoring_rule
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete from racetr_scoring_rule
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRuleExample">
|
||||||
|
delete from racetr_scoring_rule
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRule" useGeneratedKeys="true">
|
||||||
|
insert into racetr_scoring_rule (`name`, creator_id, create_time,
|
||||||
|
updater_id, update_time, `rule`
|
||||||
|
)
|
||||||
|
values (#{name,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{rule,jdbcType=LONGVARBINARY}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRule" useGeneratedKeys="true">
|
||||||
|
insert into racetr_scoring_rule
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="rule != null">
|
||||||
|
`rule`,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
#{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
#{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="rule != null">
|
||||||
|
#{rule,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRuleExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from racetr_scoring_rule
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update racetr_scoring_rule
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.name != null">
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.creatorId != null">
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.updaterId != null">
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.rule != null">
|
||||||
|
`rule` = #{record.rule,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
|
update racetr_scoring_rule
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
`rule` = #{record.rule,jdbcType=LONGVARBINARY}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update racetr_scoring_rule
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRule">
|
||||||
|
update racetr_scoring_rule
|
||||||
|
<set>
|
||||||
|
<if test="name != null">
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="rule != null">
|
||||||
|
`rule` = #{rule,jdbcType=LONGVARBINARY},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRule">
|
||||||
|
update racetr_scoring_rule
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
`rule` = #{rule,jdbcType=LONGVARBINARY}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.racetr.RacetrScoringRule">
|
||||||
|
update racetr_scoring_rule
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
260
src/main/resources/mybatis/mapper/racetr/RacetrSeasonDAO.xml
Normal file
260
src/main/resources/mybatis/mapper/racetr/RacetrSeasonDAO.xml
Normal file
@ -0,0 +1,260 @@
|
|||||||
|
<?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="club.joylink.rtss.dao.racetr.RacetrSeasonDAO">
|
||||||
|
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.racetr.RacetrSeason">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||||
|
<result column="group" jdbcType="VARCHAR" property="group" />
|
||||||
|
<result column="term" jdbcType="VARCHAR" property="term" />
|
||||||
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="updater_id" jdbcType="BIGINT" property="updaterId" />
|
||||||
|
<result column="udpate_time" jdbcType="TIMESTAMP" property="udpateTime" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id, code, `group`, term, creator_id, create_time, updater_id, udpate_time
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrSeasonExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from racetr_season
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from racetr_season
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete from racetr_season
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrSeasonExample">
|
||||||
|
delete from racetr_season
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrSeason" useGeneratedKeys="true">
|
||||||
|
insert into racetr_season (code, `group`, term,
|
||||||
|
creator_id, create_time, updater_id,
|
||||||
|
udpate_time)
|
||||||
|
values (#{code,jdbcType=VARCHAR}, #{group,jdbcType=VARCHAR}, #{term,jdbcType=VARCHAR},
|
||||||
|
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updaterId,jdbcType=BIGINT},
|
||||||
|
#{udpateTime,jdbcType=TIMESTAMP})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrSeason" useGeneratedKeys="true">
|
||||||
|
insert into racetr_season
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="code != null">
|
||||||
|
code,
|
||||||
|
</if>
|
||||||
|
<if test="group != null">
|
||||||
|
`group`,
|
||||||
|
</if>
|
||||||
|
<if test="term != null">
|
||||||
|
term,
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id,
|
||||||
|
</if>
|
||||||
|
<if test="udpateTime != null">
|
||||||
|
udpate_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="code != null">
|
||||||
|
#{code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="group != null">
|
||||||
|
#{group,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="term != null">
|
||||||
|
#{term,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
#{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
#{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="udpateTime != null">
|
||||||
|
#{udpateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrSeasonExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from racetr_season
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update racetr_season
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.code != null">
|
||||||
|
code = #{record.code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.group != null">
|
||||||
|
`group` = #{record.group,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.term != null">
|
||||||
|
term = #{record.term,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.creatorId != null">
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.updaterId != null">
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.udpateTime != null">
|
||||||
|
udpate_time = #{record.udpateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update racetr_season
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
code = #{record.code,jdbcType=VARCHAR},
|
||||||
|
`group` = #{record.group,jdbcType=VARCHAR},
|
||||||
|
term = #{record.term,jdbcType=VARCHAR},
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
udpate_time = #{record.udpateTime,jdbcType=TIMESTAMP}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.racetr.RacetrSeason">
|
||||||
|
update racetr_season
|
||||||
|
<set>
|
||||||
|
<if test="code != null">
|
||||||
|
code = #{code,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="group != null">
|
||||||
|
`group` = #{group,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="term != null">
|
||||||
|
term = #{term,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="udpateTime != null">
|
||||||
|
udpate_time = #{udpateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.racetr.RacetrSeason">
|
||||||
|
update racetr_season
|
||||||
|
set code = #{code,jdbcType=VARCHAR},
|
||||||
|
`group` = #{group,jdbcType=VARCHAR},
|
||||||
|
term = #{term,jdbcType=VARCHAR},
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
udpate_time = #{udpateTime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
335
src/main/resources/mybatis/mapper/racetr/RacetrTaskDAO.xml
Normal file
335
src/main/resources/mybatis/mapper/racetr/RacetrTaskDAO.xml
Normal file
@ -0,0 +1,335 @@
|
|||||||
|
<?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="club.joylink.rtss.dao.racetr.RacetrTaskDAO">
|
||||||
|
<resultMap id="BaseResultMap" type="club.joylink.rtss.entity.racetr.RacetrTask">
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||||
|
<result column="desc" jdbcType="VARCHAR" property="desc"/>
|
||||||
|
<result column="content" jdbcType="VARCHAR" property="content"/>
|
||||||
|
<result column="standards" jdbcType="VARCHAR" property="standards"/>
|
||||||
|
<result column="scene_id" jdbcType="BIGINT" property="sceneId"/>
|
||||||
|
<result column="score_rule_id" jdbcType="BIGINT" property="scoreRuleId"/>
|
||||||
|
<result column="parent_id" jdbcType="BIGINT" property="parentId"/>
|
||||||
|
<result column="creator_id" jdbcType="BIGINT" property="creatorId"/>
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Update_By_Example_Where_Clause">
|
||||||
|
<where>
|
||||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||||
|
<if test="criteria.valid">
|
||||||
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||||
|
<foreach collection="criteria.criteria" item="criterion">
|
||||||
|
<choose>
|
||||||
|
<when test="criterion.noValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.singleValue">
|
||||||
|
and ${criterion.condition} #{criterion.value}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.betweenValue">
|
||||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||||
|
</when>
|
||||||
|
<when test="criterion.listValue">
|
||||||
|
and ${criterion.condition}
|
||||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||||
|
#{listItem}
|
||||||
|
</foreach>
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</if>
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
</sql>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id
|
||||||
|
, `name`, `desc`, content, standards, scene_id, score_rule_id, parent_id, creator_id,
|
||||||
|
create_time, updater_id, update_time
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrTaskExample" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from racetr_task
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
<if test="limit != null">
|
||||||
|
<if test="offset != null">
|
||||||
|
limit ${offset}, ${limit}
|
||||||
|
</if>
|
||||||
|
<if test="offset == null">
|
||||||
|
limit ${limit}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from racetr_task
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete
|
||||||
|
from racetr_task
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<delete id="deleteByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrTaskExample">
|
||||||
|
delete from racetr_task
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrTask" useGeneratedKeys="true">
|
||||||
|
insert into racetr_task (`name`, `desc`, `content`,
|
||||||
|
standards, scene_id, score_rule_id,
|
||||||
|
parent_id, creator_id, create_time,
|
||||||
|
updater_id, update_time)
|
||||||
|
values (#{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
|
||||||
|
#{standards,jdbcType=VARCHAR}, #{sceneId,jdbcType=BIGINT}, #{scoreRuleId,jdbcType=BIGINT},
|
||||||
|
#{parentId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
#{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.racetr.RacetrTask" useGeneratedKeys="true">
|
||||||
|
insert into racetr_task
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
<if test="desc != null">
|
||||||
|
`desc`,
|
||||||
|
</if>
|
||||||
|
<if test="content != null">
|
||||||
|
`content`,
|
||||||
|
</if>
|
||||||
|
<if test="standards != null">
|
||||||
|
standards,
|
||||||
|
</if>
|
||||||
|
<if test="sceneId != null">
|
||||||
|
scene_id,
|
||||||
|
</if>
|
||||||
|
<if test="scoreRuleId != null">
|
||||||
|
score_rule_id,
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id,
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="desc != null">
|
||||||
|
#{desc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="content != null">
|
||||||
|
#{content,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="standards != null">
|
||||||
|
#{standards,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sceneId != null">
|
||||||
|
#{sceneId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="scoreRuleId != null">
|
||||||
|
#{scoreRuleId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
#{parentId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
#{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
#{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<select id="countByExample" parameterType="club.joylink.rtss.entity.racetr.RacetrTaskExample" resultType="java.lang.Long">
|
||||||
|
select count(*) from racetr_task
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<update id="updateByExampleSelective" parameterType="map">
|
||||||
|
update racetr_task
|
||||||
|
<set>
|
||||||
|
<if test="record.id != null">
|
||||||
|
id = #{record.id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.name != null">
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.desc != null">
|
||||||
|
`desc` = #{record.desc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.content != null">
|
||||||
|
content = #{record.content,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.standards != null">
|
||||||
|
standards = #{record.standards,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.sceneId != null">
|
||||||
|
scene_id = #{record.sceneId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.scoreRuleId != null">
|
||||||
|
score_rule_id = #{record.scoreRuleId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.parentId != null">
|
||||||
|
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.creatorId != null">
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.createTime != null">
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="record.updaterId != null">
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="record.updateTime != null">
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByExample" parameterType="map">
|
||||||
|
update racetr_task
|
||||||
|
set id = #{record.id,jdbcType=BIGINT},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
`desc` = #{record.desc,jdbcType=VARCHAR},
|
||||||
|
`content` = #{record.content,jdbcType=VARCHAR},
|
||||||
|
standards = #{record.standards,jdbcType=VARCHAR},
|
||||||
|
scene_id = #{record.sceneId,jdbcType=BIGINT},
|
||||||
|
score_rule_id = #{record.scoreRuleId,jdbcType=BIGINT},
|
||||||
|
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause"/>
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.entity.racetr.RacetrTask">
|
||||||
|
update racetr_task
|
||||||
|
<set>
|
||||||
|
<if test="name != null">
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="desc != null">
|
||||||
|
`desc` = #{desc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="content != null">
|
||||||
|
`content` = #{content,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="standards != null">
|
||||||
|
standards = #{standards,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="sceneId != null">
|
||||||
|
scene_id = #{sceneId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="scoreRuleId != null">
|
||||||
|
score_rule_id = #{scoreRuleId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="parentId != null">
|
||||||
|
parent_id = #{parentId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="creatorId != null">
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updaterId != null">
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.racetr.RacetrTask">
|
||||||
|
update racetr_task
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
`desc` = #{desc,jdbcType=VARCHAR},
|
||||||
|
`content` = #{content,jdbcType=VARCHAR},
|
||||||
|
standards = #{standards,jdbcType=VARCHAR},
|
||||||
|
scene_id = #{sceneId,jdbcType=BIGINT},
|
||||||
|
score_rule_id = #{scoreRuleId,jdbcType=BIGINT},
|
||||||
|
parent_id = #{parentId,jdbcType=BIGINT},
|
||||||
|
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<select id="recursiveFindTask" parameterType="arraylist" resultType="club.joylink.rtss.vo.race.RaceTaskDetailDTO">
|
||||||
|
WITH RECURSIVE task as
|
||||||
|
(select id,name,`desc`,content,standards,scene_id,score_rule_id as ruleId, 0 as parent_id from racetr_task where id in
|
||||||
|
<foreach collection="taskIds" item="d" separator="," open="(" close=")">
|
||||||
|
#{d}
|
||||||
|
</foreach>
|
||||||
|
UNION all
|
||||||
|
select A.id,A.name,A.desc,A.content,A.standards,A.score_rule_id,A.score_rule_id as ruleId,A.parent_id from racetr_task A, task B where A.parent_id = B.id)
|
||||||
|
select * from task
|
||||||
|
</select>
|
||||||
|
</mapper>
|
101
src/test/java/club/joylink/rtss/GenerateProtoBufUtil.java
Normal file
101
src/test/java/club/joylink/rtss/GenerateProtoBufUtil.java
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
package club.joylink.rtss;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import org.assertj.core.util.Lists;
|
||||||
|
|
||||||
|
public class GenerateProtoBufUtil {
|
||||||
|
|
||||||
|
private static final String EXE_BIN_FILE =
|
||||||
|
String.join(
|
||||||
|
File.separator,
|
||||||
|
System.getProperty("user.dir"),
|
||||||
|
"rtss-message",
|
||||||
|
"protoc-23.1",
|
||||||
|
"bin",
|
||||||
|
"win64",
|
||||||
|
"protoc");
|
||||||
|
private File protoFilePath;
|
||||||
|
private String outPath;
|
||||||
|
private boolean pullMessage;
|
||||||
|
// private String gitPullPath;
|
||||||
|
|
||||||
|
public GenerateProtoBufUtil(String rootPath, boolean pullMessage) {
|
||||||
|
this.pullMessage = pullMessage;
|
||||||
|
String sourcePath = String.join(File.separator, rootPath, "rtss-message", "proto");
|
||||||
|
|
||||||
|
this.outPath = String.join(File.separator, rootPath, "src", "main", "java");
|
||||||
|
this.protoFilePath = new File(sourcePath);
|
||||||
|
if (!protoFilePath.exists() || !protoFilePath.isDirectory()) {
|
||||||
|
throw new RuntimeException("proto不是目录或目录不存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<File> findFiles() {
|
||||||
|
return this.findFiles(this.protoFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void execCommand() throws IOException {
|
||||||
|
if (this.pullMessage) {
|
||||||
|
this.PullTmmsMessage();
|
||||||
|
}
|
||||||
|
for (File file : this.findFiles()) {
|
||||||
|
String command =
|
||||||
|
String.format(
|
||||||
|
"%s --proto_path=%s -I=%s --java_out=%s %s",
|
||||||
|
EXE_BIN_FILE,
|
||||||
|
this.protoFilePath.getPath(),
|
||||||
|
file.getParentFile().getAbsolutePath(),
|
||||||
|
this.outPath,
|
||||||
|
file.getName());
|
||||||
|
this.genertateFile(command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void genertateFile(String command) throws IOException {
|
||||||
|
System.out.println(String.format("执行指令: %s", command));
|
||||||
|
InputStream errorStream = Runtime.getRuntime().exec(command).getErrorStream();
|
||||||
|
byte[] ebs = new byte[512];
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
int size;
|
||||||
|
while ((size = errorStream.read(ebs)) > 0) {
|
||||||
|
String err = new String(Arrays.copyOf(ebs, size), Charset.forName("UTF-8"));
|
||||||
|
sb.append(err);
|
||||||
|
}
|
||||||
|
System.out.println(sb);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<File> findFiles(File file) {
|
||||||
|
List<File> findFiles = Lists.newArrayList();
|
||||||
|
for (File files : file.listFiles()) {
|
||||||
|
if (files.isDirectory()) {
|
||||||
|
findFiles.addAll(this.findFiles(files));
|
||||||
|
} else if (files.getName().endsWith(".proto")) {
|
||||||
|
findFiles.add(files);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return findFiles;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PullTmmsMessage() throws IOException {
|
||||||
|
InputStream inputStream =
|
||||||
|
Runtime.getRuntime().exec("git pull", null, protoFilePath).getInputStream();
|
||||||
|
byte[] ebs = new byte[512];
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
int size;
|
||||||
|
while ((size = inputStream.read(ebs)) > 0) {
|
||||||
|
String err = new String(Arrays.copyOf(ebs, size), Charset.forName("UTF-8"));
|
||||||
|
sb.append(err);
|
||||||
|
}
|
||||||
|
System.out.println(sb);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) throws IOException {
|
||||||
|
GenerateProtoBufUtil gu = new GenerateProtoBufUtil(System.getProperty("user.dir"), false);
|
||||||
|
gu.execCommand();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,51 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.util.JsonUtils;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaper.RacePaperVO;
|
||||||
|
import club.joylink.rtss.vo.race.RacePaperQueryVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeason.Group;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RacePaperSingleModuleGroupTask;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
public class PaperServiceTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RacePaperService paperService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void saveTest() {
|
||||||
|
RacePaperCreateVO.Builder bu = RacePaperCreateVO.newBuilder();
|
||||||
|
bu.setName("test");
|
||||||
|
|
||||||
|
this.paperService.create(bu.build(), SeasonServiceTest.createAccount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void pageTest() {
|
||||||
|
RacePaperQueryVO queryVO = new RacePaperQueryVO();
|
||||||
|
queryVO.setPageNum(1);
|
||||||
|
queryVO.setPageSize(10);
|
||||||
|
queryVO.setGroup(Group.GZ.name());
|
||||||
|
|
||||||
|
PageVO<RacePaperVO> page = this.paperService.pageQuery(queryVO);
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void deleteTest() {
|
||||||
|
this.paperService.delete(1L);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void paperModuleTaskTest() {
|
||||||
|
// RacePaperModuleTask moduleTask = this.paperService.paperModuleTask(13L, 2);
|
||||||
|
RacePaperSingleModuleGroupTask moduleTask = this.paperService.singlePaperModuleTask(13L, 2);
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(moduleTask));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.util.JsonUtils;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceSceneListVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceScenePublishVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneOuterClass.RaceSceneVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSceneQueryVO;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
public class SceneServiceTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RaceSceneService sceneService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void publishTest() {
|
||||||
|
RaceScenePublishVO.Builder p = RaceScenePublishVO.newBuilder();
|
||||||
|
p.setDafitid(847);
|
||||||
|
p.setName("asdfasdf");
|
||||||
|
this.sceneService.publishHere(p.build(), SeasonServiceTest.createAccount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void pageTest() {
|
||||||
|
RaceSceneQueryVO query = new RaceSceneQueryVO();
|
||||||
|
query.setPageNum(1);
|
||||||
|
query.setPageSize(10);
|
||||||
|
PageVO<RaceSceneListVO> page = this.sceneService.page(query);
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(page));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void detailTest() {
|
||||||
|
RaceSceneVO vo = this.sceneService.detail(2L);
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(vo));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
public class ScoreRuleServiceTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RaceScoreRuleService ruleService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void detail() {
|
||||||
|
this.ruleService.detail(2L);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,58 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.util.JsonUtils;
|
||||||
|
import club.joylink.rtss.vo.AccountVO;
|
||||||
|
import club.joylink.rtss.vo.client.PageVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeason.Group;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeasonCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonOuterClass.RaceSeasonVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceSeasonQueryVO;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
public class SeasonServiceTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RaceSeasonService raceSeasonService;
|
||||||
|
|
||||||
|
public static AccountVO createAccount() {
|
||||||
|
AccountVO accountVO = new AccountVO();
|
||||||
|
accountVO.setId(1L);
|
||||||
|
return accountVO;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void saveTest() {
|
||||||
|
RaceSeasonCreateVO.Builder createBuildVO = RaceSeasonCreateVO.newBuilder();
|
||||||
|
createBuildVO.setCode("123");
|
||||||
|
createBuildVO.setTerm("zzz");
|
||||||
|
createBuildVO.setGroup(Group.ZZ);
|
||||||
|
this.raceSeasonService.save(createBuildVO.build(), this.createAccount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void updateTest() {
|
||||||
|
RaceSeasonCreateVO.Builder createBuildVO = RaceSeasonCreateVO.newBuilder();
|
||||||
|
createBuildVO.setCode("123");
|
||||||
|
createBuildVO.setTerm("zzz");
|
||||||
|
createBuildVO.setGroup(Group.GZ);
|
||||||
|
this.raceSeasonService.update(1L, createBuildVO.build(), this.createAccount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void pageTest() {
|
||||||
|
RaceSeasonQueryVO queryVO = new RaceSeasonQueryVO();
|
||||||
|
queryVO.setPageNum(1);
|
||||||
|
queryVO.setPageSize(10);
|
||||||
|
PageVO<RaceSeasonVO> page = this.raceSeasonService.page(queryVO);
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(page));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void deleteTest() {
|
||||||
|
this.raceSeasonService.delete(1L);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package club.joylink.rtss.services.race;
|
||||||
|
|
||||||
|
import club.joylink.rtss.util.JsonUtils;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskBind;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskBind.TaskBindType;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskCreateVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTask.RaceTaskDetailVO;
|
||||||
|
import club.joylink.rtss.vo.race.RaceTaskTreeVO;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
@SpringBootTest
|
||||||
|
public class TaskServiceTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RaceTaskService taskService;
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void saveTest() {
|
||||||
|
RaceTaskCreateVO.Builder create = RaceTaskCreateVO.newBuilder();
|
||||||
|
create.setName("task1-1");
|
||||||
|
this.taskService.save(create.build(), SeasonServiceTest.createAccount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void save2Test() {
|
||||||
|
RaceTaskCreateVO.Builder create = RaceTaskCreateVO.newBuilder();
|
||||||
|
create.setName("task1-2");
|
||||||
|
create.setParentId(1L);
|
||||||
|
this.taskService.save(create.build(), SeasonServiceTest.createAccount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void save3Test() {
|
||||||
|
RaceTaskCreateVO.Builder create = RaceTaskCreateVO.newBuilder();
|
||||||
|
create.setName("task2-1");
|
||||||
|
create.setParentId(2L);
|
||||||
|
this.taskService.save(create.build(), SeasonServiceTest.createAccount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void updateTest() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void bindTest() {
|
||||||
|
List<RaceTaskBind> list = new ArrayList<>();
|
||||||
|
RaceTaskBind.Builder b1 = RaceTaskBind.newBuilder();
|
||||||
|
b1.setBindType(TaskBindType.scene);
|
||||||
|
b1.setStatus(0);
|
||||||
|
b1.setBindId(222);
|
||||||
|
RaceTaskBind.Builder b2 = RaceTaskBind.newBuilder();
|
||||||
|
b2.setBindType(TaskBindType.rule);
|
||||||
|
b2.setStatus(0);
|
||||||
|
b2.setBindId(333);
|
||||||
|
list.add(b1.build());
|
||||||
|
list.add(b2.build());
|
||||||
|
|
||||||
|
this.taskService.bind(1L, list, SeasonServiceTest.createAccount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void detailTest() {
|
||||||
|
RaceTaskDetailVO vo = this.taskService.detail(1L);
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(vo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void treeTest() {
|
||||||
|
List<RaceTaskTreeVO> voList = this.taskService.tree();
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(voList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void findChildrenTest() {
|
||||||
|
List<RaceTaskTreeVO> voList = this.taskService.findChildren(2L);
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(voList));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void detail() {
|
||||||
|
RaceTaskDetailVO vo = this.taskService.detail(33L);
|
||||||
|
System.out.println(JsonUtils.writeValueAsString(vo));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void deleteTest() {
|
||||||
|
this.taskService.delete(2L);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user