|
@@ -9,9 +9,11 @@ import com.gis.cms.entity.po.AerialEntity;
|
|
|
import com.gis.cms.mapper.ImgMapper;
|
|
|
import com.gis.cms.mapper.AerialMapper;
|
|
|
import com.gis.cms.service.AerialService;
|
|
|
+import com.gis.cms.service.WebService;
|
|
|
import com.gis.common.util.BaseUtil;
|
|
|
import com.gis.common.util.FileUtils;
|
|
|
import com.gis.common.util.Result;
|
|
|
+import javassist.tools.web.Webserver;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -31,6 +33,9 @@ public class AerialServiceImpl extends ServiceImpl<AerialMapper, AerialEntity> i
|
|
|
@Autowired
|
|
|
ImgMapper imgMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ WebService webService;
|
|
|
+
|
|
|
@Override
|
|
|
public Result search(TypePageDto param) {
|
|
|
BaseUtil.startPage(param);
|
|
@@ -43,11 +48,6 @@ public class AerialServiceImpl extends ServiceImpl<AerialMapper, AerialEntity> i
|
|
|
}
|
|
|
|
|
|
|
|
|
-// String searchKey = param.getSearchKey();
|
|
|
-// if (StringUtils.isNotBlank(searchKey)){
|
|
|
-// wrapper.like(AerialEntity::getContent, searchKey);
|
|
|
-// }
|
|
|
-
|
|
|
wrapper.orderByDesc(AerialEntity::getCreateTime);
|
|
|
|
|
|
IPage<AerialEntity> result = this.page(page, wrapper);
|
|
@@ -87,64 +87,11 @@ public class AerialServiceImpl extends ServiceImpl<AerialMapper, AerialEntity> i
|
|
|
|
|
|
BeanUtils.copyProperties(param, entity);
|
|
|
this.updateById(entity);
|
|
|
+ webService.clearCache();
|
|
|
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
|
|
|
-// @Override
|
|
|
-// public Result<AerialEntity> fileDetail(Long id) {
|
|
|
-// return Result.success(imgMapper.selectById(id));
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public Result upload(MultipartFile file) {
|
|
|
-// Map<String, Object> map = fileUtils.uploadMap(file, "/aerial", false);
|
|
|
-// return Result.success(map);
|
|
|
-// }
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public Result imgSave(ImgDto param) {
|
|
|
-// Long id = param.getId();
|
|
|
-// ImgEntity entity = null;
|
|
|
-// if (id == null){
|
|
|
-// entity = new ImgEntity();
|
|
|
-// BeanUtils.copyProperties(param, entity);
|
|
|
-// entity.setModule(TypeCode.MODULE_AERIAL);
|
|
|
-// imgMapper.insert(entity);
|
|
|
-// } else {
|
|
|
-// entity = imgMapper.selectById(id);
|
|
|
-// if (entity == null){
|
|
|
-// String msg = "对象id不存在 ";
|
|
|
-// log.error(msg + id);
|
|
|
-// return Result.failure(msg);
|
|
|
-// }
|
|
|
-//
|
|
|
-// // 删除旧文件-真删除
|
|
|
-// if (!StringUtils.equals(entity.getThumb(), param.getThumb())){
|
|
|
-// fileUtils.del(entity.getThumb());
|
|
|
-// }
|
|
|
-//
|
|
|
-// BeanUtils.copyProperties(param, entity);
|
|
|
-// imgMapper.update(entity, null);
|
|
|
-// }
|
|
|
-//
|
|
|
-// return Result.success();
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-//
|
|
|
-// @Override
|
|
|
-// public Result imgList(PageDto param) {
|
|
|
-// BaseUtil.startPage(param);
|
|
|
-// IPage<ImgEntity> page = new Page<>(param.getPageNum() , param.getPageSize());
|
|
|
-//
|
|
|
-// LambdaQueryWrapper<ImgEntity> wrapper = new LambdaQueryWrapper<>();
|
|
|
-// wrapper.eq(ImgEntity::getModule, TypeCode.MODULE_AERIAL);
|
|
|
-// IPage<ImgEntity> iPage = imgMapper.selectPage(page, wrapper);
|
|
|
-// return Result.success(iPage);
|
|
|
-// }
|
|
|
|
|
|
}
|