初始化
This commit is contained in:
parent
fb0d22c655
commit
2a3edf2500
@ -5,6 +5,7 @@ import com.gis3c.ol.entity.Layer;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hukekuan on 2017/12/15.
|
* Created by hukekuan on 2017/12/15.
|
||||||
@ -20,4 +21,6 @@ public interface LayerDao {
|
|||||||
public Layer findeLayerByName(String layerName);
|
public Layer findeLayerByName(String layerName);
|
||||||
|
|
||||||
public Integer insertLayer(Layer layer);
|
public Integer insertLayer(Layer layer);
|
||||||
|
|
||||||
|
public Integer deleteLayersById(Set<String> layerIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.gis3c.ol.entity.Map;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hukekuan on 2017/12/14.
|
* Created by hukekuan on 2017/12/14.
|
||||||
@ -19,4 +20,6 @@ public interface MapDao {
|
|||||||
public Map findMapById(String mapId);
|
public Map findMapById(String mapId);
|
||||||
public Map findMapByName(String mapName);
|
public Map findMapByName(String mapName);
|
||||||
public Integer insertMap(Map map);
|
public Integer insertMap(Map map);
|
||||||
|
|
||||||
|
public Integer deleteMapsById(Set<String> mapIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.gis3c.ol.entity.Source;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hukekuan on 2017/12/15.
|
* Created by hukekuan on 2017/12/15.
|
||||||
@ -18,4 +19,6 @@ public interface SourceDao {
|
|||||||
public Source findSourceById(String sourceId);
|
public Source findSourceById(String sourceId);
|
||||||
public Source findSourceByName(String sourceName);
|
public Source findSourceByName(String sourceName);
|
||||||
public Integer insertSource(Source source);
|
public Integer insertSource(Source source);
|
||||||
|
|
||||||
|
public Integer deleteSourcesById(Set<String> sourceIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ package com.gis3c.ol.service;
|
|||||||
import com.gis3c.ol.entity.Layer;
|
import com.gis3c.ol.entity.Layer;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hukekuan on 2017/12/15.
|
* Created by hukekuan on 2017/12/15.
|
||||||
@ -16,4 +17,6 @@ public interface LayerService {
|
|||||||
public Layer findeLayerByName(String layerName);
|
public Layer findeLayerByName(String layerName);
|
||||||
|
|
||||||
public Integer insertLayer(Layer layer);
|
public Integer insertLayer(Layer layer);
|
||||||
|
|
||||||
|
public Integer deleteLayersById(Set<String> layerIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.gis3c.ol.service;
|
|||||||
import com.gis3c.ol.entity.Map;
|
import com.gis3c.ol.entity.Map;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hukekuan on 2017/12/14.
|
* Created by hukekuan on 2017/12/14.
|
||||||
@ -14,4 +15,6 @@ public interface MapService {
|
|||||||
public Map findMapById(String mapId);
|
public Map findMapById(String mapId);
|
||||||
public Map findMapByName(String mapName);
|
public Map findMapByName(String mapName);
|
||||||
public Integer insertMap(Map map);
|
public Integer insertMap(Map map);
|
||||||
|
|
||||||
|
public Integer deleteMapsById(Set<String> mapIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.gis3c.ol.service;
|
|||||||
|
|
||||||
import com.gis3c.ol.entity.Source;
|
import com.gis3c.ol.entity.Source;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hukekuan on 2017/12/15.
|
* Created by hukekuan on 2017/12/15.
|
||||||
@ -12,4 +13,6 @@ public interface SourceService {
|
|||||||
public Source findSourceById(String sourceId);
|
public Source findSourceById(String sourceId);
|
||||||
public Source findSourceByName(String sourceName);
|
public Source findSourceByName(String sourceName);
|
||||||
public Integer insertSource(Source source);
|
public Integer insertSource(Source source);
|
||||||
|
|
||||||
|
public Integer deleteSourcesById(Set<String> sourceIds);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -55,4 +56,9 @@ public class LayerServiceImpl implements LayerService {
|
|||||||
layer.setLayerId(UUID.randomUUID().toString());
|
layer.setLayerId(UUID.randomUUID().toString());
|
||||||
return layerDao.insertLayer(layer);
|
return layerDao.insertLayer(layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer deleteLayersById(Set<String> layerIds) {
|
||||||
|
return layerDao.deleteLayersById(layerIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,10 +8,7 @@ import com.gis3c.ol.service.MapService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hukekuan on 2017/12/14.
|
* Created by hukekuan on 2017/12/14.
|
||||||
@ -55,4 +52,9 @@ public class MapServiceImpl implements MapService {
|
|||||||
map.setMapId(UUID.randomUUID().toString());
|
map.setMapId(UUID.randomUUID().toString());
|
||||||
return mapDao.insertMap(map);
|
return mapDao.insertMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer deleteMapsById(Set<String> mapIds) {
|
||||||
|
return mapDao.deleteMapsById(mapIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -55,4 +56,9 @@ public class SourceServiceImpl implements SourceService {
|
|||||||
source.setSourceId(UUID.randomUUID().toString());
|
source.setSourceId(UUID.randomUUID().toString());
|
||||||
return sourceDao.insertSource(source);
|
return sourceDao.insertSource(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer deleteSourcesById(Set<String> sourceIds) {
|
||||||
|
return sourceDao.deleteSourcesById(sourceIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,9 +12,7 @@ import org.springframework.context.ApplicationContext;
|
|||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by hukekuan on 2017/12/14.
|
* Created by hukekuan on 2017/12/14.
|
||||||
@ -64,9 +62,13 @@ public class App {
|
|||||||
|
|
||||||
// //地图接口
|
// //地图接口
|
||||||
// Map map = mapService.findMapById("83c734de-c010-4153-bf68-d291d715ac55");
|
// Map map = mapService.findMapById("83c734de-c010-4153-bf68-d291d715ac55");
|
||||||
System.out.println(mapService.findMapsByPage(5,1));
|
|
||||||
|
|
||||||
|
// System.out.println(mapService.findMapsByPage(5,1));
|
||||||
|
|
||||||
|
Set<String> mapIds = new HashSet<>();
|
||||||
|
mapIds.add("e49eed64-433b-4637-832e-b7292a867ba1");
|
||||||
|
mapService.deleteMapsById(mapIds);
|
||||||
|
System.out.println("删除成功");
|
||||||
|
|
||||||
// Map map = new Map();
|
// Map map = new Map();
|
||||||
// map.setMapId(UUID.randomUUID().toString());
|
// map.setMapId(UUID.randomUUID().toString());
|
||||||
|
|||||||
@ -90,4 +90,12 @@
|
|||||||
, #{description}
|
, #{description}
|
||||||
);
|
);
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteLayersById" parameterType="java.util.Set">
|
||||||
|
delete from c3gis_ol_layer
|
||||||
|
WHERE layerId in
|
||||||
|
<foreach collection ="collection" item="item" index="index" open="(" separator="," close=")">
|
||||||
|
#{item, javaType=java.lang.String}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -76,4 +76,12 @@
|
|||||||
, #{description}
|
, #{description}
|
||||||
);
|
);
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteMapsById" parameterType="java.util.Set">
|
||||||
|
delete from c3gis_ol_map
|
||||||
|
WHERE mapid in
|
||||||
|
<foreach collection ="collection" item="item" index="index" open="(" separator="," close=")">
|
||||||
|
#{item, javaType=java.lang.String}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -57,4 +57,12 @@
|
|||||||
, #{description}
|
, #{description}
|
||||||
);
|
);
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<delete id="deleteSourcesById" parameterType="java.util.Set">
|
||||||
|
delete from c3gis_ol_source
|
||||||
|
WHERE sourceId in
|
||||||
|
<foreach collection ="collection" item="item" index="index" open="(" separator="," close=")">
|
||||||
|
#{item, javaType=java.lang.String}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue
Block a user