Merge branch 'test'
# Conflicts: # rtss-message
This commit is contained in:
commit
58bc68876a
8
pom.xml
8
pom.xml
@ -144,9 +144,13 @@
|
|||||||
<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>
|
||||||
|
<groupId>com.hubspot.jackson</groupId>
|
||||||
|
<artifactId>jackson-datatype-protobuf</artifactId>
|
||||||
|
<version>0.9.12</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- <dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.chenlb.mmseg4j</groupId>
|
<groupId>com.chenlb.mmseg4j</groupId>
|
||||||
<artifactId>mmseg4j-core</artifactId>
|
<artifactId>mmseg4j-core</artifactId>
|
||||||
|
@ -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,6 +18,7 @@ import java.time.format.DateTimeFormatter;
|
|||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
public class LocalDateTimeSerializerConfig {
|
public class LocalDateTimeSerializerConfig {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Date格式化字符串
|
* Date格式化字符串
|
||||||
*/
|
*/
|
||||||
@ -33,6 +35,8 @@ public class LocalDateTimeSerializerConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
|
||||||
return builder -> {
|
return builder -> {
|
||||||
|
builder.modulesToInstall(ProtobufModule.class);
|
||||||
|
builder.failOnUnknownProperties(false);
|
||||||
builder.serializerByType(LocalDateTime.class,
|
builder.serializerByType(LocalDateTime.class,
|
||||||
new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATETIME_FORMAT)));
|
new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATETIME_FORMAT)));
|
||||||
builder.deserializerByType(LocalDateTime.class,
|
builder.deserializerByType(LocalDateTime.class,
|
||||||
@ -48,5 +52,6 @@ public class LocalDateTimeSerializerConfig {
|
|||||||
builder.deserializerByType(LocalTime.class,
|
builder.deserializerByType(LocalTime.class,
|
||||||
new LocalTimeDeserializer(DateTimeFormatter.ofPattern(TIME_FORMAT)));
|
new LocalTimeDeserializer(DateTimeFormatter.ofPattern(TIME_FORMAT)));
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,11 +40,11 @@ public class CommonResponseBody implements ResponseBodyAdvice {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
@ -83,7 +83,8 @@ public class CommonResponseBody implements ResponseBodyAdvice {
|
|||||||
sb.append(error.getDefaultMessage()).append(";"));
|
sb.append(error.getDefaultMessage()).append(";"));
|
||||||
log.error("【参数校验异常】{}", e);
|
log.error("【参数校验异常】{}", e);
|
||||||
return CommonJsonResponse.newErrorResponse(ResponseConsts.VALIDATE_ERROR.getCode(), sb.toString());
|
return CommonJsonResponse.newErrorResponse(ResponseConsts.VALIDATE_ERROR.getCode(), sb.toString());
|
||||||
} if(e instanceof BusinessException) {
|
}
|
||||||
|
if (e instanceof BusinessException) {
|
||||||
club.joylink.rtss.exception.BusinessException be = (club.joylink.rtss.exception.BusinessException) e;
|
club.joylink.rtss.exception.BusinessException be = (club.joylink.rtss.exception.BusinessException) e;
|
||||||
log.error("【业务异常】{}", e);
|
log.error("【业务异常】{}", e);
|
||||||
return CommonJsonResponse.newErrorResponse(be.getCode(), be.getVoMessage());
|
return CommonJsonResponse.newErrorResponse(be.getCode(), be.getVoMessage());
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -18,6 +18,7 @@ import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO;
|
|||||||
import club.joylink.rtss.simulation.cbtc.member.MemberManager;
|
import club.joylink.rtss.simulation.cbtc.member.MemberManager;
|
||||||
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
import club.joylink.rtss.simulation.cbtc.member.SimulationMember;
|
||||||
import club.joylink.rtss.simulation.cbtc.script.ScriptBO;
|
import club.joylink.rtss.simulation.cbtc.script.ScriptBO;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.vo.SimulationWorkParamVO;
|
||||||
import club.joylink.rtss.simulation.vo.SimulationInfoVO;
|
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;
|
||||||
@ -31,37 +32,22 @@ import club.joylink.rtss.vo.client.operation.DriveParamVO;
|
|||||||
import club.joylink.rtss.vo.client.psl.PslStatus;
|
import club.joylink.rtss.vo.client.psl.PslStatus;
|
||||||
import club.joylink.rtss.vo.client.runplan.PlanTripNumberVO;
|
import club.joylink.rtss.vo.client.runplan.PlanTripNumberVO;
|
||||||
import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO;
|
import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO;
|
||||||
import club.joylink.rtss.vo.client.simulationv1.RunAsPlanParam;
|
import club.joylink.rtss.vo.client.simulationv1.*;
|
||||||
import club.joylink.rtss.vo.client.simulationv1.SimulationInfoQueryVO;
|
|
||||||
import club.joylink.rtss.vo.client.simulationv1.SimulationLogPagedQueryVO;
|
|
||||||
import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO;
|
|
||||||
import club.joylink.rtss.vo.client.simulationv1.SimulationUserVO;
|
|
||||||
import club.joylink.rtss.vo.map.MapVO;
|
import club.joylink.rtss.vo.map.MapVO;
|
||||||
import club.joylink.rtss.vo.map.graph.MapStationNewVO;
|
import club.joylink.rtss.vo.map.graph.MapStationNewVO;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import javax.validation.constraints.NotBlank;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import javax.validation.constraints.NotNull;
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
import java.time.LocalDateTime;
|
||||||
import org.springframework.web.bind.annotation.RequestAttribute;
|
import java.time.LocalTime;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import java.util.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import java.util.stream.Collectors;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新仿真接口
|
* 新仿真接口
|
||||||
@ -515,15 +501,15 @@ public class SimulationV1Controller {
|
|||||||
/* ----------------------- 仿真新接口 ----------------------- */
|
/* ----------------------- 仿真新接口 ----------------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仿真创建接口(新)
|
* 根据功能配置创建仿真
|
||||||
*/
|
*/
|
||||||
/*@Deprecated
|
@Deprecated
|
||||||
@PostMapping("/new/{mapId}")
|
@PostMapping("/new/{mapId}")
|
||||||
public String createSimulation(@PathVariable long mapId, @RequestBody @Validated SimulationWorkParamVO paramVO,
|
public String createSimulation(@PathVariable long mapId, @RequestBody @Validated SimulationWorkParamVO paramVO,
|
||||||
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
|
@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY)
|
||||||
LoginUserInfoVO loginUserInfoVO) {
|
LoginUserInfoVO loginUserInfoVO) {
|
||||||
return simulationService.createSimulation(mapId, null, paramVO, loginUserInfoVO);
|
return simulationService.createSimulation(mapId, paramVO, loginUserInfoVO);
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据地图功能id创建仿真
|
* 根据地图功能id创建仿真
|
||||||
@ -531,7 +517,7 @@ public class SimulationV1Controller {
|
|||||||
@PostMapping("/new/mapFunction/{mapFunctionId}")
|
@PostMapping("/new/mapFunction/{mapFunctionId}")
|
||||||
public String createSimulationByMapFunction(@PathVariable long mapFunctionId,
|
public String createSimulationByMapFunction(@PathVariable long mapFunctionId,
|
||||||
@RequestAttribute LoginUserInfoVO loginInfo) {
|
@RequestAttribute LoginUserInfoVO loginInfo) {
|
||||||
return simulationService.createSimulation(mapFunctionId, loginInfo);
|
return simulationService.createSimulation(mapFunctionId, loginInfo, true).getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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,6 +10,7 @@ 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;
|
||||||
@ -17,6 +18,7 @@ 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);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -310,6 +312,8 @@ public interface ISysUserService {
|
|||||||
|
|
||||||
List<SysAccount> findEntities(List<Long> ids, String orderBy);
|
List<SysAccount> findEntities(List<Long> ids, String orderBy);
|
||||||
|
|
||||||
|
Map<Long, SysAccount> findEntitiesForMap(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认该用户存在
|
* 确认该用户存在
|
||||||
*/
|
*/
|
||||||
|
@ -44,6 +44,7 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class SysUserService implements ISysUserService {
|
public class SysUserService implements ISysUserService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 默认中国码
|
* 默认中国码
|
||||||
*/
|
*/
|
||||||
@ -147,7 +148,9 @@ public class SysUserService implements ISysUserService {
|
|||||||
SysAccountExample example = new SysAccountExample();
|
SysAccountExample example = new SysAccountExample();
|
||||||
example.createCriteria().andAccountEqualTo(account).andTypeEqualTo(AccountVO.Type_2);
|
example.createCriteria().andAccountEqualTo(account).andTypeEqualTo(AccountVO.Type_2);
|
||||||
List<SysAccount> sysUsers = this.sysAccountDAO.selectByExample(example);
|
List<SysAccount> sysUsers = this.sysAccountDAO.selectByExample(example);
|
||||||
if (CollectionUtils.isEmpty(sysUsers)) return null;
|
if (CollectionUtils.isEmpty(sysUsers)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new AccountVO(sysUsers.get(0));
|
return new AccountVO(sysUsers.get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +159,9 @@ public class SysUserService implements ISysUserService {
|
|||||||
SysAccountExample example = new SysAccountExample();
|
SysAccountExample example = new SysAccountExample();
|
||||||
example.createCriteria().andAccountEqualTo(account);
|
example.createCriteria().andAccountEqualTo(account);
|
||||||
List<SysAccount> sysUsers = this.sysAccountDAO.selectByExample(example);
|
List<SysAccount> sysUsers = this.sysAccountDAO.selectByExample(example);
|
||||||
if (CollectionUtils.isEmpty(sysUsers)) return null;
|
if (CollectionUtils.isEmpty(sysUsers)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new AccountVO(sysUsers.get(0));
|
return new AccountVO(sysUsers.get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -833,6 +838,15 @@ public class SysUserService implements ISysUserService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<Long, SysAccount> findEntitiesForMap(List<Long> ids) {
|
||||||
|
List<SysAccount> accounts = this.findEntities(ids, null);
|
||||||
|
if (Objects.isNull(accounts)) {
|
||||||
|
return Collections.emptyMap();
|
||||||
|
}
|
||||||
|
return accounts.stream().collect(Collectors.toMap(SysAccount::getId, Function.identity()));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void confirmExist(Long id) {
|
public void confirmExist(Long id) {
|
||||||
getEntity(id);
|
getEntity(id);
|
||||||
|
@ -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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,7 +122,6 @@ public class Training2RuleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @param mapId
|
* @param mapId
|
||||||
* @param functionId
|
* @param functionId
|
||||||
* @return
|
* @return
|
||||||
@ -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);
|
||||||
@ -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,6 +308,7 @@ public class Training2RuleService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成实训方法
|
* 生成实训方法
|
||||||
|
*
|
||||||
* @param simulation 对应地图仿真
|
* @param simulation 对应地图仿真
|
||||||
* @param ruleList 生成规则
|
* @param ruleList 生成规则
|
||||||
* @param delTrainingIds 要删除已发布的实训ID
|
* @param delTrainingIds 要删除已发布的实训ID
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -16,11 +16,10 @@ 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
|
||||||
@ -120,7 +119,8 @@ public class StationOperateHandler {
|
|||||||
* 请求站控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,
|
||||||
|
List<String> stationCodes) {
|
||||||
atsStationService.applyForStationControl(simulation, fromMember, stationCodes);
|
atsStationService.applyForStationControl(simulation, fromMember, stationCodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,15 +128,22 @@ public class StationOperateHandler {
|
|||||||
* 请求中控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,
|
||||||
|
List<String> stationCodes) {
|
||||||
atsStationService.applyForCenterControl(simulation, fromMember, 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)
|
@OperateHandlerMapping(type = Operation.Type.CM_Interlock_Control)
|
||||||
public void applyForInterlockControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void applyForInterlockControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
atsStationService.applyForInterlockControl(simulation, fromMember, stationCodes);
|
atsStationService.applyForInterlockControl(simulation, fromMember, stationCodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -144,7 +151,8 @@ public class StationOperateHandler {
|
|||||||
* 强制站控-l
|
* 强制站控-l
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Force_Station_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Force_Station_Control)
|
||||||
public void forceForStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void forceForStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
atsStationService.forceForStationControl(simulation, fromMember, stationCodes);
|
atsStationService.forceForStationControl(simulation, fromMember, stationCodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +160,8 @@ public class StationOperateHandler {
|
|||||||
* 紧急站控-l
|
* 紧急站控-l
|
||||||
*/
|
*/
|
||||||
@OperateHandlerMapping(type = Operation.Type.CM_Emergency_Station_Control)
|
@OperateHandlerMapping(type = Operation.Type.CM_Emergency_Station_Control)
|
||||||
public void emergencyStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void emergencyStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
atsStationService.emergencyStationControl(simulation, fromMember, stationCodes);
|
atsStationService.emergencyStationControl(simulation, fromMember, stationCodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +170,8 @@ public class StationOperateHandler {
|
|||||||
* 回复站控请求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,
|
||||||
|
List<ControlTransferReplyVO> replyVOList) {
|
||||||
atsStationService.replyForStationControl(simulation, replyVOList);
|
atsStationService.replyForStationControl(simulation, replyVOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +179,8 @@ public class StationOperateHandler {
|
|||||||
* 回复中控请求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,
|
||||||
|
List<ControlTransferReplyVO> replyVOList) {
|
||||||
atsStationService.replyForCenterControl(simulation, replyVOList);
|
atsStationService.replyForCenterControl(simulation, replyVOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,7 +191,8 @@ public class StationOperateHandler {
|
|||||||
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(
|
||||||
|
s -> s.getStation() != null && Objects.equals(stationCode, s.getStation().getCode()))
|
||||||
.forEach(signal -> {
|
.forEach(signal -> {
|
||||||
ciApiService.blockadeSignal(simulation, signal.getCode());
|
ciApiService.blockadeSignal(simulation, signal.getCode());
|
||||||
if (signal.getLockedRoute() != null) {
|
if (signal.getLockedRoute() != null) {
|
||||||
@ -209,7 +221,8 @@ public class StationOperateHandler {
|
|||||||
@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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -218,7 +231,8 @@ public class StationOperateHandler {
|
|||||||
@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)
|
||||||
@ -242,35 +256,44 @@ public class StationOperateHandler {
|
|||||||
@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) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||||
|
"未选择车站");
|
||||||
this.atsStationService.applyControl(simulation, stationCodes, simulationMember);
|
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,
|
||||||
|
SimulationMember simulationMember) {
|
||||||
this.atsStationService.transferControl(simulation, stationCodes, agree, 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) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||||
|
"未选择车站");
|
||||||
this.atsStationService.devolveControl(simulation, stationCodes, simulationMember);
|
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) {
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(stationCodes,
|
||||||
|
"未选择车站");
|
||||||
this.atsStationService.revokeControl(simulation, stationCodes, simulationMember);
|
this.atsStationService.revokeControl(simulation, stationCodes, simulationMember);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -283,13 +306,15 @@ public class StationOperateHandler {
|
|||||||
@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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -317,7 +342,8 @@ public class StationOperateHandler {
|
|||||||
* @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,
|
||||||
|
String stationCode, Integer pressDown) {
|
||||||
atsStationService.specialStationControl(simulation, fromMember, stationCode, pressDown);
|
atsStationService.specialStationControl(simulation, fromMember, stationCode, pressDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,7 +359,8 @@ public class StationOperateHandler {
|
|||||||
* 车站在分散自律时,操作模式转换
|
* 车站在分散自律时,操作模式转换
|
||||||
*/
|
*/
|
||||||
@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,
|
||||||
|
List<OperationModeParam> params) {
|
||||||
atsStationService.controlOperationModeSwitch(simulation, fromMember, params);
|
atsStationService.controlOperationModeSwitch(simulation, fromMember, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,7 +368,8 @@ public class StationOperateHandler {
|
|||||||
* 分散自律同意、不同意转换模式操作
|
* 分散自律同意、不同意转换模式操作
|
||||||
*/
|
*/
|
||||||
@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,
|
||||||
|
List<String> noAgreeStationCodes) {
|
||||||
atsStationService.handleOperationModelApply(simulation, agreeStationCodes, noAgreeStationCodes);
|
atsStationService.handleOperationModelApply(simulation, agreeStationCodes, noAgreeStationCodes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,12 @@ import club.joylink.rtss.simulation.cbtc.Simulation;
|
|||||||
import club.joylink.rtss.simulation.cbtc.command.OperationMessage;
|
import club.joylink.rtss.simulation.cbtc.command.OperationMessage;
|
||||||
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.map.*;
|
import club.joylink.rtss.simulation.cbtc.data.map.MapElement;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Route;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Section;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Signal;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Station;
|
||||||
|
import club.joylink.rtss.simulation.cbtc.data.map.Switch;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.status.StationStatus;
|
import club.joylink.rtss.simulation.cbtc.data.status.StationStatus;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.support.StationTurnBackStrategyOption;
|
import club.joylink.rtss.simulation.cbtc.data.support.StationTurnBackStrategyOption;
|
||||||
import club.joylink.rtss.simulation.cbtc.data.vo.ControlTransferReplyVO;
|
import club.joylink.rtss.simulation.cbtc.data.vo.ControlTransferReplyVO;
|
||||||
@ -21,6 +26,17 @@ import club.joylink.rtss.vo.client.SocketMessageVO;
|
|||||||
import club.joylink.rtss.vo.client.WebSocketMessageType;
|
import club.joylink.rtss.vo.client.WebSocketMessageType;
|
||||||
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
|
import club.joylink.rtss.vo.client.factory.SocketMessageFactory;
|
||||||
import club.joylink.rtss.websocket.StompMessageService;
|
import club.joylink.rtss.websocket.StompMessageService;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -28,10 +44,6 @@ import org.springframework.stereotype.Component;
|
|||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AtsStationService {
|
public class AtsStationService {
|
||||||
@ -69,7 +81,8 @@ public class AtsStationService {
|
|||||||
String.format("车站[%s(%s)]不是设备集中站", station.getName(), station.getCode()));
|
String.format("车站[%s(%s)]不是设备集中站", station.getName(), station.getCode()));
|
||||||
}
|
}
|
||||||
station.setTotalGuideLock(true);
|
station.setTotalGuideLock(true);
|
||||||
List<Switch> switches = simulation.getRepository().getSwitchListByDeviceStationCode(station.getCode());
|
List<Switch> switches = simulation.getRepository()
|
||||||
|
.getSwitchListByDeviceStationCode(station.getCode());
|
||||||
if (!CollectionUtils.isEmpty(switches)) {
|
if (!CollectionUtils.isEmpty(switches)) {
|
||||||
switches.forEach(s -> s.setSingleLock(true));
|
switches.forEach(s -> s.setSingleLock(true));
|
||||||
}
|
}
|
||||||
@ -85,7 +98,8 @@ public class AtsStationService {
|
|||||||
String.format("车站[%s(%s)]不是设备集中站", station.getName(), station.getCode()));
|
String.format("车站[%s(%s)]不是设备集中站", station.getName(), station.getCode()));
|
||||||
}
|
}
|
||||||
station.setTotalGuideLock(false);
|
station.setTotalGuideLock(false);
|
||||||
List<Switch> switches = simulation.getRepository().getSwitchListByDeviceStationCode(station.getCode());
|
List<Switch> switches = simulation.getRepository()
|
||||||
|
.getSwitchListByDeviceStationCode(station.getCode());
|
||||||
if (!CollectionUtils.isEmpty(switches)) {
|
if (!CollectionUtils.isEmpty(switches)) {
|
||||||
switches.forEach(s -> s.setSingleLock(false));
|
switches.forEach(s -> s.setSingleLock(false));
|
||||||
}
|
}
|
||||||
@ -94,23 +108,27 @@ public class AtsStationService {
|
|||||||
/**
|
/**
|
||||||
* 请求站控处理
|
* 请求站控处理
|
||||||
*/
|
*/
|
||||||
public void applyForStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void applyForStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
this.controlTransfer(simulation, fromMember, stationCodes, Station.ControlMode.Local);
|
this.controlTransfer(simulation, fromMember, stationCodes, Station.ControlMode.Local);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求中控处理
|
* 请求中控处理
|
||||||
*/
|
*/
|
||||||
public void applyForCenterControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void applyForCenterControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
this.controlTransfer(simulation, fromMember, stationCodes, Station.ControlMode.Center);
|
this.controlTransfer(simulation, fromMember, stationCodes, Station.ControlMode.Center);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 控制权转换
|
* 控制权转换
|
||||||
*/
|
*/
|
||||||
private void controlTransfer(Simulation simulation, SimulationMember fromMember, List<String> stationCodes, Station.ControlMode controlMode) {
|
private void controlTransfer(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes, Station.ControlMode controlMode) {
|
||||||
if (CollectionUtils.isEmpty(stationCodes)) {
|
if (CollectionUtils.isEmpty(stationCodes)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "请求控制权转换的车站列表不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"请求控制权转换的车站列表不能为空");
|
||||||
}
|
}
|
||||||
for (String stationCode : stationCodes) {
|
for (String stationCode : stationCodes) {
|
||||||
Station station = simulation.getRepository().getByCode(stationCode, Station.class);
|
Station station = simulation.getRepository().getByCode(stationCode, Station.class);
|
||||||
@ -121,81 +139,102 @@ public class AtsStationService {
|
|||||||
/**
|
/**
|
||||||
* 强制站控处理
|
* 强制站控处理
|
||||||
*/
|
*/
|
||||||
public void forceForStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void forceForStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(stationCodes)) {
|
if (CollectionUtils.isEmpty(stationCodes)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "强制站控的车站不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"强制站控的车站不能为空");
|
||||||
}
|
}
|
||||||
List<ControlModelApplyResult> results = new ArrayList<>();
|
List<ControlModelApplyResult> results = new ArrayList<>();
|
||||||
stationCodes.forEach(stationCode -> {
|
stationCodes.forEach(stationCode -> {
|
||||||
Station station = getStation(simulation, stationCode);
|
Station station = getStation(simulation, stationCode);
|
||||||
station.setControlMode(Station.ControlMode.Local);
|
station.setControlMode(Station.ControlMode.Local);
|
||||||
results.add(new ControlModelApplyResult(stationCode, ControlModelApplyResult.Application.FORCE_LOCAL, true));
|
results.add(
|
||||||
|
new ControlModelApplyResult(stationCode, ControlModelApplyResult.Application.FORCE_LOCAL,
|
||||||
|
true));
|
||||||
});
|
});
|
||||||
sendControlModelApplyResult(simulation, fromMember, results);
|
sendControlModelApplyResult(simulation, fromMember, results);
|
||||||
atsMessageCollectAndDispatcher.handlerOperateMessage(simulation, new OperationMessage(fromMember.getId(),
|
atsMessageCollectAndDispatcher.handlerOperateMessage(simulation,
|
||||||
new HashSet<>(Collections.singleton(fromMember)), Operation.Type.CM_Reply_Station_Control, null, true, stationCodes));
|
new OperationMessage(fromMember.getId(),
|
||||||
|
new HashSet<>(Collections.singleton(fromMember)),
|
||||||
|
Operation.Type.CM_Reply_Station_Control, null, true, stationCodes));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 紧急站控处理
|
* 紧急站控处理
|
||||||
*/
|
*/
|
||||||
public void emergencyStationControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void emergencyStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(stationCodes)) {
|
if (CollectionUtils.isEmpty(stationCodes)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "紧急站控的车站不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"紧急站控的车站不能为空");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ControlModelApplyResult> results = new ArrayList<>();
|
List<ControlModelApplyResult> results = new ArrayList<>();
|
||||||
stationCodes.forEach(stationCode -> {
|
stationCodes.forEach(stationCode -> {
|
||||||
Station station = getStation(simulation, stationCode);
|
Station station = getStation(simulation, stationCode);
|
||||||
station.setControlMode(Station.ControlMode.Emergency);
|
station.setControlMode(Station.ControlMode.Emergency);
|
||||||
results.add(new ControlModelApplyResult(stationCode, ControlModelApplyResult.Application.EMERGENCY_LOCAL, true));
|
results.add(new ControlModelApplyResult(stationCode,
|
||||||
|
ControlModelApplyResult.Application.EMERGENCY_LOCAL, true));
|
||||||
});
|
});
|
||||||
sendControlModelApplyResult(simulation, fromMember, results);
|
sendControlModelApplyResult(simulation, fromMember, results);
|
||||||
atsMessageCollectAndDispatcher.handlerOperateMessage(simulation, new OperationMessage(fromMember.getId(),
|
atsMessageCollectAndDispatcher.handlerOperateMessage(simulation,
|
||||||
new HashSet<>(Collections.singleton(fromMember)), Operation.Type.CM_Reply_Station_Control, null, true, stationCodes));
|
new OperationMessage(fromMember.getId(),
|
||||||
|
new HashSet<>(Collections.singleton(fromMember)),
|
||||||
|
Operation.Type.CM_Reply_Station_Control, null, true, stationCodes));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求连锁控处理
|
* 请求连锁控处理
|
||||||
*/
|
*/
|
||||||
public void applyForInterlockControl(Simulation simulation, SimulationMember fromMember, List<String> stationCodes) {
|
public void applyForInterlockControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<String> stationCodes) {
|
||||||
if (CollectionUtils.isEmpty(stationCodes)) {
|
if (CollectionUtils.isEmpty(stationCodes)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "连锁控的车站不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"连锁控的车站不能为空");
|
||||||
}
|
}
|
||||||
List<ControlModelApplyResult> results = new ArrayList<>();
|
List<ControlModelApplyResult> results = new ArrayList<>();
|
||||||
stationCodes.forEach(stationCode -> {
|
stationCodes.forEach(stationCode -> {
|
||||||
Station station = getStation(simulation, stationCode);
|
Station station = getStation(simulation, stationCode);
|
||||||
station.setControlMode(Station.ControlMode.Interlock);
|
station.setControlMode(Station.ControlMode.Interlock);
|
||||||
results.add(new ControlModelApplyResult(stationCode, ControlModelApplyResult.Application.INTERLOCK, true));
|
results.add(
|
||||||
|
new ControlModelApplyResult(stationCode, ControlModelApplyResult.Application.INTERLOCK,
|
||||||
|
true));
|
||||||
});
|
});
|
||||||
sendControlModelApplyResult(simulation, fromMember, results);
|
sendControlModelApplyResult(simulation, fromMember, results);
|
||||||
atsMessageCollectAndDispatcher.handlerOperateMessage(simulation, new OperationMessage(fromMember.getId(),
|
atsMessageCollectAndDispatcher.handlerOperateMessage(simulation,
|
||||||
new HashSet<>(Collections.singleton(fromMember)), Operation.Type.CM_Reply_Interlock_Control, null, true, stationCodes));
|
new OperationMessage(fromMember.getId(),
|
||||||
|
new HashSet<>(Collections.singleton(fromMember)),
|
||||||
|
Operation.Type.CM_Reply_Interlock_Control, null, true, stationCodes));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回复站控请求c
|
* 回复站控请求c
|
||||||
*/
|
*/
|
||||||
public void replyForStationControl(Simulation simulation, List<ControlTransferReplyVO> replyVOList) {
|
public void replyForStationControl(Simulation simulation,
|
||||||
|
List<ControlTransferReplyVO> replyVOList) {
|
||||||
this.reply4ControlTransferApplication(simulation, replyVOList, Station.ControlMode.Local);
|
this.reply4ControlTransferApplication(simulation, replyVOList, Station.ControlMode.Local);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回复中控请求c
|
* 回复中控请求c
|
||||||
*/
|
*/
|
||||||
public void replyForCenterControl(Simulation simulation, List<ControlTransferReplyVO> replyVOList) {
|
public void replyForCenterControl(Simulation simulation,
|
||||||
|
List<ControlTransferReplyVO> replyVOList) {
|
||||||
this.reply4ControlTransferApplication(simulation, replyVOList, Station.ControlMode.Center);
|
this.reply4ControlTransferApplication(simulation, replyVOList, Station.ControlMode.Center);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 回复控制权转换
|
* 回复控制权转换
|
||||||
*/
|
*/
|
||||||
private void reply4ControlTransferApplication(Simulation simulation, List<ControlTransferReplyVO> replyVOList, Station.ControlMode controlMode) {
|
private void reply4ControlTransferApplication(Simulation simulation,
|
||||||
|
List<ControlTransferReplyVO> replyVOList, Station.ControlMode controlMode) {
|
||||||
if (CollectionUtils.isEmpty(replyVOList)) {
|
if (CollectionUtils.isEmpty(replyVOList)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Invalid_Operation, "回复结果列表不能为空");
|
throw new SimulationException(SimulationExceptionType.Invalid_Operation,
|
||||||
|
"回复结果列表不能为空");
|
||||||
}
|
}
|
||||||
List<String> stationCodes = new ArrayList<>(replyVOList.size());
|
List<String> stationCodes = new ArrayList<>(replyVOList.size());
|
||||||
SimulationMember applicant = null;
|
SimulationMember applicant = null;
|
||||||
@ -205,9 +244,11 @@ public class AtsStationService {
|
|||||||
Station station = simulation.getRepository().getByCode(reply.getStationCode(), Station.class);
|
Station station = simulation.getRepository().getByCode(reply.getStationCode(), Station.class);
|
||||||
if (station.isControlTransferApplying()) {
|
if (station.isControlTransferApplying()) {
|
||||||
if (Station.ControlMode.Center.equals(controlMode)) {
|
if (Station.ControlMode.Center.equals(controlMode)) {
|
||||||
results.add(new ControlModelApplyResult(station.getCode(), ControlModelApplyResult.Application.CENTER, reply.isAgree()));
|
results.add(new ControlModelApplyResult(station.getCode(),
|
||||||
|
ControlModelApplyResult.Application.CENTER, reply.isAgree()));
|
||||||
} else {
|
} else {
|
||||||
results.add(new ControlModelApplyResult(station.getCode(), ControlModelApplyResult.Application.LOCAL, reply.isAgree()));
|
results.add(new ControlModelApplyResult(station.getCode(),
|
||||||
|
ControlModelApplyResult.Application.LOCAL, reply.isAgree()));
|
||||||
}
|
}
|
||||||
if (reply.isAgree()) {
|
if (reply.isAgree()) {
|
||||||
station.setControlMode(controlMode);
|
station.setControlMode(controlMode);
|
||||||
@ -277,7 +318,8 @@ public class AtsStationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(canSurrender,
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED.assertTrue(canSurrender,
|
||||||
String.format("成员[%s]无权交出设备集中站[%s]的控制权", member.getId(), deviceStation.debugStr()));
|
String.format("成员[%s]无权交出设备集中站[%s]的控制权", member.getId(),
|
||||||
|
deviceStation.debugStr()));
|
||||||
stations.forEach(Station::surrenderControl);
|
stations.forEach(Station::surrenderControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,9 +346,11 @@ public class AtsStationService {
|
|||||||
|
|
||||||
if (member.isDispatcher()) {
|
if (member.isDispatcher()) {
|
||||||
if (!deviceStation.isSurrenderControl()) {
|
if (!deviceStation.isSurrenderControl()) {
|
||||||
List<SimulationMember> stationMember = simulation.getSimulationMembersByDevice(deviceStation);
|
List<SimulationMember> stationMember = simulation.getSimulationMembersByDevice(
|
||||||
|
deviceStation);
|
||||||
if (!CollectionUtils.isEmpty(stationMember)) {
|
if (!CollectionUtils.isEmpty(stationMember)) {
|
||||||
boolean allDispatchersAreRobots = stationMember.stream().allMatch(SimulationMember::isRobot);
|
boolean allDispatchersAreRobots = stationMember.stream()
|
||||||
|
.allMatch(SimulationMember::isRobot);
|
||||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED
|
||||||
.assertTrue(allDispatchersAreRobots,
|
.assertTrue(allDispatchersAreRobots,
|
||||||
String.format("车站[%s]控制权未交出", deviceStation.debugStr()));
|
String.format("车站[%s]控制权未交出", deviceStation.debugStr()));
|
||||||
@ -315,9 +359,11 @@ public class AtsStationService {
|
|||||||
stations.forEach(Station::occControl);
|
stations.forEach(Station::occControl);
|
||||||
} else if (member.isStationSupervisor()) {
|
} else if (member.isStationSupervisor()) {
|
||||||
if (!deviceStation.isSurrenderControl()) {
|
if (!deviceStation.isSurrenderControl()) {
|
||||||
List<SimulationMember> dispatchers = simulation.querySimulationMembersOfRole(SimulationMember.Type.DISPATCHER);
|
List<SimulationMember> dispatchers = simulation.querySimulationMembersOfRole(
|
||||||
|
SimulationMember.Type.DISPATCHER);
|
||||||
if (!CollectionUtils.isEmpty(dispatchers)) {
|
if (!CollectionUtils.isEmpty(dispatchers)) {
|
||||||
boolean allDispatchersAreRobots = dispatchers.stream().allMatch(SimulationMember::isRobot);
|
boolean allDispatchersAreRobots = dispatchers.stream()
|
||||||
|
.allMatch(SimulationMember::isRobot);
|
||||||
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED
|
BusinessExceptionAssertEnum.OPERATION_NOT_SUPPORTED
|
||||||
.assertTrue(allDispatchersAreRobots,
|
.assertTrue(allDispatchersAreRobots,
|
||||||
String.format("车站[%s]控制权未交出", deviceStation.debugStr()));
|
String.format("车站[%s]控制权未交出", deviceStation.debugStr()));
|
||||||
@ -378,7 +424,8 @@ public class AtsStationService {
|
|||||||
public void setCIAuto(Simulation simulation, @NonNull Station station) {
|
public void setCIAuto(Simulation simulation, @NonNull Station station) {
|
||||||
List<Route> routes = simulation.getRepository().getRouteList();
|
List<Route> routes = simulation.getRepository().getRouteList();
|
||||||
routes.stream()
|
routes.stream()
|
||||||
.filter(route -> station.equals(route.getInterlockStation()) && route.isFlt() && !route.isFleetMode())
|
.filter(route -> station.equals(route.getInterlockStation()) && route.isFlt()
|
||||||
|
&& !route.isFleetMode())
|
||||||
.map(Route::getStart)
|
.map(Route::getStart)
|
||||||
.distinct()
|
.distinct()
|
||||||
.forEach(signal -> atsRouteService.setCiAuto(simulation, signal.getCode()));
|
.forEach(signal -> atsRouteService.setCiAuto(simulation, signal.getCode()));
|
||||||
@ -389,7 +436,8 @@ public class AtsStationService {
|
|||||||
*/
|
*/
|
||||||
public void cancelCIAuto(Simulation simulation, @NonNull Station station) {
|
public void cancelCIAuto(Simulation simulation, @NonNull Station station) {
|
||||||
List<Route> routes = simulation.getRepository().getRouteList();
|
List<Route> routes = simulation.getRepository().getRouteList();
|
||||||
routes.stream().filter(route -> station.equals(route.getInterlockStation()) && route.isFlt() && route.isFleetMode())
|
routes.stream().filter(route -> station.equals(route.getInterlockStation()) && route.isFlt()
|
||||||
|
&& route.isFleetMode())
|
||||||
.filter(route -> station.equals(route.getInterlockStation()) && route.isFleetMode())
|
.filter(route -> station.equals(route.getInterlockStation()) && route.isFleetMode())
|
||||||
.map(Route::getStart)
|
.map(Route::getStart)
|
||||||
.forEach(signal -> atsRouteService.cancelCiAuto(simulation, signal.getCode()));
|
.forEach(signal -> atsRouteService.cancelCiAuto(simulation, signal.getCode()));
|
||||||
@ -400,8 +448,10 @@ public class AtsStationService {
|
|||||||
*/
|
*/
|
||||||
public void setOrCancelForcePhysicalSignal(Simulation simulation, @NonNull Station station) {
|
public void setOrCancelForcePhysicalSignal(Simulation simulation, @NonNull Station station) {
|
||||||
List<Signal> signalList = simulation.getRepository().getSignalList().stream()
|
List<Signal> signalList = simulation.getRepository().getSignalList().stream()
|
||||||
.filter(signal -> station.equals(signal.getInterlockStation())).collect(Collectors.toList());
|
.filter(signal -> station.equals(signal.getInterlockStation()))
|
||||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(signalList, station.debugStr() + "下无信号机");
|
.collect(Collectors.toList());
|
||||||
|
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(signalList,
|
||||||
|
station.debugStr() + "下无信号机");
|
||||||
if (signalList.get(0).isForcePhysical()) {
|
if (signalList.get(0).isForcePhysical()) {
|
||||||
signalList.forEach(signal -> signal.setForcePhysical(false));
|
signalList.forEach(signal -> signal.setForcePhysical(false));
|
||||||
} else {
|
} else {
|
||||||
@ -436,18 +486,23 @@ public class AtsStationService {
|
|||||||
private void updatePreResetRemainderTime(Station station) {
|
private void updatePreResetRemainderTime(Station station) {
|
||||||
int validDuration = station.getPreResetValidDuration().get();
|
int validDuration = station.getPreResetValidDuration().get();
|
||||||
if (validDuration > 0) {
|
if (validDuration > 0) {
|
||||||
station.getPreResetValidDuration().compareAndExchange(validDuration, Math.max(0, validDuration - SimulationConstants.ATS_LOOP_RATE));
|
station.getPreResetValidDuration().compareAndExchange(validDuration,
|
||||||
|
Math.max(0, validDuration - SimulationConstants.ATS_LOOP_RATE));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void applyControl(Simulation simulation, List<String> stationCodes, SimulationMember member) {
|
public void applyControl(Simulation simulation, List<String> stationCodes,
|
||||||
|
SimulationMember member) {
|
||||||
if (CollectionUtils.isEmpty(stationCodes)) {
|
if (CollectionUtils.isEmpty(stationCodes)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "申请控制的车站列表不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"申请控制的车站列表不能为空");
|
||||||
}
|
}
|
||||||
//TODO 角色和设备检查
|
//TODO 角色和设备检查
|
||||||
synchronized (simulation) {
|
synchronized (simulation) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
BusinessExceptionAssertEnum.INVALID_OPERATION.assertNotTrue(stationCodes.stream().anyMatch(s -> Objects.nonNull(repository.getByCode(s, Station.class).getControlApplicant())), "申请列车存在已被申请的车站");
|
BusinessExceptionAssertEnum.INVALID_OPERATION.assertNotTrue(stationCodes.stream().anyMatch(
|
||||||
|
s -> Objects.nonNull(repository.getByCode(s, Station.class).getControlApplicant())),
|
||||||
|
"申请列车存在已被申请的车站");
|
||||||
stationCodes.forEach(s -> {
|
stationCodes.forEach(s -> {
|
||||||
Station station = repository.getByCode(s, Station.class);
|
Station station = repository.getByCode(s, Station.class);
|
||||||
if (station.getController() == null) {
|
if (station.getController() == null) {
|
||||||
@ -459,9 +514,11 @@ public class AtsStationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void transferControl(Simulation simulation, List<String> stationCodes, boolean agree, SimulationMember member) {
|
public void transferControl(Simulation simulation, List<String> stationCodes, boolean agree,
|
||||||
|
SimulationMember member) {
|
||||||
if (CollectionUtils.isEmpty(stationCodes)) {
|
if (CollectionUtils.isEmpty(stationCodes)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "控制权转移的车站列表不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"控制权转移的车站列表不能为空");
|
||||||
}
|
}
|
||||||
//TODO 角色和设备检查
|
//TODO 角色和设备检查
|
||||||
synchronized (simulation) {
|
synchronized (simulation) {
|
||||||
@ -480,16 +537,19 @@ public class AtsStationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void devolveControl(Simulation simulation, List<String> stationCodes, SimulationMember member) {
|
public void devolveControl(Simulation simulation, List<String> stationCodes,
|
||||||
|
SimulationMember member) {
|
||||||
if (CollectionUtils.isEmpty(stationCodes)) {
|
if (CollectionUtils.isEmpty(stationCodes)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "控制权下放的车站列表不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"控制权下放的车站列表不能为空");
|
||||||
}
|
}
|
||||||
//TODO 角色和设备检查
|
//TODO 角色和设备检查
|
||||||
synchronized (simulation) {
|
synchronized (simulation) {
|
||||||
SimulationDataRepository repository = simulation.getRepository();
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
stationCodes.forEach(s -> {
|
stationCodes.forEach(s -> {
|
||||||
Station station = repository.getByCode(s, Station.class);
|
Station station = repository.getByCode(s, Station.class);
|
||||||
if (Objects.nonNull(station.getController()) && Objects.equals(station.getController(), member)) {
|
if (Objects.nonNull(station.getController()) && Objects.equals(station.getController(),
|
||||||
|
member)) {
|
||||||
station.setController(null);
|
station.setController(null);
|
||||||
station.setEmergencyController(false);
|
station.setEmergencyController(false);
|
||||||
station.setControlApplicant(null);
|
station.setControlApplicant(null);
|
||||||
@ -499,9 +559,11 @@ public class AtsStationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void revokeControl(Simulation simulation, List<String> stationCodes, SimulationMember member) {
|
public void revokeControl(Simulation simulation, List<String> stationCodes,
|
||||||
|
SimulationMember member) {
|
||||||
if (CollectionUtils.isEmpty(stationCodes)) {
|
if (CollectionUtils.isEmpty(stationCodes)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "回收控制权的车站列表不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"回收控制权的车站列表不能为空");
|
||||||
}
|
}
|
||||||
//TODO 角色和设备检查
|
//TODO 角色和设备检查
|
||||||
synchronized (simulation) {
|
synchronized (simulation) {
|
||||||
@ -572,17 +634,22 @@ public class AtsStationService {
|
|||||||
* @param stationCode 车站编码
|
* @param stationCode 车站编码
|
||||||
* @param pressDown 按下抬起
|
* @param pressDown 按下抬起
|
||||||
*/
|
*/
|
||||||
public void specialStationControl(Simulation simulation, SimulationMember fromMember, String stationCode, Integer pressDown) {
|
public void specialStationControl(Simulation simulation, SimulationMember fromMember,
|
||||||
|
String stationCode, Integer pressDown) {
|
||||||
if (StringUtils.isEmpty(stationCode)) {
|
if (StringUtils.isEmpty(stationCode)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "非常站控的车站不能为空");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"非常站控的车站不能为空");
|
||||||
}
|
}
|
||||||
Station station = getStation(simulation, stationCode);
|
Station station = getStation(simulation, stationCode);
|
||||||
if (pressDown == 0 && !station.refreshAllowAutonomyStatus()) {
|
if (pressDown == 0 && !station.refreshAllowAutonomyStatus()) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, "车站场界有按钮处于按下状态");
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
"车站场界有按钮处于按下状态");
|
||||||
}
|
}
|
||||||
// 按下时非常站控,抬起时自律控制
|
// 按下时非常站控,抬起时自律控制
|
||||||
Operation.Type operationType = (pressDown == 1) ? Operation.Type.CM_Reply_Interlock_Control : Operation.Type.CM_Reply_Station_Control;
|
Operation.Type operationType = (pressDown == 1) ? Operation.Type.CM_Reply_Interlock_Control
|
||||||
Station.ControlMode controlMode = (pressDown == 1) ? Station.ControlMode.Interlock : Station.ControlMode.Local;
|
: Operation.Type.CM_Reply_Station_Control;
|
||||||
|
Station.ControlMode controlMode =
|
||||||
|
(pressDown == 1) ? Station.ControlMode.Interlock : Station.ControlMode.Local;
|
||||||
// 变更控制模式
|
// 变更控制模式
|
||||||
station.setControlMode(controlMode);
|
station.setControlMode(controlMode);
|
||||||
atsMessageCollectAndDispatcher.handlerOperateMessage(simulation,
|
atsMessageCollectAndDispatcher.handlerOperateMessage(simulation,
|
||||||
@ -604,7 +671,8 @@ public class AtsStationService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Station station = getStation(simulation, params.getStationCode());
|
Station station = getStation(simulation, params.getStationCode());
|
||||||
if (station.isLocalControl() && Objects.equals(Station.OperationMode.Station, station.getOperationMode())) {
|
if (station.isLocalControl() && Objects.equals(Station.OperationMode.Station,
|
||||||
|
station.getOperationMode())) {
|
||||||
if (params.getPlanControl() != null) {
|
if (params.getPlanControl() != null) {
|
||||||
station.setPlanControl(params.getPlanControl()); // 计划控制
|
station.setPlanControl(params.getPlanControl()); // 计划控制
|
||||||
}
|
}
|
||||||
@ -614,7 +682,8 @@ public class AtsStationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(logList)) {
|
if (!CollectionUtils.isEmpty(logList)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, String.join(";", logList));
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
String.join(";", logList));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -625,14 +694,17 @@ public class AtsStationService {
|
|||||||
* @param fromMember 操作角色
|
* @param fromMember 操作角色
|
||||||
* @param params 转换参数
|
* @param params 转换参数
|
||||||
*/
|
*/
|
||||||
public void controlOperationModeSwitch(Simulation simulation, SimulationMember fromMember, List<OperationModeParam> params) {
|
public void controlOperationModeSwitch(Simulation simulation, SimulationMember fromMember,
|
||||||
|
List<OperationModeParam> params) {
|
||||||
List<String> logList = new ArrayList<>(params.size());
|
List<String> logList = new ArrayList<>(params.size());
|
||||||
for (OperationModeParam param : params) {
|
for (OperationModeParam param : params) {
|
||||||
Station station = getStation(simulation, param.getStationCode());
|
Station station = getStation(simulation, param.getStationCode());
|
||||||
if (Station.ControlMode.Local.equals(station.getControlMode())) {
|
if (Station.ControlMode.Local.equals(station.getControlMode())) {
|
||||||
Station.OperationModeApplication applyOperation = new Station.OperationModeApplication(fromMember, station.getOperationMode(), param.getTarget());
|
Station.OperationModeApplication applyOperation = new Station.OperationModeApplication(
|
||||||
|
fromMember, station.getOperationMode(), param.getTarget());
|
||||||
if (applyOperation.isNoHandle()) {
|
if (applyOperation.isNoHandle()) {
|
||||||
log.info(String.format("车站【%s(%s)】 操作方式与目的方式相同不做操作", station.getName(), station.getCode()));
|
log.info(String.format("车站【%s(%s)】 操作方式与目的方式相同不做操作", station.getName(),
|
||||||
|
station.getCode()));
|
||||||
} else if (applyOperation.isDirectConversion()) { // 如果可以直接转换
|
} else if (applyOperation.isDirectConversion()) { // 如果可以直接转换
|
||||||
station.setOperationMode(param.getTarget());
|
station.setOperationMode(param.getTarget());
|
||||||
log.info(String.format("车站【%s(%s)】 直接转换", station.getName(), station.getCode()));
|
log.info(String.format("车站【%s(%s)】 直接转换", station.getName(), station.getCode()));
|
||||||
@ -641,7 +713,8 @@ public class AtsStationService {
|
|||||||
} else {
|
} else {
|
||||||
applyOperation.setApplyDateTime(simulation.getCorrectSystemTime());
|
applyOperation.setApplyDateTime(simulation.getCorrectSystemTime());
|
||||||
if (applyOperation.isCenterApplication()) { // 如果中心请求,需要车站同意
|
if (applyOperation.isCenterApplication()) { // 如果中心请求,需要车站同意
|
||||||
SimulationMember member = simulation.getSimulationMember(SimulationMember.Type.STATION_SUPERVISOR, station.getCode());
|
SimulationMember member = simulation.getSimulationMember(
|
||||||
|
SimulationMember.Type.STATION_SUPERVISOR, station.getCode());
|
||||||
applyOperation.setApprovalMember(Arrays.asList(member));
|
applyOperation.setApprovalMember(Arrays.asList(member));
|
||||||
} else { // 车站同意需要中心同意
|
} else { // 车站同意需要中心同意
|
||||||
applyOperation.setApprovalMember(
|
applyOperation.setApprovalMember(
|
||||||
@ -653,11 +726,13 @@ public class AtsStationService {
|
|||||||
station.setOperationModeApplication(applyOperation);
|
station.setOperationModeApplication(applyOperation);
|
||||||
}
|
}
|
||||||
} else { // 非分散自律抛出异常
|
} else { // 非分散自律抛出异常
|
||||||
logList.add(String.format("车站【%s(%s)】 非分散自律,不可操作", station.getName(), station.getCode()));
|
logList.add(String.format("车站【%s(%s)】 非分散自律,不可操作", station.getName(),
|
||||||
|
station.getCode()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(logList)) {
|
if (!CollectionUtils.isEmpty(logList)) {
|
||||||
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL, String.join(";", logList));
|
throw new SimulationException(SimulationExceptionType.Operation_Handle_FAIL,
|
||||||
|
String.join(";", logList));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -668,7 +743,8 @@ public class AtsStationService {
|
|||||||
* @param agreeStationCodes 同意车站编码
|
* @param agreeStationCodes 同意车站编码
|
||||||
* @param noAgreeStationCodes 不同意车站编码
|
* @param noAgreeStationCodes 不同意车站编码
|
||||||
*/
|
*/
|
||||||
public void handleOperationModelApply(Simulation simulation, List<String> agreeStationCodes, List<String> noAgreeStationCodes) {
|
public void handleOperationModelApply(Simulation simulation, List<String> agreeStationCodes,
|
||||||
|
List<String> noAgreeStationCodes) {
|
||||||
agreeStationCodes.forEach(stationCode -> {
|
agreeStationCodes.forEach(stationCode -> {
|
||||||
Station station = getStation(simulation, stationCode);
|
Station station = getStation(simulation, stationCode);
|
||||||
if (station.getOperationModeApplication() != null) {
|
if (station.getOperationModeApplication() != null) {
|
||||||
@ -700,7 +776,8 @@ public class AtsStationService {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 申请超过两分钟
|
// 申请超过两分钟
|
||||||
if (simulation.getCorrectSystemTime().isAfter(modeApplication.getApplyDateTime().plusMinutes(2))) {
|
if (simulation.getCorrectSystemTime()
|
||||||
|
.isAfter(modeApplication.getApplyDateTime().plusMinutes(2))) {
|
||||||
station.setOperationModeApplication(null);
|
station.setOperationModeApplication(null);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -708,7 +785,8 @@ public class AtsStationService {
|
|||||||
}).forEach(station -> {
|
}).forEach(station -> {
|
||||||
Station.OperationModeApplication modeApplication = station.getOperationModeApplication();
|
Station.OperationModeApplication modeApplication = station.getOperationModeApplication();
|
||||||
Set<String> userSet = modeApplication.getApprovalMember().stream().filter(m -> !m.isRobot())
|
Set<String> userSet = modeApplication.getApprovalMember().stream().filter(m -> !m.isRobot())
|
||||||
.map(club.joylink.rtss.simulation.SimulationMember::getUserId).collect(Collectors.toSet());
|
.map(club.joylink.rtss.simulation.SimulationMember::getUserId)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
if (!CollectionUtils.isEmpty(userSet)) {
|
if (!CollectionUtils.isEmpty(userSet)) {
|
||||||
Map<String, Object> messageMap = new HashMap<>();
|
Map<String, Object> messageMap = new HashMap<>();
|
||||||
messageMap.put("code", station.getCode());
|
messageMap.put("code", station.getCode());
|
||||||
@ -727,7 +805,8 @@ public class AtsStationService {
|
|||||||
if (!CollectionUtils.isEmpty(userMessageMap)) {
|
if (!CollectionUtils.isEmpty(userMessageMap)) {
|
||||||
userMessageMap.forEach((k, v) ->
|
userMessageMap.forEach((k, v) ->
|
||||||
stompMessageService.sendToUser(k,
|
stompMessageService.sendToUser(k,
|
||||||
SocketMessageFactory.build(WebSocketMessageType.Simulation_Operation_Mode_Apply, simulation.getId(), v)));
|
SocketMessageFactory.build(WebSocketMessageType.Simulation_Operation_Mode_Apply,
|
||||||
|
simulation.getId(), v)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,11 +821,21 @@ public class AtsStationService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void directTurnCenterControl(Simulation simulation, String stationCode) {
|
||||||
|
SimulationDataRepository repository = simulation.getRepository();
|
||||||
|
Station station = repository.getByCode(stationCode, Station.class);
|
||||||
|
if (!station.isCenterControl()) {
|
||||||
|
station.setControlMode(Station.ControlMode.Center);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送控制模式申请结果
|
* 发送控制模式申请结果
|
||||||
*/
|
*/
|
||||||
private void sendControlModelApplyResult(Simulation sim, SimulationMember applier, List<ControlModelApplyResult> results) {
|
private void sendControlModelApplyResult(Simulation sim, SimulationMember applier,
|
||||||
SocketMessageVO<List<ControlModelApplyResult>> message = SocketMessageFactory.buildControlModelApplyResultMessage(sim.getId(), results);
|
List<ControlModelApplyResult> results) {
|
||||||
|
SocketMessageVO<List<ControlModelApplyResult>> message = SocketMessageFactory.buildControlModelApplyResultMessage(
|
||||||
|
sim.getId(), results);
|
||||||
if (!applier.isRobot()) {
|
if (!applier.isRobot()) {
|
||||||
stompMessageService.sendToUser(applier.getUserId(), message);
|
stompMessageService.sendToUser(applier.getUserId(), message);
|
||||||
return;
|
return;
|
||||||
@ -755,4 +844,6 @@ public class AtsStationService {
|
|||||||
applier.getUnreceivedMessages().offer(message);
|
applier.getUnreceivedMessages().offer(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -494,16 +494,18 @@ 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.setGuideRemain(0);
|
|
||||||
} else {
|
|
||||||
signal.guideDelayStart();
|
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,6 +41,7 @@ public interface SimulationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据地图和功能ID获取仿真GroupId
|
* 根据地图和功能ID获取仿真GroupId
|
||||||
|
*
|
||||||
* @param mapId 地图ID
|
* @param mapId 地图ID
|
||||||
* @param mapFunctionId 功能ID
|
* @param mapFunctionId 功能ID
|
||||||
* @return 仿真GroupId
|
* @return 仿真GroupId
|
||||||
@ -53,6 +51,7 @@ public interface SimulationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据地图和功能ID获取仿真GroupId返回仿真对象
|
* 根据地图和功能ID获取仿真GroupId返回仿真对象
|
||||||
|
*
|
||||||
* @param mapId 地图ID
|
* @param mapId 地图ID
|
||||||
* @param mapFunctionId 功能ID
|
* @param mapFunctionId 功能ID
|
||||||
* @return 仿真GroupId
|
* @return 仿真GroupId
|
||||||
@ -64,8 +63,6 @@ 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);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后台创建仿真
|
* 后台创建仿真
|
||||||
*
|
*
|
||||||
@ -74,7 +71,7 @@ public interface SimulationService {
|
|||||||
* @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,8 +80,9 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
//只获取所有与该功能相关的权限信息
|
//只获取所有与该功能相关的权限信息
|
||||||
@ -119,9 +120,9 @@ 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()) {
|
||||||
@ -184,57 +185,6 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
}
|
}
|
||||||
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) {
|
||||||
@ -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,7 +308,7 @@ 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();
|
||||||
@ -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,9 +1,11 @@
|
|||||||
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;
|
||||||
@ -21,6 +23,8 @@ public class JsonUtils {
|
|||||||
.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)
|
||||||
|
.modulesToInstall(ProtobufModule.class)
|
||||||
;
|
;
|
||||||
objectMapper = builder.build();
|
objectMapper = builder.build();
|
||||||
Jackson2ObjectMapperBuilder nullableBuilder = Jackson2ObjectMapperBuilder.json();
|
Jackson2ObjectMapperBuilder nullableBuilder = Jackson2ObjectMapperBuilder.json();
|
||||||
@ -28,6 +32,7 @@ public class JsonUtils {
|
|||||||
.simpleDateFormat("yyyy-MM-dd HH:mm:ss") // 格式化日期
|
.simpleDateFormat("yyyy-MM-dd HH:mm:ss") // 格式化日期
|
||||||
.timeZone("GMT+8") // 设置时区
|
.timeZone("GMT+8") // 设置时区
|
||||||
.failOnUnknownProperties(false) // 未知属性不抛出异常
|
.failOnUnknownProperties(false) // 未知属性不抛出异常
|
||||||
|
.modulesToInstall(ProtobufModule.class)
|
||||||
;
|
;
|
||||||
objectNullableMapper = nullableBuilder.build();
|
objectNullableMapper = nullableBuilder.build();
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
}
|
@ -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
|
||||||
|
|
||||||
|
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