Jelajahi Sumber

新增:文物管理-是否显示

wuweihao 4 tahun lalu
induk
melakukan
9cb1ebef74

+ 17 - 2
gis_web/src/main/java/com/gis/web/controller/FodderController.java

@@ -57,7 +57,7 @@ public class FodderController extends BaseController {
         return Result.success(page);
     }
 
-    @WebControllerLog(description = "场景素材-新增/修改")
+    @WebControllerLog(description = "文物管理-新增/修改")
     @ApiOperation("新增/修改")
     @PostMapping("save")
     public Result save(@Valid @RequestBody FodderDto param) {
@@ -117,12 +117,27 @@ public class FodderController extends BaseController {
         return Result.success(entity);
     }
 
+    @WebControllerLog(description = "文物管理-是否显示")
+    @ApiOperation("是否显示")
+    @GetMapping("display/{id}/{display}")
+    public Result display(@PathVariable Long id, @PathVariable Integer display) {
+        FodderEntity entity = fodderService.findById(id);
+        if (entity == null) {
+            log.error("对象id不存在 : {}", id);
+            return Result.failure("对象id不存在");
+        }
+
+        entity.setDisplay(display);
+        fodderService.update(entity);
+        return Result.success();
+    }
+
 
 
     /**
      * 素材文件,真删除
      */
-    @WebControllerLog(description = "场景素材-删除")
+    @WebControllerLog(description = "文物管理-删除")
     @ApiOperation("删除")
     @GetMapping("removes/{ids}")
     public Result removes(@PathVariable String ids) {