| | |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "更新一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "entity", value = "实体类", dataType = "PublishEntity", paramType = "body") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/update", produces = "application/json; charset=UTF-8") |
| | | public ResponseMsg<Integer> update(@RequestBody PublishEntity entity, HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue != null) { |
| | | entity.setUpdateUser(ue.getId()); |
| | | } |
| | | |
| | | permsService.clearPermsCache(); |
| | | int count = publishService.update(entity); |
| | | |
| | | return success(count); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), -1); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (null == min) { |
| | | min = 0; |
| | | } |
| | | if (null == max) { |
| | | if (null == max || max == 0) { |
| | | max = 18; |
| | | } |
| | | if (null == epsg || epsg == 0) { |
| | |
| | | /** |
| | | * 拉伸因子,配合 enhance_factor使用 |
| | | */ |
| | | private Double enhance_factor; |
| | | private Double enhanceFactor; |
| | | |
| | | /** |
| | | * 元数据ID集合 |
| | |
| | | this.enhanceType = enhanceType; |
| | | } |
| | | |
| | | public Double getEnhance_factor() { |
| | | return enhance_factor; |
| | | public Double getEnhanceFactor() { |
| | | return enhanceFactor; |
| | | } |
| | | |
| | | public void setEnhance_factor(Double enhance_factor) { |
| | | this.enhance_factor = enhance_factor; |
| | | public void setEnhanceFactor(Double enhanceFactor) { |
| | | this.enhanceFactor = enhanceFactor; |
| | | } |
| | | |
| | | public List<Integer> getIds() { |
| | |
| | | layer.setProjection(getEpsg(pub)); |
| | | layer.setType(TYPES.indexOf(pub.getType())); |
| | | layer.setEnhance_type(pub.getEnhanceType()); |
| | | layer.setEnhance_factor(pub.getEnhance_factor()); |
| | | layer.setEnhance_factor(pub.getEnhanceFactor()); |
| | | layer.setNodata(getNoData(pub, metas)); |
| | | layer.setConfig(getColorTableConfig(entity, pub)); |
| | | |