地图绘制添加检查配置和发布时是否检查逻辑
地图数据添加相关配置字段
This commit is contained in:
parent
78459f3a1b
commit
79cc4b43b4
@ -2,7 +2,7 @@ ALTER TABLE `draft_map_route`
|
||||
MODIFY COLUMN `end_signal_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '终端信号机 编号' AFTER `start_signal_code`;
|
||||
|
||||
ALTER TABLE `draft_map`
|
||||
ADD COLUMN `init_pos_config` text NULL COMMENT '初始位置配置' AFTER `draw_way`,
|
||||
ADD COLUMN `init_pos_config` text NULL COMMENT '初始位置配置' AFTER `logic_data`,
|
||||
ADD COLUMN `check_config` text NULL COMMENT '数据检查配置' AFTER `init_pos_config`,
|
||||
ADD COLUMN `ci_generate_config` text NULL COMMENT '联锁数据生成配置' AFTER `check_config`,
|
||||
ADD COLUMN `big_screen_config` text NULL COMMENT '大屏配置' AFTER `ci_generate_config`;
|
||||
|
@ -15,13 +15,14 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@Api(tags = {"地图草稿数据管理接口"})
|
||||
@RestController
|
||||
@ -140,8 +141,11 @@ public class DraftMapController {
|
||||
public List<String> publish(@PathVariable Long id, @RequestBody @Validated(value = DraftMapPublishCheck.class) DraftMapVO draftMapVO,
|
||||
@ApiIgnore @RequestAttribute UserVO user) {
|
||||
MapDataVO mapData = iDraftMapService.getMapData(id);
|
||||
List<String> list = iDraftMapService.checkData(mapData);
|
||||
if (Objects.nonNull(list) && list.isEmpty()) {
|
||||
List<String> list = new ArrayList<>();
|
||||
if (mapData.getCheckConfig() == null || mapData.getCheckConfig().isCheck()) {
|
||||
list = iDraftMapService.checkData(mapData);
|
||||
}
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
iDraftMapService.publish(id, draftMapVO, user, mapData);
|
||||
}
|
||||
return list;
|
||||
|
@ -26,4 +26,9 @@ public class DraftMapRouteController {
|
||||
return this.draftMapRouteService.queryAllRoutes(id);
|
||||
}
|
||||
|
||||
@DeleteMapping("/{code}")
|
||||
public void delete(@PathVariable Long id, @PathVariable String code) {
|
||||
this.draftMapRouteService.deleteRoute(id, code);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,12 +4,14 @@ import club.joylink.rtss.entity.MapData;
|
||||
import club.joylink.rtss.entity.MapDataExample;
|
||||
import club.joylink.rtss.entity.MapDataWithBLOBs;
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface MapDataDAO {
|
||||
long countByExample(MapDataExample example);
|
||||
@ -46,6 +48,8 @@ public interface MapDataDAO {
|
||||
" <foreach collection=\"list\" item=\"entity\" separator=\",\"> " +
|
||||
" (#{entity.id,jdbcType=BIGINT}, #{entity.mapId,jdbcType=BIGINT}," +
|
||||
" #{entity.graphData,jdbcType=LONGVARCHAR}, #{entity.logicData,jdbcType=LONGVARCHAR}," +
|
||||
" #{entity.initPosConfig,jdbcType=LONGVARCHAR}, #{entity.checkConfig,jdbcType=LONGVARCHAR}," +
|
||||
" #{entity.ciGenerateConfig,jdbcType=LONGVARCHAR}, #{entity.bigScreenConfig,jdbcType=LONGVARCHAR}" +
|
||||
" #{entity.version, jdbcType=VARCHAR}, #{entity.time, jdbcType=TIMESTAMP}, #{entity.userId, jdbcType=BIGINT})"+
|
||||
" </foreach>" +
|
||||
"</script>")
|
||||
|
@ -33,10 +33,5 @@ public class DraftMap implements Serializable {
|
||||
*/
|
||||
private String lineCode;
|
||||
|
||||
/**
|
||||
* 图形绘制方式:0:旧;1:新方式
|
||||
*/
|
||||
private Byte drawWay;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -444,66 +444,6 @@ public class DraftMapExample {
|
||||
addCriterion("line_code not between", value1, value2, "lineCode");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayIsNull() {
|
||||
addCriterion("draw_way is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayIsNotNull() {
|
||||
addCriterion("draw_way is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayEqualTo(Byte value) {
|
||||
addCriterion("draw_way =", value, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayNotEqualTo(Byte value) {
|
||||
addCriterion("draw_way <>", value, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayGreaterThan(Byte value) {
|
||||
addCriterion("draw_way >", value, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayGreaterThanOrEqualTo(Byte value) {
|
||||
addCriterion("draw_way >=", value, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayLessThan(Byte value) {
|
||||
addCriterion("draw_way <", value, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayLessThanOrEqualTo(Byte value) {
|
||||
addCriterion("draw_way <=", value, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayIn(List<Byte> values) {
|
||||
addCriterion("draw_way in", values, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayNotIn(List<Byte> values) {
|
||||
addCriterion("draw_way not in", values, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayBetween(Byte value1, Byte value2) {
|
||||
addCriterion("draw_way between", value1, value2, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andDrawWayNotBetween(Byte value1, Byte value2) {
|
||||
addCriterion("draw_way not between", value1, value2, "drawWay");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,12 +1,15 @@
|
||||
package club.joylink.rtss.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* map_data
|
||||
* @author
|
||||
* 地图数据
|
||||
*/
|
||||
@Data
|
||||
public class MapData implements Serializable {
|
||||
private Long id;
|
||||
|
||||
@ -31,91 +34,4 @@ public class MapData implements Serializable {
|
||||
private Long userId;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getMapId() {
|
||||
return mapId;
|
||||
}
|
||||
|
||||
public void setMapId(Long mapId) {
|
||||
this.mapId = mapId;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void setVersion(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public LocalDateTime getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(LocalDateTime time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
MapData other = (MapData) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId()))
|
||||
&& (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
|
||||
&& (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
|
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode());
|
||||
result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
|
||||
result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
|
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", mapId=").append(mapId);
|
||||
sb.append(", version=").append(version);
|
||||
sb.append(", time=").append(time);
|
||||
sb.append(", userId=").append(userId);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -1,11 +1,14 @@
|
||||
package club.joylink.rtss.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* map_data
|
||||
* @author
|
||||
* 地图数据
|
||||
*/
|
||||
@Data
|
||||
public class MapDataWithBLOBs extends MapData implements Serializable {
|
||||
/**
|
||||
* 图形数据
|
||||
@ -17,69 +20,25 @@ public class MapDataWithBLOBs extends MapData implements Serializable {
|
||||
*/
|
||||
private String logicData;
|
||||
|
||||
/**
|
||||
* 初始位置配置
|
||||
*/
|
||||
private String initPosConfig;
|
||||
|
||||
/**
|
||||
* 数据检查配置
|
||||
*/
|
||||
private String checkConfig;
|
||||
|
||||
/**
|
||||
* 联锁数据生成配置
|
||||
*/
|
||||
private String ciGenerateConfig;
|
||||
|
||||
/**
|
||||
* 大屏配置
|
||||
*/
|
||||
private String bigScreenConfig;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getGraphData() {
|
||||
return graphData;
|
||||
}
|
||||
|
||||
public void setGraphData(String graphData) {
|
||||
this.graphData = graphData;
|
||||
}
|
||||
|
||||
public String getLogicData() {
|
||||
return logicData;
|
||||
}
|
||||
|
||||
public void setLogicData(String logicData) {
|
||||
this.logicData = logicData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
MapDataWithBLOBs other = (MapDataWithBLOBs) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId()))
|
||||
&& (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
|
||||
&& (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
|
||||
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
|
||||
&& (this.getGraphData() == null ? other.getGraphData() == null : this.getGraphData().equals(other.getGraphData()))
|
||||
&& (this.getLogicData() == null ? other.getLogicData() == null : this.getLogicData().equals(other.getLogicData()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode());
|
||||
result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
|
||||
result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
|
||||
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
|
||||
result = prime * result + ((getGraphData() == null) ? 0 : getGraphData().hashCode());
|
||||
result = prime * result + ((getLogicData() == null) ? 0 : getLogicData().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", graphData=").append(graphData);
|
||||
sb.append(", logicData=").append(logicData);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -249,7 +249,7 @@ public class DraftMapService implements IDraftMapService {
|
||||
DraftMapWithBLOBs draftMap = getEntity(id);
|
||||
MapVO mapVO = new MapVO(draftMap);
|
||||
MapDataVO mapDataVO;
|
||||
mapDataVO = new MapDataVO(this.buildShapeData(draftMap), this.getMapLogicDataNew(id));
|
||||
mapDataVO = new MapDataVO(this.buildShapeData(draftMap), this.getMapLogicDataNew(id), MapCheckConfig.fromJson(draftMap.getCheckConfig()));
|
||||
mapDataVO.setMap3dDataVO(this.find3dMapDataByMapId(id));
|
||||
mapVO.setMapData(mapDataVO);
|
||||
return mapVO;
|
||||
@ -315,7 +315,8 @@ public class DraftMapService implements IDraftMapService {
|
||||
@Override
|
||||
public void publish(Long id, DraftMapVO draftMapVO, UserVO userVO) {
|
||||
DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(id);
|
||||
MapDataVO mapDataVO = new MapDataVO(JsonUtils.read(draftMap.getGraphData(), MapGraphDataNewVO.class), getMapLogicDataNew(id));
|
||||
MapDataVO mapDataVO = new MapDataVO(JsonUtils.read(draftMap.getGraphData(), MapGraphDataNewVO.class), getMapLogicDataNew(id),
|
||||
MapCheckConfig.fromJson(draftMap.getCheckConfig()));
|
||||
mapDataVO.setMap3dDataVO(find3dMapDataByMapId(id));
|
||||
iMapService.publish(new MapVO(draftMap, draftMapVO.getName(), draftMapVO.getCityCode()), mapDataVO, userVO);
|
||||
}
|
||||
@ -337,8 +338,9 @@ public class DraftMapService implements IDraftMapService {
|
||||
|
||||
@Override
|
||||
public MapDataVO getMapData(Long id) {
|
||||
MapGraphDataNewVO shapeData = getMapShapeData(id);
|
||||
return new MapDataVO(shapeData, getMapLogicDataNew(id));
|
||||
DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(id);
|
||||
return new MapDataVO(MapGraphDataNewVO.fromJson(draftMap.getGraphData()), getMapLogicDataNew(id),
|
||||
MapCheckConfig.fromJson(draftMap.getCheckConfig()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,4 +8,6 @@ public interface DraftMapRouteService {
|
||||
MapRouteNewVO createRailwayRoute(Long id, MapRouteNewVO routeNewVO);
|
||||
|
||||
List<MapRouteNewVO> queryAllRoutes(Long id);
|
||||
|
||||
void deleteRoute(Long id, String code);
|
||||
}
|
||||
|
@ -65,4 +65,15 @@ public class DraftMapRouteServiceImpl implements DraftMapRouteService {
|
||||
List<DraftMapRoute> routeList = this.draftMapRouteDAO.selectByExampleWithBLOBs(example);
|
||||
return MapRouteNewVO.convertDraft2VOList(routeList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRoute(Long id, String code) {
|
||||
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertHasText(code,
|
||||
String.format("code不能为空"));
|
||||
DraftMapRouteExample example = new DraftMapRouteExample();
|
||||
example.createCriteria()
|
||||
.andMapIdEqualTo(id)
|
||||
.andCodeEqualTo(code);
|
||||
this.draftMapRouteDAO.deleteByExample(example);
|
||||
}
|
||||
}
|
||||
|
@ -30,8 +30,9 @@ public class MapDataVO {
|
||||
this.logicDataNew = JsonUtils.read(mapData.getLogicData(), MapLogicDataNewVO.class);
|
||||
}
|
||||
|
||||
public MapDataVO(MapGraphDataNewVO shapeDataNew, MapLogicDataNewVO logicData) {
|
||||
|
||||
public MapDataVO(MapGraphDataNewVO shapeDataNew, MapLogicDataNewVO logicData,
|
||||
MapCheckConfig checkConfig) {
|
||||
this.checkConfig = checkConfig;
|
||||
this.shapeDataNew = shapeDataNew;
|
||||
this.logicDataNew = logicData;
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package club.joylink.rtss.vo.client.map.newmap;
|
||||
import club.joylink.rtss.util.JsonUtils;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ -12,6 +13,13 @@ public class MapCheckConfig {
|
||||
*/
|
||||
private boolean check = true;
|
||||
|
||||
public static MapCheckConfig fromJson(String json) {
|
||||
if (StringUtils.hasText(json)) {
|
||||
return JsonUtils.read(json, MapCheckConfig.class);
|
||||
}
|
||||
return new MapCheckConfig();
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return JsonUtils.writeValueAsString(this);
|
||||
}
|
||||
|
@ -214,6 +214,10 @@ public class MapGraphDataNewVO {
|
||||
return mapGraphDataVO;
|
||||
}
|
||||
|
||||
public static MapGraphDataNewVO fromJson(String json) {
|
||||
return JsonUtils.read(json, MapGraphDataNewVO.class);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return JsonUtils.writeValueAsString(this);
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="author_id" jdbcType="BIGINT" property="authorId" />
|
||||
<result column="line_code" jdbcType="VARCHAR" property="lineCode" />
|
||||
<result column="draw_way" jdbcType="TINYINT" property="drawWay" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.DraftMapWithBLOBs">
|
||||
<result column="graph_data" jdbcType="LONGVARCHAR" property="graphData" />
|
||||
@ -76,7 +75,7 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, update_time, author_id, line_code, draw_way
|
||||
id, `name`, update_time, author_id, line_code
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
graph_data, logic_data, init_pos_config, check_config, ci_generate_config, big_screen_config
|
||||
@ -147,15 +146,13 @@
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.DraftMapWithBLOBs" useGeneratedKeys="true">
|
||||
insert into draft_map (`name`, update_time, author_id,
|
||||
line_code, draw_way, graph_data,
|
||||
logic_data, init_pos_config, check_config,
|
||||
ci_generate_config, big_screen_config
|
||||
)
|
||||
line_code, graph_data, logic_data,
|
||||
init_pos_config, check_config, ci_generate_config,
|
||||
big_screen_config)
|
||||
values (#{name,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{authorId,jdbcType=BIGINT},
|
||||
#{lineCode,jdbcType=VARCHAR}, #{drawWay,jdbcType=TINYINT}, #{graphData,jdbcType=LONGVARCHAR},
|
||||
#{logicData,jdbcType=LONGVARCHAR}, #{initPosConfig,jdbcType=LONGVARCHAR}, #{checkConfig,jdbcType=LONGVARCHAR},
|
||||
#{ciGenerateConfig,jdbcType=LONGVARCHAR}, #{bigScreenConfig,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
#{lineCode,jdbcType=VARCHAR}, #{graphData,jdbcType=LONGVARCHAR}, #{logicData,jdbcType=LONGVARCHAR},
|
||||
#{initPosConfig,jdbcType=LONGVARCHAR}, #{checkConfig,jdbcType=LONGVARCHAR}, #{ciGenerateConfig,jdbcType=LONGVARCHAR},
|
||||
#{bigScreenConfig,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.DraftMapWithBLOBs" useGeneratedKeys="true">
|
||||
insert into draft_map
|
||||
@ -172,9 +169,6 @@
|
||||
<if test="lineCode != null">
|
||||
line_code,
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
draw_way,
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
graph_data,
|
||||
</if>
|
||||
@ -207,9 +201,6 @@
|
||||
<if test="lineCode != null">
|
||||
#{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
#{drawWay,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
#{graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
@ -254,9 +245,6 @@
|
||||
<if test="record.lineCode != null">
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.drawWay != null">
|
||||
draw_way = #{record.drawWay,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="record.graphData != null">
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
@ -287,7 +275,6 @@
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
draw_way = #{record.drawWay,jdbcType=TINYINT},
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR},
|
||||
logic_data = #{record.logicData,jdbcType=LONGVARCHAR},
|
||||
init_pos_config = #{record.initPosConfig,jdbcType=LONGVARCHAR},
|
||||
@ -304,8 +291,7 @@
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
draw_way = #{record.drawWay,jdbcType=TINYINT}
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -325,9 +311,6 @@
|
||||
<if test="lineCode != null">
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
draw_way = #{drawWay,jdbcType=TINYINT},
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
@ -355,7 +338,6 @@
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
draw_way = #{drawWay,jdbcType=TINYINT},
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR},
|
||||
logic_data = #{logicData,jdbcType=LONGVARCHAR},
|
||||
init_pos_config = #{initPosConfig,jdbcType=LONGVARCHAR},
|
||||
@ -369,8 +351,7 @@
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
draw_way = #{drawWay,jdbcType=TINYINT}
|
||||
line_code = #{lineCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -11,6 +11,10 @@
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.entity.MapDataWithBLOBs">
|
||||
<result column="graph_data" jdbcType="LONGVARCHAR" property="graphData" />
|
||||
<result column="logic_data" jdbcType="LONGVARCHAR" property="logicData" />
|
||||
<result column="init_pos_config" jdbcType="LONGVARCHAR" property="initPosConfig" />
|
||||
<result column="check_config" jdbcType="LONGVARCHAR" property="checkConfig" />
|
||||
<result column="ci_generate_config" jdbcType="LONGVARCHAR" property="ciGenerateConfig" />
|
||||
<result column="big_screen_config" jdbcType="LONGVARCHAR" property="bigScreenConfig" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@ -74,7 +78,7 @@
|
||||
id, map_id, version, `time`, user_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
graph_data, logic_data
|
||||
graph_data, logic_data, init_pos_config, check_config, ci_generate_config, big_screen_config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="club.joylink.rtss.entity.MapDataExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
@ -142,11 +146,13 @@
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.MapDataWithBLOBs" useGeneratedKeys="true">
|
||||
insert into map_data (map_id, version, `time`,
|
||||
user_id, graph_data, logic_data
|
||||
)
|
||||
user_id, graph_data, logic_data,
|
||||
init_pos_config, check_config, ci_generate_config,
|
||||
big_screen_config)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{version,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP},
|
||||
#{userId,jdbcType=BIGINT}, #{graphData,jdbcType=LONGVARCHAR}, #{logicData,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
#{userId,jdbcType=BIGINT}, #{graphData,jdbcType=LONGVARCHAR}, #{logicData,jdbcType=LONGVARCHAR},
|
||||
#{initPosConfig,jdbcType=LONGVARCHAR}, #{checkConfig,jdbcType=LONGVARCHAR}, #{ciGenerateConfig,jdbcType=LONGVARCHAR},
|
||||
#{bigScreenConfig,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.MapDataWithBLOBs" useGeneratedKeys="true">
|
||||
insert into map_data
|
||||
@ -169,6 +175,18 @@
|
||||
<if test="logicData != null">
|
||||
logic_data,
|
||||
</if>
|
||||
<if test="initPosConfig != null">
|
||||
init_pos_config,
|
||||
</if>
|
||||
<if test="checkConfig != null">
|
||||
check_config,
|
||||
</if>
|
||||
<if test="ciGenerateConfig != null">
|
||||
ci_generate_config,
|
||||
</if>
|
||||
<if test="bigScreenConfig != null">
|
||||
big_screen_config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
@ -189,6 +207,18 @@
|
||||
<if test="logicData != null">
|
||||
#{logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="initPosConfig != null">
|
||||
#{initPosConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="checkConfig != null">
|
||||
#{checkConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="ciGenerateConfig != null">
|
||||
#{ciGenerateConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="bigScreenConfig != null">
|
||||
#{bigScreenConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="club.joylink.rtss.entity.MapDataExample" resultType="java.lang.Long">
|
||||
@ -221,6 +251,18 @@
|
||||
<if test="record.logicData != null">
|
||||
logic_data = #{record.logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.initPosConfig != null">
|
||||
init_pos_config = #{record.initPosConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.checkConfig != null">
|
||||
check_config = #{record.checkConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.ciGenerateConfig != null">
|
||||
ci_generate_config = #{record.ciGenerateConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.bigScreenConfig != null">
|
||||
big_screen_config = #{record.bigScreenConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
@ -234,7 +276,11 @@
|
||||
`time` = #{record.time,jdbcType=TIMESTAMP},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR},
|
||||
logic_data = #{record.logicData,jdbcType=LONGVARCHAR}
|
||||
logic_data = #{record.logicData,jdbcType=LONGVARCHAR},
|
||||
init_pos_config = #{record.initPosConfig,jdbcType=LONGVARCHAR},
|
||||
check_config = #{record.checkConfig,jdbcType=LONGVARCHAR},
|
||||
ci_generate_config = #{record.ciGenerateConfig,jdbcType=LONGVARCHAR},
|
||||
big_screen_config = #{record.bigScreenConfig,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
@ -271,6 +317,18 @@
|
||||
<if test="logicData != null">
|
||||
logic_data = #{logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="initPosConfig != null">
|
||||
init_pos_config = #{initPosConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="checkConfig != null">
|
||||
check_config = #{checkConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="ciGenerateConfig != null">
|
||||
ci_generate_config = #{ciGenerateConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="bigScreenConfig != null">
|
||||
big_screen_config = #{bigScreenConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
@ -281,7 +339,11 @@
|
||||
`time` = #{time,jdbcType=TIMESTAMP},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR},
|
||||
logic_data = #{logicData,jdbcType=LONGVARCHAR}
|
||||
logic_data = #{logicData,jdbcType=LONGVARCHAR},
|
||||
init_pos_config = #{initPosConfig,jdbcType=LONGVARCHAR},
|
||||
check_config = #{checkConfig,jdbcType=LONGVARCHAR},
|
||||
ci_generate_config = #{ciGenerateConfig,jdbcType=LONGVARCHAR},
|
||||
big_screen_config = #{bigScreenConfig,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="club.joylink.rtss.entity.MapData">
|
||||
|
Loading…
Reference in New Issue
Block a user