|
@@ -7,7 +7,6 @@ import com.gis.common.util.Result;
|
|
|
import com.gis.domain.dto.*;
|
|
|
import com.gis.domain.po.*;
|
|
|
import com.gis.domain.vo.*;
|
|
|
-import com.gis.mapper.CommonMapper;
|
|
|
import com.gis.service.*;
|
|
|
import com.gis.service.util.CommentTree;
|
|
|
import com.gis.service.util.CommentTreeUtil;
|
|
@@ -41,31 +40,20 @@ public class WebController extends BaseController {
|
|
|
private KnowledgeService knowledgeService;
|
|
|
|
|
|
@Autowired
|
|
|
- private SpiritService spiritService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private NewsService newsService;
|
|
|
|
|
|
@Autowired
|
|
|
- private MenuService menuService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private SceneService sceneService;
|
|
|
|
|
|
@Autowired
|
|
|
private VideoService videoService;
|
|
|
|
|
|
@Autowired
|
|
|
- private SlideshowService slideshowService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private CommentService commentService;
|
|
|
|
|
|
@Autowired
|
|
|
private SysUserService sysUserService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private CommonMapper commonMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private FodderService fodderService;
|
|
@@ -85,41 +73,6 @@ public class WebController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-// @ApiOperation("导航栏")
|
|
|
-// @GetMapping("navigation")
|
|
|
-// public Result navigation() {
|
|
|
-// List<MenuEntity> entities = menuService.findAll();
|
|
|
-//
|
|
|
-// MenuTreeUtil menuTreeUtil = new MenuTreeUtil(entities);
|
|
|
-// List<MenuTree> tree = menuTreeUtil.buildTree();
|
|
|
-// return Result.success(tree);
|
|
|
-// }
|
|
|
-
|
|
|
-// @ApiOperation("精品典藏子菜单")
|
|
|
-// @GetMapping("goodsNav")
|
|
|
-// public Result goodsNav() {
|
|
|
-//
|
|
|
-// Condition condition = new Condition(MenuEntity.class);
|
|
|
-// // 写死了,菜单只能修改,不能删除
|
|
|
-// condition.and().andEqualTo("parentId", "4");
|
|
|
-// List<MenuEntity> entities = menuService.findAll(condition);
|
|
|
-//
|
|
|
-// return Result.success(entities);
|
|
|
-// }
|
|
|
-
|
|
|
-// @ApiOperation("精品典藏详情(用于模型显示描述)")
|
|
|
-// @GetMapping("goods/detail/{id}")
|
|
|
-// public Result goodsDetail(@PathVariable Long id) {
|
|
|
-// GoodsEntity entity = goodsService.findById(id);
|
|
|
-// if (entity == null) {
|
|
|
-// log.error("对象id不存在 : {}", id);
|
|
|
-// return Result.failure("对象id不存在");
|
|
|
-// }
|
|
|
-//
|
|
|
-// return Result.success(entity);
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
@ApiOperation("搜索")
|
|
|
@PostMapping("search")
|
|
|
public Result<NewsVo> search(@RequestBody PageDto param) {
|
|
@@ -144,50 +97,6 @@ public class WebController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-// @ApiOperation("轮播图")
|
|
|
-// @GetMapping("slideshow")
|
|
|
-// public Result slideshow() {
|
|
|
-//
|
|
|
-// Integer status = 4;
|
|
|
-// Integer display = 1;
|
|
|
-//
|
|
|
-// List<SlideshowVo> show = slideshowService.showDisplay(status, display);
|
|
|
-// return Result.success(show);
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-// @ApiOperation("史馆动态-新闻")
|
|
|
-// @PostMapping("news")
|
|
|
-// public Result news(@RequestBody NewsPageDateRequest param ) {
|
|
|
-//
|
|
|
-// param.setType("news");
|
|
|
-// startPage(param);
|
|
|
-// PageInfo<NewsVo> page = new PageInfo<>(newsService.findDisplay(param));
|
|
|
-//
|
|
|
-// return Result.success(page);
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-// @ApiOperation("史馆动态-公告")
|
|
|
-// @PostMapping("notice")
|
|
|
-// public Result notice(@RequestBody NewsPageDateRequest param) {
|
|
|
-//
|
|
|
-// param.setType("notice");
|
|
|
-// startPage(param);
|
|
|
-// PageInfo<NewsVo> page = new PageInfo<>(newsService.findDisplay(param));
|
|
|
-//
|
|
|
-// return Result.success(page);
|
|
|
-// }
|
|
|
-
|
|
|
-// @ApiOperation("保存史馆动态浏览量")
|
|
|
-// @GetMapping("news/view/{id}")
|
|
|
-// public Result newsView(@PathVariable Long id) {
|
|
|
-// newsService.setView(id);
|
|
|
-// return Result.success();
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
|
|
|
@ApiOperation("文物库")
|
|
|
@PostMapping("fodder")
|
|
@@ -197,22 +106,6 @@ public class WebController extends BaseController {
|
|
|
PageInfo<FodderEntity> page = new PageInfo<>(fodderService.search(param));
|
|
|
return Result.success(page);
|
|
|
}
|
|
|
-// @ApiOperation("保存特有精神浏览量")
|
|
|
-// @GetMapping("spirit/view/{id}")
|
|
|
-// public Result spiritView(@PathVariable Long id) {
|
|
|
-// spiritService.setView(id);
|
|
|
-// return Result.success();
|
|
|
-// }
|
|
|
-
|
|
|
-// @ApiOperation("保存精品典藏浏览量")
|
|
|
-// @GetMapping("goods/view/{id}")
|
|
|
-// public Result goodsView(@PathVariable Long id) {
|
|
|
-// goodsService.setView(id);
|
|
|
-// return Result.success();
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "党史军史")
|
|
@@ -224,100 +117,6 @@ public class WebController extends BaseController {
|
|
|
return Result.success(page);
|
|
|
}
|
|
|
|
|
|
-// @ApiOperation(value = "精品典藏-详情")
|
|
|
-// @PostMapping("goods/detail/{id}")
|
|
|
-// public Result<GoodsVo> goodsList(@PathVariable Long id) {
|
|
|
-// GoodsEntity entity = goodsService.findById(id);
|
|
|
-// if (entity == null) {
|
|
|
-// log.error("对象id不存在 : {}", id);
|
|
|
-// return Result.failure("对象id不存在");
|
|
|
-// }
|
|
|
-//
|
|
|
-// String modelType = null;
|
|
|
-// if (entity.getType() == 1) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_IMG;
|
|
|
-// } else if (entity.getType() == 2) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_VIDEO;
|
|
|
-// } else if (entity.getType() == 3) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_MODEL;
|
|
|
-// }
|
|
|
-//
|
|
|
-// Condition condition = new Condition(FileEntity.class);
|
|
|
-// condition.and().andEqualTo("fkId", id);
|
|
|
-// condition.and().andEqualTo("type", modelType);
|
|
|
-// List<FileEntity> fileList = fileService.findAll(condition);
|
|
|
-//
|
|
|
-// HashMap<Object, Object> result = new HashMap<>();
|
|
|
-// result.put("entity", entity);
|
|
|
-// result.put("file", fileList);
|
|
|
-//
|
|
|
-// return Result.success(result);
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-// @ApiOperation(value = "精品典藏-图片")
|
|
|
-// @PostMapping("goods/img")
|
|
|
-// public Result<FileEntity> goodsImg(@Valid @RequestBody GoodsPageDateDto param) {
|
|
|
-//
|
|
|
-//// startPage(param);
|
|
|
-// param.setStatus(4);
|
|
|
-//
|
|
|
-// String modelType = null;
|
|
|
-// Integer type = param.getType();
|
|
|
-// if (type == 1) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_IMG;
|
|
|
-// } else if (type == 2) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_VIDEO;
|
|
|
-// } else if (type == 3) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_MODEL;
|
|
|
-// }
|
|
|
-//
|
|
|
-// List<FileEntity> fileList = fileService.findDisplayByType(1, modelType);
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-// List<GoodsVo> search = goodsService.findDisplay(param);
|
|
|
-// for (GoodsVo entity : search) {
|
|
|
-// String modelType = null;
|
|
|
-// Integer type = entity.getType();
|
|
|
-// if (type == 1) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_IMG;
|
|
|
-// } else if (type == 2) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_VIDEO;
|
|
|
-// } else if (type == 3) {
|
|
|
-// modelType = TypeCode.MODEL_GOODS_MODEL;
|
|
|
-// }
|
|
|
-//
|
|
|
-// Condition condition = new Condition(FileEntity.class);
|
|
|
-// condition.and().andEqualTo("fkId", entity.getId());
|
|
|
-// condition.and().andEqualTo("type", modelType);
|
|
|
-//
|
|
|
-// List<FileEntity> fileList = fileService.findAll(condition);
|
|
|
-//
|
|
|
-// for (FileEntity file : fileList) {
|
|
|
-// String title = entity.getTitle();
|
|
|
-// file.setFileName(title+ "-" + file.getFileName());
|
|
|
-// file.setYear(entity.getYear());
|
|
|
-// resultList.add(file);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// PageHelper.startPage(param.getPageNum(), param.getPageSize());
|
|
|
-// PageInfo<FileEntity> page = new PageInfo<>(resultList);
|
|
|
-// return Result.success(page);
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-// @ApiOperation(value = "精品典藏-获取年份")
|
|
|
-// @GetMapping("goods/getYear/{type}")
|
|
|
-// public Result getYear(@PathVariable Integer type) {
|
|
|
-// Set<Integer> result = goodsService.getYear(type);
|
|
|
-// return Result.success(result);
|
|
|
-// }
|
|
|
-
|
|
|
|
|
|
@ApiOperation(value = "数字史馆-场景")
|
|
|
@GetMapping("scene")
|
|
@@ -415,13 +214,6 @@ public class WebController extends BaseController {
|
|
|
return Result.success(password);
|
|
|
}
|
|
|
|
|
|
-// @ApiOperation("获取主题")
|
|
|
-// @GetMapping("getTopic")
|
|
|
-// public Result getTopic() {
|
|
|
-// Map topic = commonMapper.getActivityTopic();
|
|
|
-// return Result.success(topic);
|
|
|
-// }
|
|
|
-
|
|
|
|
|
|
@ApiOperation("检查token是否失效")
|
|
|
@GetMapping("checkToken")
|
|
@@ -441,57 +233,5 @@ public class WebController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-// @ApiOperation("测试删除")
|
|
|
-// @GetMapping("testRemove")
|
|
|
-// public Result testRemove() {
|
|
|
-// for (int i = 0; i < 100; i++) {
|
|
|
-// String path = FILE_PATH + "test/" + i +".png";
|
|
|
-// log.info("path: {}", path);
|
|
|
-// FileUtil.del(path);
|
|
|
-// log.info("i: {}", i);
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
-// return Result.success();
|
|
|
-// }
|
|
|
-
|
|
|
-// @ApiOperation("测试删除轮播图")
|
|
|
-// @GetMapping("testRemoveLun/{ids}")
|
|
|
-// public Result testRemoveLun(@PathVariable String ids) {
|
|
|
-//
|
|
|
-//
|
|
|
-// List<SlideshowEntity> list = slideshowService.findByIds(ids);
|
|
|
-//
|
|
|
-// int n = 1;
|
|
|
-// for (SlideshowEntity entity: list) {
|
|
|
-// String img = entity.getImg();
|
|
|
-// log.info("imgPath: {}", img);
|
|
|
-// String imgPath = subStringAfter(img);
|
|
|
-// log.info("imgSubPath: {}", imgPath);
|
|
|
-// FileUtil.del(imgPath);
|
|
|
-//
|
|
|
-// String thumb = entity.getThumb();
|
|
|
-// log.info("thumbPath: {}", thumb);
|
|
|
-// String thumbPath = subStringAfter(thumb);
|
|
|
-// log.info("thumbSubPath: {}", thumbPath);
|
|
|
-// FileUtil.del(thumbPath);
|
|
|
-//
|
|
|
-// log.info("n: {}", n+1);
|
|
|
-// slideshowService.delete(entity);
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-//
|
|
|
-// return Result.success();
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
}
|