This commit is contained in:
xzb 2022-12-05 10:30:17 +08:00
parent cb12f654a2
commit 9f53eb27df
9 changed files with 903 additions and 0 deletions

Binary file not shown.

13
pom.xml
View File

@ -140,6 +140,19 @@
<artifactId>pinyin4j</artifactId> <artifactId>pinyin4j</artifactId>
<version>2.5.0</version> <version>2.5.0</version>
</dependency> </dependency>
<!-- iscs -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.19.3</version>
</dependency>
<dependency>
<groupId>club.joylink</groupId>
<artifactId>iscs-message</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/iscs-message-0.0.1-SNAPSHOT.jar</systemPath>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -0,0 +1,33 @@
/*
Navicat Premium Data Transfer
Source Server : room
Source Server Type : MySQL
Source Server Version : 80029
Source Host : 192.168.3.233:3306
Source Schema : joylink
Target Server Type : MySQL
Target Server Version : 80029
File Encoding : 65001
Date: 05/12/2022 09:17:49
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for rts_iscs_model_data
-- ----------------------------
DROP TABLE IF EXISTS `rts_iscs_model_data`;
CREATE TABLE `rts_iscs_model_data` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'iscs数据模型id',
`system` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'iscs一级系统(如FAS、PIS、AFC等)',
`view` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'iscs二级视图',
`place` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场所(车站、变电所、停车场等)',
`data` blob NULL COMMENT '场所整个所有的模型的数据',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1,13 @@
package club.joylink.rtss.iscs.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* iscs 模型数据处理接口
*/
@RestController
@RequestMapping("/api/v1/iscs/model/data")
public class IscsModelDataController {
}

View File

@ -0,0 +1,40 @@
package club.joylink.rtss.iscs.dao;
import club.joylink.rtss.iscs.entity.IscsModelData;
import club.joylink.rtss.iscs.entity.IscsModelDataExample;
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 IscsModelDataDAO {
long countByExample(IscsModelDataExample example);
int deleteByExample(IscsModelDataExample example);
int deleteByPrimaryKey(Long id);
int insert(IscsModelData record);
int insertSelective(IscsModelData record);
List<IscsModelData> selectByExampleWithBLOBs(IscsModelDataExample example);
List<IscsModelData> selectByExample(IscsModelDataExample example);
IscsModelData selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") IscsModelData record, @Param("example") IscsModelDataExample example);
int updateByExampleWithBLOBs(@Param("record") IscsModelData record, @Param("example") IscsModelDataExample example);
int updateByExample(@Param("record") IscsModelData record, @Param("example") IscsModelDataExample example);
int updateByPrimaryKeySelective(IscsModelData record);
int updateByPrimaryKeyWithBLOBs(IscsModelData record);
int updateByPrimaryKey(IscsModelData record);
}

View File

@ -0,0 +1,38 @@
package club.joylink.rtss.iscs.entity;
import java.io.Serializable;
import lombok.Data;
/**
* @author
*
*/
@Data
public class IscsModelData implements Serializable {
/**
* iscs数据模型id
*/
private Long id;
/**
* iscs一级系统(如FASPISAFC等)
*/
private String system;
/**
* iscs二级视图
*/
private String view;
/**
* 场所(车站变电所停车场等)
*/
private String place;
/**
* 场所整个所有的模型的数据
*/
private byte[] data;
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,492 @@
package club.joylink.rtss.iscs.entity;
import java.util.ArrayList;
import java.util.List;
public class IscsModelDataExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public IscsModelDataExample() {
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 andSystemIsNull() {
addCriterion("`system` is null");
return (Criteria) this;
}
public Criteria andSystemIsNotNull() {
addCriterion("`system` is not null");
return (Criteria) this;
}
public Criteria andSystemEqualTo(String value) {
addCriterion("`system` =", value, "system");
return (Criteria) this;
}
public Criteria andSystemNotEqualTo(String value) {
addCriterion("`system` <>", value, "system");
return (Criteria) this;
}
public Criteria andSystemGreaterThan(String value) {
addCriterion("`system` >", value, "system");
return (Criteria) this;
}
public Criteria andSystemGreaterThanOrEqualTo(String value) {
addCriterion("`system` >=", value, "system");
return (Criteria) this;
}
public Criteria andSystemLessThan(String value) {
addCriterion("`system` <", value, "system");
return (Criteria) this;
}
public Criteria andSystemLessThanOrEqualTo(String value) {
addCriterion("`system` <=", value, "system");
return (Criteria) this;
}
public Criteria andSystemLike(String value) {
addCriterion("`system` like", value, "system");
return (Criteria) this;
}
public Criteria andSystemNotLike(String value) {
addCriterion("`system` not like", value, "system");
return (Criteria) this;
}
public Criteria andSystemIn(List<String> values) {
addCriterion("`system` in", values, "system");
return (Criteria) this;
}
public Criteria andSystemNotIn(List<String> values) {
addCriterion("`system` not in", values, "system");
return (Criteria) this;
}
public Criteria andSystemBetween(String value1, String value2) {
addCriterion("`system` between", value1, value2, "system");
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");
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);
}
}
}

View File

@ -0,0 +1,7 @@
package club.joylink.rtss.iscs.services;
import org.springframework.stereotype.Service;
@Service
public class IscsModelDataService {
}

View File

@ -0,0 +1,267 @@
<?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">
<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" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.iscs.entity.IscsModelData">
<result column="data" jdbcType="LONGVARBINARY" property="data" />
</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, `system`, `view`, place
</sql>
<sql id="Blob_Column_List">
`data`
</sql>
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.iscs.entity.IscsModelDataExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from rts_iscs_model_data
<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.iscs.entity.IscsModelDataExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from rts_iscs_model_data
<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 rts_iscs_model_data
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from rts_iscs_model_data
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="club.joylink.rtss.iscs.entity.IscsModelDataExample">
delete from rts_iscs_model_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, `data`)
values (#{id,jdbcType=BIGINT}, #{system,jdbcType=VARCHAR}, #{view,jdbcType=VARCHAR},
#{place,jdbcType=VARCHAR}, #{data,jdbcType=LONGVARBINARY})
</insert>
<insert id="insertSelective" parameterType="club.joylink.rtss.iscs.entity.IscsModelData">
insert into rts_iscs_model_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>
<if test="data != null">
`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>
<if test="data != null">
#{data,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
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update rts_iscs_model_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>
<if test="record.data != null">
`data` = #{record.data,jdbcType=LONGVARBINARY},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update rts_iscs_model_data
set id = #{record.id,jdbcType=BIGINT},
`system` = #{record.system,jdbcType=VARCHAR},
`view` = #{record.view,jdbcType=VARCHAR},
place = #{record.place,jdbcType=VARCHAR},
`data` = #{record.data,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
set id = #{record.id,jdbcType=BIGINT},
`system` = #{record.system,jdbcType=VARCHAR},
`view` = #{record.view,jdbcType=VARCHAR},
place = #{record.place,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
<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>
<if test="data != null">
`data` = #{data,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},
`data` = #{data,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}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>