初始化

This commit is contained in:
hukekuan@163.com 2018-03-30 18:05:40 +08:00
parent e838d2cb88
commit b19f1ccabd
4 changed files with 16 additions and 3 deletions

View File

@ -24,6 +24,6 @@ public interface SourceDao {
@Param("projection") String projection);
public Integer findSourceCount();
public Integer insertSource(Source source);
public Integer updateSource(Source source);
public Integer deleteSourcesById(Set<String> sourceIds);
}

View File

@ -18,6 +18,6 @@ public interface SourceService {
public Integer findSourceCount();
public Integer insertSource(Source source);
public Integer updateSource(Source source);
public Integer deleteSourcesById(Set<String> sourceIds);
}

View File

@ -63,6 +63,11 @@ public class SourceServiceImpl implements SourceService {
return sourceDao.insertSource(source);
}
@Override
public Integer updateSource(Source source) {
return sourceDao.updateSource(source);
}
@Override
public Integer deleteSourcesById(Set<String> sourceIds) {
return sourceDao.deleteSourcesById(sourceIds);

View File

@ -74,7 +74,15 @@
, #{description}
);
</insert>
<update id="updateSource" parameterType="com.gis3c.ol.entity.Source">
UPDATE c3gis_ol_source SET
sourceName = #{sourceName},
type = #{type},
projection = #{projection},
options = #{options, javaType=ObjectJSON}::jsonb,
description = #{description}
WHERE sourceId = #{sourceId};
</update>
<delete id="deleteSourcesById" parameterType="java.util.Set">
delete from c3gis_ol_source
WHERE sourceId in