From 2ba52666860b04bedff1da95af0f6445315e6128 Mon Sep 17 00:00:00 2001 From: zhangmei <645025773@qq.com> Date: 星期二, 11 二月 2025 14:27:52 +0800 Subject: [PATCH] Merge branch 'xizang-changyun' of https://gitee.com/xiaochen991015/xizang into xizang-changyun --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THouseController.java | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THouseController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THouseController.java index 196fc9a..894920c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THouseController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/THouseController.java @@ -22,6 +22,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreInvocationAuthorizationAdviceVoter; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -45,18 +46,21 @@ @Log(title = "房屋基础信息管理-新增房屋", businessType = BusinessType.INSERT) @ApiOperation(value = "新增房屋") @PostMapping(value = "/addHouse") + @PreAuthorize("@ss.hasPermi('system:house:add')") public R<Boolean> addHouse(@Validated @RequestBody THouseDTO dto) { return R.ok(tHouseService.save(dto)); } @Log(title = "房屋基础信息管理-编辑房屋", businessType = BusinessType.UPDATE) @ApiOperation(value = "编辑房屋") @PostMapping(value = "/updateHouse") + @PreAuthorize("@ss.hasPermi('system:house:edit')") public R<Boolean> updateHouse(@Validated @RequestBody THouseDTO dto) { return R.ok(tHouseService.updateById(dto)); } @Log(title = "房屋基础信息管理-查询房屋信息", businessType = BusinessType.DELETE) @ApiOperation(value = "查询房屋信息") @GetMapping(value = "/getHouseById") + @PreAuthorize("@ss.hasPermi('system:house:detail')") public R<THouse> getHouseById(@RequestParam String id) { THouse tHouse = tHouseService.getById(id); tHouse.setLeaseStatus(DictUtils.getDictLabel(DictConstants.DICT_TYPE_LEASE_STATUS,tHouse.getLeaseStatus())); @@ -66,16 +70,21 @@ @Log(title = "房屋基础信息管理-删除房屋", businessType = BusinessType.DELETE) @ApiOperation(value = "删除房屋") @DeleteMapping(value = "/deleteHouseById") + @PreAuthorize("@ss.hasPermi('system:house:delete')") + public R<Boolean> deleteHouseById(@RequestParam String id) { return R.ok(tHouseService.removeById(id)); } @ApiOperation(value = "获取房屋分页列表") @PostMapping(value = "/houseList") + @PreAuthorize("@ss.hasPermi('system:house:list')") + public R<PageInfo<THouse>> houseList(@RequestBody THouseQuery query) { return R.ok(tHouseService.houseList(query)); } @ApiOperation(value = "历史租户列表") @PostMapping(value = "/userHistoryList") + @PreAuthorize("@ss.hasPermi('system:house:historyList')") public R<PageInfo<HouseVO>> userHistoryList(@RequestBody TUserHistoryQuery query) { return R.ok(tHouseService.userHistoryList(query)); } -- Gitblit v1.7.1