Compare commits
19 Commits
Author | SHA1 | Date |
---|---|---|
tiger_zhou | 94177b2581 | |
tiger_zhou | c38d4748d5 | |
tiger_zhou | 7ce998f117 | |
tiger_zhou | 822e908562 | |
tiger_zhou | 9dcaeba9ca | |
tiger_zhou | c39c661010 | |
tiger_zhou | 557a9f7858 | |
tiger_zhou | 812c9bd880 | |
tiger_zhou | 6ab040d1ba | |
tiger_zhou | 5d009a8ab4 | |
tiger_zhou | cb811c3894 | |
tiger_zhou | 4264d10744 | |
tiger_zhou | fa150fb0b5 | |
tiger_zhou | 213e2f8bf3 | |
tiger_zhou | e78cf889d4 | |
tiger_zhou | 1eba4b7a4e | |
joylink_zhangsai | a90b557f0b | |
joylink_zhangsai | 53898cf270 | |
tiger_zhou | 0e23653da5 |
|
@ -0,0 +1,6 @@
|
|||
[submodule "ncc-message"]
|
||||
path = ncc-message
|
||||
url = https://git.code.tencent.com/lian-cbtc/NCC/ncc-message.git
|
||||
[submodule "ecs"]
|
||||
path = ecs
|
||||
url = https://git.code.tencent.com/lian-cbtc/ecs.git
|
|
@ -1,6 +1,6 @@
|
|||
FROM openjdk:11
|
||||
FROM openjdk:17
|
||||
|
||||
ADD target/rtss-0.0.1-SNAPSHOT.jar app.jar
|
||||
ADD rtss/target/rtss-0.0.1-SNAPSHOT.jar app.jar
|
||||
|
||||
EXPOSE 9000 19000/tcp
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FROM openjdk:11
|
||||
FROM openjdk:17
|
||||
|
||||
#ADD jre-11 jre-11
|
||||
ADD target/rtss-0.0.1-SNAPSHOT.jar app.jar
|
||||
ADD rtss/target/rtss-0.0.1-SNAPSHOT.jar app.jar
|
||||
|
||||
#ENV JAVA_HOME=/jre-11
|
||||
#ENV PATH=$JAVA_HOME/bin:$PATH
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
FROM openjdk:11
|
||||
FROM openjdk:17
|
||||
#from centos:7
|
||||
|
||||
#ADD jre-11 jre-11
|
||||
ADD target/rtss-0.0.1-SNAPSHOT.jar app.jar
|
||||
ADD rtss/target/rtss-0.0.1-SNAPSHOT.jar app.jar
|
||||
|
||||
#ENV JAVA_HOME=/jre-11
|
||||
#ENV PATH=$JAVA_HOME/bin:$PATH
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>club.joylink</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>common</artifactId>
|
||||
|
||||
<!--<dependencies>
|
||||
<dependency>
|
||||
<artifactId>common</artifactId>
|
||||
<groupId>club.joylink</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>-->
|
||||
</project>
|
|
@ -0,0 +1,54 @@
|
|||
package club.joylink.constants;
|
||||
|
||||
import club.joylink.exception.BusinessExceptionAssertEnum;
|
||||
import lombok.Getter;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 客户端枚举
|
||||
*/
|
||||
@Getter
|
||||
public enum Client {
|
||||
Joylink("1", "joylink", "实训平台"),
|
||||
Design("2", "design", "设计平台"),
|
||||
Assistant("4", "linkassistant", "琏课堂助手"),
|
||||
WeiAngU3d("5", "unitywa5", "Unity3D"),
|
||||
|
||||
Rate("6", "rate", "竞赛平台"),
|
||||
Referee("7", "referee", "裁判平台"),
|
||||
|
||||
;
|
||||
|
||||
private String id;
|
||||
|
||||
private String secret;
|
||||
|
||||
private String name;
|
||||
|
||||
Client(String id, String secret, String name) {
|
||||
this.id = id;
|
||||
this.secret = secret;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据客户端id查询客户端对象
|
||||
*
|
||||
* @param clientId
|
||||
* @return
|
||||
*/
|
||||
public static Client getByIdAndSecret(String clientId, String secret) {
|
||||
// 传入为空时,设置默认客户端
|
||||
if (StringUtils.isEmpty(clientId) && StringUtils.isEmpty(secret)) {
|
||||
return Client.Joylink;
|
||||
}
|
||||
Client[] values = Client.values();
|
||||
for (Client value : values) {
|
||||
if (value.getId().equals(clientId)
|
||||
&& value.getSecret().equals(secret)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
throw BusinessExceptionAssertEnum.INVALID_CLIENT.exception(String.format("未找到id为[%s]的客户端", clientId));
|
||||
}
|
||||
}
|
|
@ -1,9 +1,7 @@
|
|||
package club.joylink.rtss.exception;
|
||||
package club.joylink.exception;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class BaseException extends RuntimeException {
|
||||
|
||||
private IExceptionMessage exceptionMessage;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.exception;
|
||||
package club.joylink.exception;
|
||||
|
||||
public class BusinessException extends BaseException {
|
||||
public BusinessException(IExceptionMessage exceptionMessage) {
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.exception;
|
||||
package club.joylink.exception;
|
||||
|
||||
public interface BusinessExceptionAssert extends IExceptionMessage, ExceptionAssert {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.exception;
|
||||
package club.joylink.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.exception;
|
||||
package club.joylink.exception;
|
||||
|
||||
|
||||
import org.springframework.util.CollectionUtils;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.exception;
|
||||
package club.joylink.exception;
|
||||
|
||||
public interface IExceptionMessage {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.exception;
|
||||
package club.joylink.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.exception;
|
||||
package club.joylink.exception;
|
||||
|
||||
public class PayException extends BaseException {
|
||||
public PayException(IExceptionMessage exceptionMessage) {
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.KeyGenerator;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
|
@ -1,4 +1,5 @@
|
|||
package club.joylink.rtss.util;
|
||||
/*
|
||||
package club.joylink.util;
|
||||
|
||||
import club.joylink.rtss.simulation.cbtc.Simulation;
|
||||
import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository;
|
||||
|
@ -28,13 +29,15 @@ public class StorageGenerateUtil {
|
|||
generate(VirtualRealityTrain.class, "club.joylink.rtss.simulation.cbtc.data.storage.vr", "noCommunicateDevice");
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* 生成Storage类文件
|
||||
*
|
||||
* @param aClass 要生成文件的类
|
||||
* @param packageName 生成的文件要放入的包
|
||||
* @param startFieldName 从这个字段开始是要存的字段
|
||||
*/
|
||||
*//*
|
||||
|
||||
public static void generate(Class<?> aClass, String packageName, String startFieldName) {
|
||||
String sourceClassName = aClass.getSimpleName();
|
||||
String targetClassName = String.format("Storage%s", sourceClassName);
|
||||
|
@ -241,3 +244,4 @@ public class StorageGenerateUtil {
|
|||
}
|
||||
}
|
||||
}
|
||||
*/
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
public class StrUtils {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.exception.BusinessExceptionAssertEnum;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
public final class VersionUtil {
|
|
@ -1,7 +1,7 @@
|
|||
package club.joylink.rtss.util;
|
||||
package club.joylink.util;
|
||||
|
||||
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.rtss.vo.CommonJsonResponse;
|
||||
import club.joylink.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.vo.CommonJsonResponse;
|
||||
import org.springframework.core.io.ByteArrayResource;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util.jsonSerialize;
|
||||
package club.joylink.util.jsonSerialize;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
@ -1,4 +1,4 @@
|
|||
package club.joylink.rtss.util.jsonSerialize;
|
||||
package club.joylink.util.jsonSerialize;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
|
@ -0,0 +1,110 @@
|
|||
package club.joylink.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
@NoArgsConstructor
|
||||
@JsonView(View.class)
|
||||
public class CommonJsonResponse<T> implements Serializable {
|
||||
private Integer code;
|
||||
|
||||
private String message;
|
||||
|
||||
private T data;
|
||||
|
||||
/**
|
||||
* 构造一个没有数据的消息
|
||||
*/
|
||||
private CommonJsonResponse(ResponseConsts respConst) {
|
||||
this.code = respConst.getCode();
|
||||
this.message = respConst.getMsg();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造成功返回数据对象
|
||||
*/
|
||||
private CommonJsonResponse(T data) {
|
||||
this.code = ResponseConsts.SUCCESS.getCode();
|
||||
this.message = ResponseConsts.SUCCESS.getMsg();
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public CommonJsonResponse(int code, String msg) {
|
||||
this.code = code;
|
||||
this.message = msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回通用成功对象
|
||||
*/
|
||||
public static CommonJsonResponse newSuccessResponse() {
|
||||
return new CommonJsonResponse(ResponseConsts.SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回数据对象
|
||||
*/
|
||||
public static <T> CommonJsonResponse<T> newSuccessResponse(T data) {
|
||||
return new CommonJsonResponse<>(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回失败对象
|
||||
*/
|
||||
public static CommonJsonResponse newFaildResponse(ResponseConsts respConst) {
|
||||
return new CommonJsonResponse(respConst);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回通用异常对象
|
||||
*/
|
||||
public static CommonJsonResponse newErrorResponse() {
|
||||
return new CommonJsonResponse(ResponseConsts.ERROR);
|
||||
}
|
||||
|
||||
public static CommonJsonResponse newErrorResponse(int code, String msg) {
|
||||
return new CommonJsonResponse(code, msg);
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CommonJsonResponse [code=" + code + ", message=" + message + ", data=" + data + "]";
|
||||
}
|
||||
|
||||
public String toJSONString() {
|
||||
if(Objects.isNull(data)) {
|
||||
return "{\"code\":" + code + ", \"message\":\"" + message + "\"}";
|
||||
} else {
|
||||
return "{\"code\":" + code + ", \"message\":\"" + message + "\", \"data\":\"" + data + "\"}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package club.joylink.vo;
|
||||
|
||||
public enum ResponseConsts {
|
||||
|
||||
SUCCESS(200, "成功"),
|
||||
FAILD(300, "失败"),
|
||||
ERROR(500, "未知错误"),
|
||||
VALIDATE_ERROR(501, "");
|
||||
|
||||
private ResponseConsts(Integer code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String msg;
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package club.joylink.vo;
|
||||
|
||||
public interface View {
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 26e482c846b3bdc21061c55036a446d21db00dbb
|
|
@ -0,0 +1 @@
|
|||
Subproject commit dfb2bb393f59e77713b88a34342df0fa6ac28889
|
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>club.joylink</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>ncc</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<artifactId>common</artifactId>
|
||||
<groupId>club.joylink</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>club.joylink</groupId>
|
||||
<artifactId>ncc-message</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>3.19.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>club.joylink</groupId>
|
||||
<artifactId>jl-ecs</artifactId>
|
||||
<version>0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<resources>
|
||||
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yml</include>
|
||||
<include>**/*.properties</include>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,5 @@
|
|||
package club.joylink.ncc.constants;
|
||||
|
||||
public class NccTypeEnum {
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
package club.joylink.ncc.controller;
|
||||
|
||||
import club.joylink.ncc.services.MapDataService;
|
||||
import club.joylink.ncc.vo.NccMapDataVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/ncc/manage")
|
||||
public class NccManageController {
|
||||
@Autowired
|
||||
private MapDataService mapDataService;
|
||||
|
||||
@PostMapping("saveOrUpdate")
|
||||
public void saveOrUpdate(@RequestBody NccMapDataVO dataVO){
|
||||
this.mapDataService.saveOrUpdate(dataVO);
|
||||
}
|
||||
|
||||
@GetMapping()
|
||||
public NccMapDataVO findId(Long id){
|
||||
return this.mapDataService.findById(id);
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/change/{state}")
|
||||
public void changeState(@PathVariable("id") Long id, @PathVariable("state") NccMapDataVO.MapDataEnum state){
|
||||
this.mapDataService.changeState(id,state);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package club.joylink.ncc.controller;
|
||||
|
||||
import club.joylink.ecs.World;
|
||||
import club.joylink.ecs.WorldManage;
|
||||
import club.joylink.ncc.dao.TestTDAO;
|
||||
import club.joylink.ncc.entity.TestT;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/login")
|
||||
public class NccTestController {
|
||||
|
||||
@Autowired
|
||||
private TestTDAO testTDAO ;
|
||||
@GetMapping(path = "/getUserInfo2")
|
||||
public TestT d(){
|
||||
|
||||
TestT tt = testTDAO.selectByPrimaryKey(1L);
|
||||
return tt;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package club.joylink.ncc.dao;
|
||||
|
||||
import club.joylink.ncc.entity.NccMapData;
|
||||
import club.joylink.ncc.entity.NccMapDataExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface NccMapDataDAO {
|
||||
long countByExample(NccMapDataExample example);
|
||||
|
||||
int deleteByExample(NccMapDataExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(NccMapData record);
|
||||
|
||||
int insertSelective(NccMapData record);
|
||||
|
||||
List<NccMapData> selectByExampleWithBLOBs(NccMapDataExample example);
|
||||
|
||||
List<NccMapData> selectByExample(NccMapDataExample example);
|
||||
|
||||
NccMapData selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") NccMapData record, @Param("example") NccMapDataExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") NccMapData record, @Param("example") NccMapDataExample example);
|
||||
|
||||
int updateByExample(@Param("record") NccMapData record, @Param("example") NccMapDataExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(NccMapData record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(NccMapData record);
|
||||
|
||||
int updateByPrimaryKey(NccMapData record);
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package club.joylink.ncc.dao;
|
||||
|
||||
import club.joylink.ncc.entity.TestT;
|
||||
import club.joylink.ncc.entity.TestTExample;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface TestTDAO {
|
||||
long countByExample(TestTExample example);
|
||||
|
||||
int deleteByExample(TestTExample example);
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(TestT record);
|
||||
|
||||
int insertSelective(TestT record);
|
||||
|
||||
List<TestT> selectByExample(TestTExample example);
|
||||
|
||||
TestT selectByPrimaryKey(Long id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TestT record, @Param("example") TestTExample example);
|
||||
|
||||
int updateByExample(@Param("record") TestT record, @Param("example") TestTExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TestT record);
|
||||
|
||||
int updateByPrimaryKey(TestT record);
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package club.joylink.ncc.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import club.joylink.ncc.vo.NccMapDataVO;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class NccMapData implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 状态0=发布,1=编辑,2=删除
|
||||
*/
|
||||
private NccMapDataVO.MapDataEnum state;
|
||||
|
||||
private byte[] mapData;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package club.joylink.rtss.iscs.entity;
|
||||
package club.joylink.ncc.entity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class IscsModelDataExample {
|
||||
public class NccMapDataExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
@ -15,7 +15,7 @@ public class IscsModelDataExample {
|
|||
|
||||
private Long offset;
|
||||
|
||||
public IscsModelDataExample() {
|
||||
public NccMapDataExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
|
@ -185,213 +185,73 @@ public class IscsModelDataExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemIsNull() {
|
||||
addCriterion("`system` is null");
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("`name` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemIsNotNull() {
|
||||
addCriterion("`system` is not null");
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("`name` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemEqualTo(String value) {
|
||||
addCriterion("`system` =", value, "system");
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("`name` =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemNotEqualTo(String value) {
|
||||
addCriterion("`system` <>", value, "system");
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("`name` <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemGreaterThan(String value) {
|
||||
addCriterion("`system` >", value, "system");
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("`name` >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`system` >=", value, "system");
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`name` >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemLessThan(String value) {
|
||||
addCriterion("`system` <", value, "system");
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("`name` <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemLessThanOrEqualTo(String value) {
|
||||
addCriterion("`system` <=", value, "system");
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("`name` <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemLike(String value) {
|
||||
addCriterion("`system` like", value, "system");
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("`name` like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemNotLike(String value) {
|
||||
addCriterion("`system` not like", value, "system");
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("`name` not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemIn(List<String> values) {
|
||||
addCriterion("`system` in", values, "system");
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("`name` in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemNotIn(List<String> values) {
|
||||
addCriterion("`system` not in", values, "system");
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("`name` not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemBetween(String value1, String value2) {
|
||||
addCriterion("`system` between", value1, value2, "system");
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("`name` between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andSystemNotBetween(String value1, String value2) {
|
||||
addCriterion("`system` not between", value1, value2, "system");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewIsNull() {
|
||||
addCriterion("`view` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewIsNotNull() {
|
||||
addCriterion("`view` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewEqualTo(String value) {
|
||||
addCriterion("`view` =", value, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewNotEqualTo(String value) {
|
||||
addCriterion("`view` <>", value, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewGreaterThan(String value) {
|
||||
addCriterion("`view` >", value, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`view` >=", value, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewLessThan(String value) {
|
||||
addCriterion("`view` <", value, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewLessThanOrEqualTo(String value) {
|
||||
addCriterion("`view` <=", value, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewLike(String value) {
|
||||
addCriterion("`view` like", value, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewNotLike(String value) {
|
||||
addCriterion("`view` not like", value, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewIn(List<String> values) {
|
||||
addCriterion("`view` in", values, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewNotIn(List<String> values) {
|
||||
addCriterion("`view` not in", values, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewBetween(String value1, String value2) {
|
||||
addCriterion("`view` between", value1, value2, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andViewNotBetween(String value1, String value2) {
|
||||
addCriterion("`view` not between", value1, value2, "view");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceIsNull() {
|
||||
addCriterion("place is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceIsNotNull() {
|
||||
addCriterion("place is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceEqualTo(String value) {
|
||||
addCriterion("place =", value, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceNotEqualTo(String value) {
|
||||
addCriterion("place <>", value, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceGreaterThan(String value) {
|
||||
addCriterion("place >", value, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("place >=", value, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceLessThan(String value) {
|
||||
addCriterion("place <", value, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceLessThanOrEqualTo(String value) {
|
||||
addCriterion("place <=", value, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceLike(String value) {
|
||||
addCriterion("place like", value, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceNotLike(String value) {
|
||||
addCriterion("place not like", value, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceIn(List<String> values) {
|
||||
addCriterion("place in", values, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceNotIn(List<String> values) {
|
||||
addCriterion("place not in", values, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceBetween(String value1, String value2) {
|
||||
addCriterion("place between", value1, value2, "place");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPlaceNotBetween(String value1, String value2) {
|
||||
addCriterion("place not between", value1, value2, "place");
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("`name` not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
|
@ -405,52 +265,52 @@ public class IscsModelDataExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
|
||||
public Criteria andCreateTimeEqualTo(Date value) {
|
||||
addCriterion("create_time =", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
|
||||
public Criteria andCreateTimeNotEqualTo(Date value) {
|
||||
addCriterion("create_time <>", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
|
||||
public Criteria andCreateTimeGreaterThan(Date value) {
|
||||
addCriterion("create_time >", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time >=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThan(LocalDateTime value) {
|
||||
public Criteria andCreateTimeLessThan(Date value) {
|
||||
addCriterion("create_time <", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("create_time <=", value, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
|
||||
public Criteria andCreateTimeIn(List<Date> values) {
|
||||
addCriterion("create_time in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
|
||||
public Criteria andCreateTimeNotIn(List<Date> values) {
|
||||
addCriterion("create_time not in", values, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
public Criteria andCreateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("create_time not between", value1, value2, "createTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
@ -465,55 +325,125 @@ public class IscsModelDataExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeEqualTo(LocalDateTime value) {
|
||||
public Criteria andUpdateTimeEqualTo(Date value) {
|
||||
addCriterion("update_time =", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) {
|
||||
public Criteria andUpdateTimeNotEqualTo(Date value) {
|
||||
addCriterion("update_time <>", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThan(LocalDateTime value) {
|
||||
public Criteria andUpdateTimeGreaterThan(Date value) {
|
||||
addCriterion("update_time >", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) {
|
||||
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time >=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThan(LocalDateTime value) {
|
||||
public Criteria andUpdateTimeLessThan(Date value) {
|
||||
addCriterion("update_time <", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) {
|
||||
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
|
||||
addCriterion("update_time <=", value, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeIn(List<LocalDateTime> values) {
|
||||
public Criteria andUpdateTimeIn(List<Date> values) {
|
||||
addCriterion("update_time in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotIn(List<LocalDateTime> values) {
|
||||
public Criteria andUpdateTimeNotIn(List<Date> values) {
|
||||
addCriterion("update_time not in", values, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
|
||||
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
|
||||
addCriterion("update_time not between", value1, value2, "updateTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateIsNull() {
|
||||
addCriterion("`state` is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateIsNotNull() {
|
||||
addCriterion("`state` is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateEqualTo(String value) {
|
||||
addCriterion("`state` =", value, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateNotEqualTo(String value) {
|
||||
addCriterion("`state` <>", value, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateGreaterThan(String value) {
|
||||
addCriterion("`state` >", value, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("`state` >=", value, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateLessThan(String value) {
|
||||
addCriterion("`state` <", value, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateLessThanOrEqualTo(String value) {
|
||||
addCriterion("`state` <=", value, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateLike(String value) {
|
||||
addCriterion("`state` like", value, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateNotLike(String value) {
|
||||
addCriterion("`state` not like", value, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateIn(List<String> values) {
|
||||
addCriterion("`state` in", values, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateNotIn(List<String> values) {
|
||||
addCriterion("`state` not in", values, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateBetween(String value1, String value2) {
|
||||
addCriterion("`state` between", value1, value2, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStateNotBetween(String value1, String value2) {
|
||||
addCriterion("`state` not between", value1, value2, "state");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
|
@ -0,0 +1,17 @@
|
|||
package club.joylink.ncc.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class TestT implements Serializable {
|
||||
private Long id;
|
||||
|
||||
private String userName;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,352 @@
|
|||
package club.joylink.ncc.entity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TestTExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
private Integer limit;
|
||||
|
||||
private Long offset;
|
||||
|
||||
public TestTExample() {
|
||||
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 andUserNameIsNull() {
|
||||
addCriterion("user_name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameIsNotNull() {
|
||||
addCriterion("user_name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameEqualTo(String value) {
|
||||
addCriterion("user_name =", value, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameNotEqualTo(String value) {
|
||||
addCriterion("user_name <>", value, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameGreaterThan(String value) {
|
||||
addCriterion("user_name >", value, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("user_name >=", value, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameLessThan(String value) {
|
||||
addCriterion("user_name <", value, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("user_name <=", value, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameLike(String value) {
|
||||
addCriterion("user_name like", value, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameNotLike(String value) {
|
||||
addCriterion("user_name not like", value, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameIn(List<String> values) {
|
||||
addCriterion("user_name in", values, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameNotIn(List<String> values) {
|
||||
addCriterion("user_name not in", values, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameBetween(String value1, String value2) {
|
||||
addCriterion("user_name between", value1, value2, "userName");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUserNameNotBetween(String value1, String value2) {
|
||||
addCriterion("user_name not between", value1, value2, "userName");
|
||||
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,9 @@
|
|||
package club.joylink.ncc.services;
|
||||
|
||||
import club.joylink.ecs.World;
|
||||
|
||||
public interface EcsSystem {
|
||||
void addSystem(World world);
|
||||
Object type();
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package club.joylink.ncc.services;
|
||||
|
||||
import club.joylink.ncc.entity.NccMapData;
|
||||
import club.joylink.ncc.vo.NccMapDataVO;
|
||||
|
||||
public interface MapDataService {
|
||||
NccMapDataVO findById(Long id);
|
||||
|
||||
void saveOrUpdate(NccMapDataVO mapDataVO);
|
||||
|
||||
void changeState(Long id, NccMapDataVO.MapDataEnum state);
|
||||
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package club.joylink.ncc.services.impl;
|
||||
|
||||
import club.joylink.exception.BusinessExceptionAssertEnum;
|
||||
import club.joylink.ncc.dao.NccMapDataDAO;
|
||||
import club.joylink.ncc.entity.NccMapData;
|
||||
import club.joylink.ncc.services.MapDataService;
|
||||
import club.joylink.ncc.vo.NccMapDataVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@Transactional
|
||||
public class MapDataServiceImpl implements MapDataService {
|
||||
|
||||
@Autowired
|
||||
private NccMapDataDAO nccMapDataDAO;
|
||||
|
||||
private NccMapData byId(Long id){
|
||||
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(Objects.nonNull(id),"id信息不能为空");
|
||||
NccMapData nccMapData = this.nccMapDataDAO.selectByPrimaryKey(id);
|
||||
BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.nonNull(nccMapData),"未找到对应的数据");
|
||||
return nccMapData;
|
||||
}
|
||||
@Override
|
||||
public NccMapDataVO findById(Long id) {
|
||||
NccMapData mapData = this.byId(id);
|
||||
return new NccMapDataVO(mapData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveOrUpdate(NccMapDataVO mapDataVO) {
|
||||
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(Objects.nonNull(mapDataVO.getName()),"名称信息不能为空");
|
||||
NccMapData mapData = mapDataVO.convert();
|
||||
|
||||
LocalDateTime dateTime = LocalDateTime.now();
|
||||
if(Objects.nonNull(mapData.getId())){
|
||||
mapData = this.byId(mapData.getId());
|
||||
|
||||
mapData.setMapData(mapData.getMapData());
|
||||
mapData.setUpdateTime(dateTime);
|
||||
this.nccMapDataDAO.updateByPrimaryKey(mapData);
|
||||
}else{
|
||||
mapData.setState(NccMapDataVO.MapDataEnum.EDIT);
|
||||
mapData.setCreateTime(dateTime);
|
||||
mapData.setUpdateTime(dateTime);
|
||||
this.nccMapDataDAO.insert(mapData);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void changeState(Long id, NccMapDataVO.MapDataEnum state) {
|
||||
this.byId(id);
|
||||
NccMapData newData = new NccMapData();
|
||||
newData.setId(id);
|
||||
newData.setUpdateTime(LocalDateTime.now());
|
||||
newData.setState(state);
|
||||
this.nccMapDataDAO.updateByPrimaryKeySelective(newData);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package club.joylink.ncc.vo;
|
||||
|
||||
import club.joylink.ncc.entity.NccMapData;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class NccMapDataVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 5757927953903823727L;
|
||||
private Long id;
|
||||
private String name;
|
||||
private byte[] data;
|
||||
private MapDataEnum state;
|
||||
public NccMapDataVO(NccMapData mapData){
|
||||
this.id = mapData.getId();
|
||||
this.name = mapData.getName();
|
||||
this.data = mapData.getMapData();
|
||||
this.state = mapData.getState();
|
||||
}
|
||||
|
||||
public NccMapData convert(){
|
||||
NccMapData mapData = new NccMapData();
|
||||
mapData.setMapData(this.data);
|
||||
mapData.setId(this.id);
|
||||
mapData.setName(this.name);
|
||||
mapData.setState(this.getState());
|
||||
return mapData;
|
||||
}
|
||||
public enum MapDataEnum{
|
||||
PUBLISH,EDIT,DELETE;
|
||||
}
|
||||
}
|
|
@ -1,16 +1,15 @@
|
|||
<?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.iscs.dao.IscsModelDataDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.rtss.iscs.entity.IscsModelData">
|
||||
<mapper namespace="club.joylink.ncc.dao.NccMapDataDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.ncc.entity.NccMapData">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="system" jdbcType="VARCHAR" property="system" />
|
||||
<result column="view" jdbcType="VARCHAR" property="view" />
|
||||
<result column="place" jdbcType="VARCHAR" property="place" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="state" jdbcType="VARCHAR" property="state" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.iscs.entity.IscsModelData">
|
||||
<result column="data" jdbcType="LONGVARBINARY" property="data" />
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.ncc.entity.NccMapData">
|
||||
<result column="map_data" jdbcType="LONGVARBINARY" property="mapData" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -71,12 +70,12 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `system`, `view`, place, create_time, update_time
|
||||
id, `name`, create_time, update_time, `state`
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
`data`
|
||||
map_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.iscs.entity.IscsModelDataExample" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.ncc.entity.NccMapDataExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
|
@ -84,7 +83,7 @@
|
|||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from rts_iscs_model_data
|
||||
from ncc_map_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -100,13 +99,13 @@
|
|||
</if>
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="club.joylink.rtss.iscs.entity.IscsModelDataExample" resultMap="BaseResultMap">
|
||||
<select id="selectByExample" parameterType="club.joylink.ncc.entity.NccMapDataExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from rts_iscs_model_data
|
||||
from ncc_map_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -127,41 +126,30 @@
|
|||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from rts_iscs_model_data
|
||||
from ncc_map_data
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from rts_iscs_model_data
|
||||
delete from ncc_map_data
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.rtss.iscs.entity.IscsModelDataExample">
|
||||
delete from rts_iscs_model_data
|
||||
<delete id="deleteByExample" parameterType="club.joylink.ncc.entity.NccMapDataExample">
|
||||
delete from ncc_map_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="club.joylink.rtss.iscs.entity.IscsModelData">
|
||||
insert into rts_iscs_model_data (id, `system`, `view`,
|
||||
place, create_time, update_time,
|
||||
`data`)
|
||||
values (#{id,jdbcType=BIGINT}, #{system,jdbcType=VARCHAR}, #{view,jdbcType=VARCHAR},
|
||||
#{place,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
||||
#{data,jdbcType=LONGVARBINARY})
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.ncc.entity.NccMapData" useGeneratedKeys="true">
|
||||
insert into ncc_map_data (`name`, create_time, update_time,
|
||||
`state`, map_data)
|
||||
values (#{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
||||
#{state,jdbcType=VARCHAR}, #{mapData,jdbcType=LONGVARBINARY})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="club.joylink.rtss.iscs.entity.IscsModelData">
|
||||
insert into rts_iscs_model_data
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.ncc.entity.NccMapData" useGeneratedKeys="true">
|
||||
insert into ncc_map_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="system != null">
|
||||
`system`,
|
||||
</if>
|
||||
<if test="view != null">
|
||||
`view`,
|
||||
</if>
|
||||
<if test="place != null">
|
||||
place,
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
|
@ -169,22 +157,16 @@
|
|||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="data != null">
|
||||
`data`,
|
||||
<if test="state != null">
|
||||
`state`,
|
||||
</if>
|
||||
<if test="mapData != null">
|
||||
map_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="system != null">
|
||||
#{system,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="view != null">
|
||||
#{view,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="place != null">
|
||||
#{place,jdbcType=VARCHAR},
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
|
@ -192,31 +174,28 @@
|
|||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
#{data,jdbcType=LONGVARBINARY},
|
||||
<if test="state != null">
|
||||
#{state,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapData != null">
|
||||
#{mapData,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.iscs.entity.IscsModelDataExample" resultType="java.lang.Long">
|
||||
select count(*) from rts_iscs_model_data
|
||||
<select id="countByExample" parameterType="club.joylink.ncc.entity.NccMapDataExample" resultType="java.lang.Long">
|
||||
select count(*) from ncc_map_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update rts_iscs_model_data
|
||||
update ncc_map_data
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.system != null">
|
||||
`system` = #{record.system,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.view != null">
|
||||
`view` = #{record.view,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.place != null">
|
||||
place = #{record.place,jdbcType=VARCHAR},
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
|
@ -224,8 +203,11 @@
|
|||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.data != null">
|
||||
`data` = #{record.data,jdbcType=LONGVARBINARY},
|
||||
<if test="record.state != null">
|
||||
`state` = #{record.state,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapData != null">
|
||||
map_data = #{record.mapData,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
|
@ -233,41 +215,33 @@
|
|||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update rts_iscs_model_data
|
||||
update ncc_map_data
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`system` = #{record.system,jdbcType=VARCHAR},
|
||||
`view` = #{record.view,jdbcType=VARCHAR},
|
||||
place = #{record.place,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
`data` = #{record.data,jdbcType=LONGVARBINARY}
|
||||
`state` = #{record.state,jdbcType=VARCHAR},
|
||||
map_data = #{record.mapData,jdbcType=LONGVARBINARY}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update rts_iscs_model_data
|
||||
update ncc_map_data
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`system` = #{record.system,jdbcType=VARCHAR},
|
||||
`view` = #{record.view,jdbcType=VARCHAR},
|
||||
place = #{record.place,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
`state` = #{record.state,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.rtss.iscs.entity.IscsModelData">
|
||||
update rts_iscs_model_data
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.ncc.entity.NccMapData">
|
||||
update ncc_map_data
|
||||
<set>
|
||||
<if test="system != null">
|
||||
`system` = #{system,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="view != null">
|
||||
`view` = #{view,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="place != null">
|
||||
place = #{place,jdbcType=VARCHAR},
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
|
@ -275,29 +249,30 @@
|
|||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
`data` = #{data,jdbcType=LONGVARBINARY},
|
||||
<if test="state != null">
|
||||
`state` = #{state,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapData != null">
|
||||
map_data = #{mapData,jdbcType=LONGVARBINARY},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.rtss.iscs.entity.IscsModelData">
|
||||
update rts_iscs_model_data
|
||||
set `system` = #{system,jdbcType=VARCHAR},
|
||||
`view` = #{view,jdbcType=VARCHAR},
|
||||
place = #{place,jdbcType=VARCHAR},
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="club.joylink.ncc.entity.NccMapData">
|
||||
update ncc_map_data
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
`data` = #{data,jdbcType=LONGVARBINARY}
|
||||
`state` = #{state,jdbcType=VARCHAR},
|
||||
map_data = #{mapData,jdbcType=LONGVARBINARY}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.iscs.entity.IscsModelData">
|
||||
update rts_iscs_model_data
|
||||
set `system` = #{system,jdbcType=VARCHAR},
|
||||
`view` = #{view,jdbcType=VARCHAR},
|
||||
place = #{place,jdbcType=VARCHAR},
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.ncc.entity.NccMapData">
|
||||
update ncc_map_data
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
`state` = #{state,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,166 @@
|
|||
<?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.ncc.dao.TestTDAO">
|
||||
<resultMap id="BaseResultMap" type="club.joylink.ncc.entity.TestT">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||
</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, user_name
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="club.joylink.ncc.entity.TestTExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from test_t
|
||||
<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 test_t
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from test_t
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="club.joylink.ncc.entity.TestTExample">
|
||||
delete from test_t
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.ncc.entity.TestT" useGeneratedKeys="true">
|
||||
insert into test_t (user_name)
|
||||
values (#{userName,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.ncc.entity.TestT" useGeneratedKeys="true">
|
||||
insert into test_t
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null">
|
||||
user_name,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null">
|
||||
#{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.ncc.entity.TestTExample" resultType="java.lang.Long">
|
||||
select count(*) from test_t
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update test_t
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userName != null">
|
||||
user_name = #{record.userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update test_t
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
user_name = #{record.userName,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="club.joylink.ncc.entity.TestT">
|
||||
update test_t
|
||||
<set>
|
||||
<if test="userName != null">
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.ncc.entity.TestT">
|
||||
update test_t
|
||||
set user_name = #{userName,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,79 @@
|
|||
package club.joylink.ncc;
|
||||
|
||||
import club.joylink.ncc.proto.LineProto;
|
||||
import club.joylink.ncc.proto.RoadSectionProto;
|
||||
import club.joylink.ncc.proto.StationProto;
|
||||
import club.joylink.ncc.proto.StorageProto;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
public class Data {
|
||||
public StorageProto.Storage createStorage(){
|
||||
StorageProto.Storage.Builder storageBuild = StorageProto.Storage.newBuilder();
|
||||
createLine(storageBuild);
|
||||
this.createStation(storageBuild);
|
||||
this.createSection(storageBuild);
|
||||
return storageBuild.build();
|
||||
}
|
||||
|
||||
private void createLine(StorageProto.Storage.Builder storageBuild){
|
||||
|
||||
for(var i = 1 ; i <=1;i++){
|
||||
LineProto.Line.Builder lineBuild = LineProto.Line.newBuilder();
|
||||
String code = Strings.padStart(i + "",4,'0');
|
||||
lineBuild.setCode("line-" + code);
|
||||
lineBuild.setName("line-" + code);
|
||||
storageBuild.addLines(lineBuild);
|
||||
}
|
||||
|
||||
}
|
||||
private void createStation(StorageProto.Storage.Builder storageBuild){
|
||||
for(var d = 1 ; d <= 20;d++){
|
||||
StationProto.Station.Builder stationBuild = StationProto.Station.newBuilder();
|
||||
String code = Strings.padStart(d + "",4,'0');
|
||||
String nameCode = "station-" + code;
|
||||
stationBuild.setCode(nameCode);
|
||||
stationBuild.setName(nameCode);
|
||||
stationBuild.setTransfer(false);
|
||||
if(d % 2 == 0){
|
||||
stationBuild.setTransfer(true);
|
||||
}
|
||||
storageBuild.addStations(stationBuild);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void createSection(StorageProto.Storage.Builder storageBuild){
|
||||
String lineCode = "line-001";
|
||||
for(var i = 1 ; i <= 19;i++){
|
||||
RoadSectionProto.RoadSection.Builder section = RoadSectionProto.RoadSection.newBuilder();
|
||||
String code = Strings.padStart(i + "",4,'0');
|
||||
String nameCode = "section-" + code;
|
||||
section.setCode(nameCode);
|
||||
section.setName(nameCode);
|
||||
|
||||
section.setLeftStationId(this.findStartStation(i));
|
||||
section.setRightStationId(this.findEndStation(i,19));
|
||||
section.setLineId(lineCode);
|
||||
storageBuild.addSections(section);
|
||||
}
|
||||
}
|
||||
private String findStartStation(int d){
|
||||
int tmpD = d;
|
||||
if(d <= 1){
|
||||
tmpD = 1;
|
||||
}/*else{
|
||||
--tmpD;
|
||||
}*/
|
||||
String code = Strings.padStart(tmpD + "",4,'0');
|
||||
return String.format("station-%s",code);
|
||||
}
|
||||
|
||||
private String findEndStation(int d ,int max){
|
||||
int tmpD = d + 1;
|
||||
if(d > max){
|
||||
tmpD = d;
|
||||
}
|
||||
String code = Strings.padStart(tmpD + "",4,'0');
|
||||
return String.format("station-%s",code);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package club.joylink.ncc;
|
||||
|
||||
import club.joylink.ecs.World;
|
||||
import club.joylink.ecs.WorldManage;
|
||||
import club.joylink.ncc.proto.LineProto;
|
||||
import club.joylink.ncc.proto.RoadSectionProto;
|
||||
import club.joylink.ncc.proto.StationProto;
|
||||
import club.joylink.ncc.proto.StorageProto;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
public class Service {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Service service = new Service();
|
||||
StorageProto.Storage storage = service.loadData();
|
||||
|
||||
}
|
||||
|
||||
public void addTrain(boolean upWay){
|
||||
|
||||
}
|
||||
|
||||
|
||||
private StorageProto.Storage loadData(){
|
||||
Data data = new Data();
|
||||
StorageProto.Storage storageBuild = data.createStorage();
|
||||
Map<String,LineProto.Line> tmpLineMap = storageBuild.getLinesList().stream().collect(Collectors.toMap(k->k.getCode(), Function.identity()));
|
||||
lineMap.putAll(tmpLineMap);
|
||||
Map<String,StationProto.Station> tmpStationMaper = storageBuild.getStationsList().stream().collect(Collectors.toMap(d->d.getCode(),Function.identity()));
|
||||
for (RoadSectionProto.RoadSection rs : storageBuild.getSectionsList()) {
|
||||
List<StationProto.Station> stationList = lineIdStationMap.computeIfAbsent(rs.getLineId(),k-> Lists.newArrayList());
|
||||
if(stationList.stream().noneMatch(d-> Objects.equals(d.getCode(),rs.getLeftStationId()))){
|
||||
stationList.add(tmpStationMaper.get(rs.getLeftStationId()));
|
||||
}
|
||||
if(stationList.stream().noneMatch(d-> Objects.equals(d.getCode(),rs.getRightStationId()))){
|
||||
stationList.add(tmpStationMaper.get(rs.getRightStationId()));
|
||||
}
|
||||
}
|
||||
return storageBuild;
|
||||
}
|
||||
private static Map<String, LineProto.Line> lineMap = new ConcurrentHashMap<>();
|
||||
private static Map<String, List<StationProto.Station>> lineIdStationMap = new ConcurrentHashMap<>();
|
||||
}
|
62
pom.xml
62
pom.xml
|
@ -2,20 +2,26 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>ncc</module>
|
||||
<module>rtss</module>
|
||||
<module>common</module>
|
||||
</modules>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.3.5.RELEASE</version>
|
||||
<version>2.7.7</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>club.joylink</groupId>
|
||||
<artifactId>rtss</artifactId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>rtss</name>
|
||||
<name>parent</name>
|
||||
<description> Rail transit simulation system</description>
|
||||
|
||||
<properties>
|
||||
<java.version>11</java.version>
|
||||
<java.version>17</java.version>
|
||||
<pagehelper.version>4.1.1</pagehelper.version>
|
||||
</properties>
|
||||
|
||||
|
@ -140,55 +146,9 @@
|
|||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</dependency>
|
||||
<!-- iscs -->
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>3.19.3</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.github.shalousun</groupId>
|
||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||
<version>2.1.9</version>
|
||||
<configuration>
|
||||
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
|
||||
<configFile>./src/main/resources/smart-doc.json</configFile>
|
||||
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码,如果一些框架依赖库加载不到导致报错,这时请使用excludes排除掉-->
|
||||
<!-- <excludes>-->
|
||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||
<!-- <exclude>com.alibaba:fastjson</exclude>-->
|
||||
<!-- </excludes>-->
|
||||
<!-- <!–自1.0.8版本开始,插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载,因此使用时需要注意–>-->
|
||||
<!-- <!–smart-doc能自动分析依赖树加载所有依赖源码,原则上会影响文档构建效率,因此你可以使用includes来让插件加载你配置的组件–>-->
|
||||
<!-- <includes>-->
|
||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||
<!-- <include>com.alibaba:fastjson</include>-->
|
||||
<!-- </includes>-->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
|
||||
<!-- <phase>compile</phase>-->
|
||||
<goals>
|
||||
<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
|
||||
<goal>html</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>club.joylink</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>rtss</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<artifactId>ncc</artifactId>
|
||||
<groupId>club.joylink</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<artifactId>common</artifactId>
|
||||
<groupId>club.joylink</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>club.joylink.rtss.RtssApplication</mainClass>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- <plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
</configuration>
|
||||
</plugin>-->
|
||||
|
||||
<plugin>
|
||||
<groupId>com.github.shalousun</groupId>
|
||||
<artifactId>smart-doc-maven-plugin</artifactId>
|
||||
<version>2.1.9</version>
|
||||
<configuration>
|
||||
<!--指定生成文档的使用的配置文件,配置文件放在自己的项目中-->
|
||||
<configFile>./src/main/resources/smart-doc.json</configFile>
|
||||
<!--smart-doc实现自动分析依赖树加载第三方依赖的源码,如果一些框架依赖库加载不到导致报错,这时请使用excludes排除掉-->
|
||||
<!-- <excludes>-->
|
||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||
<!-- <exclude>com.alibaba:fastjson</exclude>-->
|
||||
<!-- </excludes>-->
|
||||
<!-- <!–自1.0.8版本开始,插件提供includes支持,配置了includes后插件会按照用户配置加载而不是自动加载,因此使用时需要注意–>-->
|
||||
<!-- <!–smart-doc能自动分析依赖树加载所有依赖源码,原则上会影响文档构建效率,因此你可以使用includes来让插件加载你配置的组件–>-->
|
||||
<!-- <includes>-->
|
||||
<!-- <!–格式为:groupId:artifactId;参考如下–>-->
|
||||
<!-- <include>com.alibaba:fastjson</include>-->
|
||||
<!-- </includes>-->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<!--如果不需要在执行编译时启动smart-doc,则将phase注释掉-->
|
||||
<!-- <phase>compile</phase>-->
|
||||
<goals>
|
||||
<!--smart-doc提供了html、openapi、markdown等goal,可按需配置-->
|
||||
<goal>html</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -6,10 +6,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@SpringBootApplication
|
||||
@SpringBootApplication(scanBasePackages = {"club.joylink"})
|
||||
@EnableScheduling
|
||||
@EnableCaching
|
||||
@MapperScan(basePackages = {"club.joylink.rtss.dao","club.joylink.rtss.iscs.dao"})
|
||||
@MapperScan(basePackages = {"club.joylink.rtss.dao","club.joylink.rtss.iscs.dao","club.joylink.ncc.dao"})
|
||||
//@EnableRetry
|
||||
public class RtssApplication {
|
||||
|
|
@ -11,7 +11,8 @@ public class CrosConfiguration {
|
|||
|
||||
private CorsConfiguration buildConfig() {
|
||||
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||
corsConfiguration.addAllowedOrigin("*"); // 1
|
||||
corsConfiguration.addAllowedOriginPattern("*");
|
||||
// corsConfiguration.addAllowedOrigin("*"); // 1
|
||||
corsConfiguration.addAllowedHeader("*"); // 2
|
||||
corsConfiguration.addAllowedMethod("*"); // 3
|
||||
corsConfiguration.setAllowCredentials(true);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue