|
@@ -40,45 +40,59 @@ public class WebController {
|
|
|
@Autowired
|
|
|
BbsService bbsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ NewsService newsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ModuleService moduleService;
|
|
|
|
|
|
@Autowired
|
|
|
CommentService commentService;
|
|
|
|
|
|
|
|
|
-
|
|
|
+ @ApiOperation(value = "模块-列表", notes = "goods:精品典藏, news:教育基地")
|
|
|
+ @GetMapping("/moduleList/{module}")
|
|
|
+ public Result search(@PathVariable String module) {
|
|
|
+ return moduleService.search(module);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "文物列表")
|
|
|
- @PostMapping("goodList")
|
|
|
+ @PostMapping("/goodList")
|
|
|
public Result goodList(@Valid @RequestBody GoodsPageDateDto param) {
|
|
|
param.setDisplay(1);
|
|
|
return goodsService.search(param);
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "v0.1-保存模块访问量", notes = "type:模块类型, goods:典藏, 领导:leader, id:相应模块id")
|
|
|
- @GetMapping("visit/{type}/{id}")
|
|
|
- public Result saveVisit(@PathVariable String type, @PathVariable Long id) {
|
|
|
- return webService.saveVisit(type, id);
|
|
|
- }
|
|
|
-
|
|
|
@ApiOperation("详情")
|
|
|
- @GetMapping("goodDetail/{id}")
|
|
|
+ @GetMapping("/goodDetail/{id}")
|
|
|
public Result<GoodsEntity> goodDetail(@PathVariable Long id) {
|
|
|
return goodsService.detail(id);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "保存模块访问量", notes = "type:模块类型, goods:典藏 | leader:领导 | news:教育基地 id:相应模块id")
|
|
|
+ @GetMapping("/visit/{type}/{id}")
|
|
|
+ public Result saveVisit(@PathVariable String type, @PathVariable Long id) {
|
|
|
+ return webService.saveVisit(type, id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "校验基地-列表")
|
|
|
+ @PostMapping("/newsList")
|
|
|
+ public Result newsList(@Valid @RequestBody NewsPageDataDto param) {
|
|
|
+ param.setDisplay(1);
|
|
|
+ return newsService.search(param);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "荣誉列表")
|
|
|
- @PostMapping("leaderList")
|
|
|
+ @PostMapping("/leaderList")
|
|
|
public Result leaderList(@RequestBody LeaderPageDto param) {
|
|
|
param.setDisplay(1);
|
|
|
return leaderService.search(param);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "论坛-发帖列表")
|
|
|
- @PostMapping("bbs/list")
|
|
|
+ @PostMapping("/bbs/list")
|
|
|
public Result bbsList(@RequestBody BbsPageDto param) {
|
|
|
// 审核通过
|
|
|
param.setStatus(2);
|
|
@@ -86,26 +100,26 @@ public class WebController {
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "v0.1-论坛-发帖/留言")
|
|
|
- @PostMapping("bbs/save")
|
|
|
+ @PostMapping("/bbs/save")
|
|
|
public Result bbsSave(@Valid @RequestBody BbsDto param) {
|
|
|
return bbsService.saveEntity(param);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "论坛-上传图片")
|
|
|
- @PostMapping("bbs/upload")
|
|
|
+ @PostMapping("/bbs/upload")
|
|
|
public Result bbsUpload(MultipartFile file) {
|
|
|
return bbsService.upload(file);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "论坛-保存帖子浏览量")
|
|
|
- @GetMapping("bbs/visit/{id}")
|
|
|
+ @GetMapping("/bbs/visit/{id}")
|
|
|
public Result bbsVisit(@PathVariable Long id) {
|
|
|
bbsService.addVisit(id);
|
|
|
return Result.success();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "v0.1-论坛-发帖留言详情")
|
|
|
- @PostMapping("bbs/message/list")
|
|
|
+ @PostMapping("/bbs/message/list")
|
|
|
public Result bbsMessageList(@RequestBody BbsMessagePageDto param) {
|
|
|
return bbsService.bbsMessageList(param);
|
|
|
}
|
|
@@ -113,7 +127,7 @@ public class WebController {
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "v0.1-论坛-点赞/踩", notes = "类型, upVote:点赞, unVote:踩")
|
|
|
- @PostMapping("bbs/like/{type}/{id}")
|
|
|
+ @PostMapping("/bbs/like/{type}/{id}")
|
|
|
public Result bbsLike(@PathVariable String type, @PathVariable Long id) {
|
|
|
List<String> list = Arrays.asList("upVote", "unVote");
|
|
|
if (!list.contains(type)){
|
|
@@ -134,13 +148,13 @@ public class WebController {
|
|
|
|
|
|
@WebControllerLog(description = "展示页-留言评论")
|
|
|
@ApiOperation(value = "留言-评论")
|
|
|
- @PostMapping("comment/save")
|
|
|
+ @PostMapping("/comment/save")
|
|
|
public Result commentSave(@Valid @RequestBody CommentDto param) {
|
|
|
return commentService.saveEntity(param);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "留言-列表")
|
|
|
- @PostMapping("comment/list")
|
|
|
+ @PostMapping("/comment/list")
|
|
|
public Result commentList(@RequestBody CommentPageDto param) {
|
|
|
param.setStatus(2);
|
|
|
return commentService.search(param);
|