| | |
| | | where id = 7 |
| | | |
| | | insert into lf.sys_meta_pub (id,metaid,pubid) values (1,1,1); |
| | | insert into lf.sys_publish (id,name) values (1,'Test'); |
| | | |
| | | |
| | | insert into lf.sys_publish (id,name,type,dirid,depid) values (1,'Test','0102','000305'); |
| | | select a.* from lf.sys_publish a |
| | | select * from lf.sys_meta order by id desc limit 20; |
| | | |
| | | |
| | | |
| | |
| | | dirid varchar(24), |
| | | depid varchar(24), |
| | | min integer default 0, |
| | | max integer default 20, |
| | | max integer default 0, |
| | | json varchar(2048), |
| | | create_user integer default 1, |
| | | create_time timestamp(6) without time zone default now(), |
| | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除多条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", example = "1,2") |
| | | @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1") |
| | | }) |
| | | @GetMapping(value = "/deletes") |
| | | public ResponseMsg<Integer> deletes(@RequestParam List<Integer> ids) { |
| | |
| | | return fail("id数组不能为空", -1); |
| | | } |
| | | |
| | | int count = publishService.deletes(ids); |
| | | int count = publishService.deletes(StringHelper.join(ids, ",")); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | |
| | | |
| | | private Timestamp lastTime; |
| | | |
| | | private String url; |
| | | |
| | | public MetaEntity() { |
| | | } |
| | | |
| | |
| | | public void setLastTime(Timestamp lastTime) { |
| | | this.lastTime = lastTime; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | } |
| | |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public Integer deletes(List<Integer> ids); |
| | | public Integer deletes(String ids); |
| | | |
| | | /** |
| | | * 更新一条 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer deletes(List<Integer> ids) { |
| | | public Integer deletes(String ids) { |
| | | return publishMapper.deletes(ids); |
| | | } |
| | | |
| | |
| | | |
| | | <select id="selectMetasByPage" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | select |
| | | (select c.url from lf.sys_meta_pub b inner join lf.sys_publish c on b.pubid = c.id where b.metaid = a.id limit 1) "layer", |
| | | (select c.url from lf.sys_meta_pub b inner join lf.sys_publish c on b.pubid = c.id where b.metaid = a.id limit 1) "url", |
| | | (select ST_AsText(c.geom) from lf.sys_meta_pub b inner join lf.sys_publish c on b.pubid = c.id where b.metaid = a.id limit 1) "geom", |
| | | a.*, fn_uname(a.create_user) uname, fn_get_fullname(a.depcode, 1) depName, fn_get_fullname(a.dircode, 2) dirName, fn_ver(a.verid) verName |
| | | from lf.sys_meta a |
| | |
| | | </delete> |
| | | |
| | | <delete id="deletes"> |
| | | |
| | | |
| | | |
| | | delete from lf.sys_publish where id in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | |
| | | delete from lf.sys_meta_pub where pubid in (${ids}); |
| | | delete from lf.sys_publish where id in (${ids}); |
| | | </delete> |