Commit 4a683c28 by Jbb

图层数据上传功能完善

parent d0cffb90
package com.founder.commonutils.viewEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_st_layer")
@ApiModel(value="图层对象", description="图层信息数据")
public class TbStLayer {
@TableId(value = "xxzjbh")
private String xxzjbh;
private String name;
private Double threshold;
private String lrr;
private String lrdwdm;
private String lrdwdc;
private Date lrsj;
private String gxr;
private String gxdwdm;
private String gxdwdc;
private Date gxsj;
}
......@@ -10,13 +10,15 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("TB_ST_LAYER_DATA")
@TableName("tb_st_layer_data")
@ApiModel(value="图层数据对象", description="图层数据")
public class TbStLayerData implements Serializable {
private String xxzjbh;
private String gl_xxzjbh;
private double x; //经度
private double y; //纬度
private String xStr; //保存错误的经度
private String yStr; //保存错误的纬度
private String title; //事故提示
private Date time; //事故时间
......@@ -52,6 +54,22 @@ public class TbStLayerData implements Serializable {
this.y = y;
}
public String getxStr() {
return xStr;
}
public void setxStr(String xStr) {
this.xStr = xStr;
}
public String getyStr() {
return yStr;
}
public void setyStr(String yStr) {
this.yStr = yStr;
}
public String getTitle() {
return title;
}
......
......@@ -16,12 +16,12 @@ import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
@Configuration
@MapperScan(basePackages = {"com.founder.view.mapper"},
sqlSessionTemplateRef = "xzxtSqlTemplate")
/*@MapperScan(basePackages = {"com.founder.view.mapper"},
sqlSessionTemplateRef = "xzxtSqlTemplate")*/
public class MybatisBaseDbConfig {
@Bean(name = "xzxtdbDatasource")
/*@Bean(name = "xzxtdbDatasource")
@ConfigurationProperties(prefix = "spring.datasource.xzxtdb")
public DruidDataSource druidXzxtdbDatasource()
{
......@@ -51,5 +51,5 @@ public class MybatisBaseDbConfig {
SqlSessionFactory sqlSessionFactory)
{
return new SqlSessionTemplate(sqlSessionFactory);
}
}*/
}
......@@ -15,11 +15,11 @@ import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
@Configuration
@MapperScan(basePackages = {"com.founder.view.qgxzMapper"},
sqlSessionTemplateRef = "qgSqlTemplate")
/*@MapperScan(basePackages = {"com.founder.view.qgxzMapper"},
sqlSessionTemplateRef = "qgSqlTemplate")*/
public class MybatisQgDbConfig {
@Bean(name = "qgdbDatasource")
/* @Bean(name = "qgdbDatasource")
@ConfigurationProperties(prefix = "spring.datasource.qgdb")
public DruidDataSource druidQgdbDatasource()
{
......@@ -43,5 +43,5 @@ public class MybatisQgDbConfig {
SqlSessionFactory sqlSessionFactory)
{
return new SqlSessionTemplate(sqlSessionFactory);
}
}*/
}
......@@ -16,4 +16,6 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TbStLayerDataMapper extends BaseMapper<TbStLayerData> {
void deleteByGlId(String layerId);
}
......@@ -2,8 +2,8 @@ package com.founder.view.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.founder.commonutils.publicEntity.SysUser;
import com.founder.commonutils.viewEntity.AccidentPoint;
import com.founder.commonutils.viewEntity.TbStLayer;
import com.founder.commonutils.viewEntity.TbStLayerData;
import org.apache.ibatis.annotations.Mapper;
/**
......@@ -15,6 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
* @since 2021-03-11
*/
@Mapper
public interface AccidentPointMapper extends BaseMapper<AccidentPoint> {
public interface TbStLayerMapper extends BaseMapper<TbStLayer> {
}
<?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="com.founder.view.mapper.TbStLayerDataMapper">
<delete id="deleteByGlId" parameterType="String">
delete from tb_st_layer_data where gl_xxzjbh = #{layerId}
</delete>
</mapper>
<?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="com.founder.view.mapper.TbStLayerMapper">
</mapper>
......@@ -4,4 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.founder.commonutils.viewEntity.TbStLayerData;
public interface TbStLayerDataService extends IService<TbStLayerData> {
void deleteByGlId(String layerId);
}
package com.founder.view.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.founder.commonutils.viewEntity.TbStLayer;
import com.founder.commonutils.viewEntity.TbStLayerData;
public interface TbStLayerService extends IService<TbStLayer> {
}
......@@ -6,7 +6,15 @@ import com.founder.view.mapper.TbStLayerDataMapper;
import com.founder.view.service.TbStLayerDataService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class TbStLayerDataServiceImpl extends ServiceImpl<TbStLayerDataMapper, TbStLayerData> implements TbStLayerDataService {
@Resource
TbStLayerDataMapper tbStLayerDataMapper;
@Override
public void deleteByGlId(String layerId) {
tbStLayerDataMapper.deleteByGlId(layerId);
}
}
package com.founder.view.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.founder.commonutils.viewEntity.TbStLayer;
import com.founder.commonutils.viewEntity.TbStLayerData;
import com.founder.view.mapper.TbStLayerDataMapper;
import com.founder.view.mapper.TbStLayerMapper;
import com.founder.view.service.TbStLayerDataService;
import com.founder.view.service.TbStLayerService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class TbStLayerServiceImpl extends ServiceImpl<TbStLayerMapper, TbStLayer> implements TbStLayerService {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment