|
@@ -0,0 +1,52 @@
|
|
|
+package com.gis.cms.controller;
|
|
|
+
|
|
|
+import com.gis.cms.service.ContentService;
|
|
|
+import com.gis.cms.service.VillageService;
|
|
|
+import com.gis.common.util.Result;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Created by owen on 2022/5/31 0031 15:17
|
|
|
+ */
|
|
|
+@Api(tags = "web-展示端")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/web")
|
|
|
+public class WebController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ ContentService contentService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ VillageService villageService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "内容-列表")
|
|
|
+ @GetMapping("/content/list/{villageId}/{menuId}")
|
|
|
+ public Result getList(@PathVariable Long villageId, @PathVariable Long menuId){
|
|
|
+ return contentService.getList(villageId, menuId);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation(value = "村庄-保存浏览")
|
|
|
+ @GetMapping("/village/addVisit/{villageId}")
|
|
|
+ public Result addVisit(@PathVariable String villageId){
|
|
|
+ return villageService.addVisit(villageId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "村庄-保存点赞")
|
|
|
+ @GetMapping("/village/addStar/{villageId}")
|
|
|
+ public Result addStar(@PathVariable String villageId){
|
|
|
+ return villageService.addStar(villageId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "村庄-获取点赞量|浏览量")
|
|
|
+ @GetMapping("/village/getDetail/{villageId}")
|
|
|
+ public Result getDetail(@PathVariable String villageId){
|
|
|
+ return Result.success(villageService.getById(villageId));
|
|
|
+ }
|
|
|
+}
|