初始化
This commit is contained in:
parent
968f8c4d98
commit
15c0403604
@ -21,8 +21,11 @@ public interface LayerDao {
|
||||
public Layer findeLayerByName(String layerName);
|
||||
|
||||
public Integer insertLayer(Layer layer);
|
||||
|
||||
public Integer bindSource(
|
||||
@Param("layerId") String layerId,
|
||||
@Param("sourceId") String sourceId);
|
||||
@Param("sourceId") String sourceId,
|
||||
@Param("options") java.util.Map<String,Object> options
|
||||
);
|
||||
public Integer deleteLayersById(Set<String> layerIds);
|
||||
}
|
||||
|
||||
@ -17,6 +17,6 @@ public interface LayerService {
|
||||
public Layer findeLayerByName(String layerName);
|
||||
|
||||
public Integer insertLayer(Layer layer);
|
||||
public Integer bindSource(String layerId,String sourceId);
|
||||
public Integer bindSource(String layerId,String sourceId,java.util.Map<String,Object> options);
|
||||
public Integer deleteLayersById(Set<String> layerIds);
|
||||
}
|
||||
|
||||
@ -7,10 +7,7 @@ import com.gis3c.ol.service.LayerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by hukekuan on 2017/12/15.
|
||||
@ -56,8 +53,8 @@ public class LayerServiceImpl implements LayerService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer bindSource(String layerId, String sourceId) {
|
||||
return layerDao.bindSource(layerId,sourceId);
|
||||
public Integer bindSource(String layerId, String sourceId, Map<String, Object> options) {
|
||||
return layerDao.bindSource(layerId,sourceId,options);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -29,6 +29,17 @@ public class App {
|
||||
MapService mapService = context.getBean(MapService.class);
|
||||
TestService testService = context.getBean(TestService.class);
|
||||
|
||||
// java.util.Map<String,Object> layerOptions = new HashMap<>();
|
||||
// layerOptions.put("a","aaaaaaaa");
|
||||
// layerOptions.put("b","bbbbbbbb");
|
||||
// layerOptions.put("c","cccccccc");
|
||||
// layerService.bindVectorSource(
|
||||
// "9e3a9812-5921-45c9-9043-e52d81fff1bb",
|
||||
// "4f21a864-3e81-4ee1-97b7-6d18a876b5c1",
|
||||
// layerOptions);
|
||||
// System.out.println("更新成功");
|
||||
|
||||
|
||||
// Integer result = layerService.bindSource("aabb842e-239e-491d-9c70-a2cec1f65886","d67de989-d351-4ba2-b3ac-021130ae19d4");
|
||||
// System.out.println(result);
|
||||
|
||||
@ -113,13 +124,13 @@ public class App {
|
||||
// System.out.println("插入成功");
|
||||
|
||||
//图层接口
|
||||
Layer layer = new Layer();
|
||||
layer.setLayerName("sdkqbigdata");
|
||||
layer.setAliasName("大屏行政区");
|
||||
layer.setType("ol.layer.Tile");
|
||||
layer.setProjection("EPSG:3857");
|
||||
layerService.insertLayer(layer);
|
||||
System.out.println("插入成功");
|
||||
// Layer layer = new Layer();
|
||||
// layer.setLayerName("sdkqbigdata");
|
||||
// layer.setAliasName("大屏行政区");
|
||||
// layer.setType("ol.layer.Tile");
|
||||
// layer.setProjection("EPSG:3857");
|
||||
// layerService.insertLayer(layer);
|
||||
// System.out.println("插入成功");
|
||||
|
||||
|
||||
//资源接口
|
||||
|
||||
@ -94,9 +94,13 @@
|
||||
, #{description}
|
||||
);
|
||||
</insert>
|
||||
|
||||
<update id="bindSource">
|
||||
UPDATE c3gis_ol_layer
|
||||
SET source = #{sourceId, javaType=java.lang.String}
|
||||
<if test="options != null">
|
||||
, options = #{options, javaType=ObjectJSON}::jsonb
|
||||
</if>
|
||||
WHERE layerid = #{layerId, javaType=java.lang.String}
|
||||
</update>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user