From acf2bdafdfa2fb1fe423d0700950c3ddd53c481b Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 14 Nov 2023 19:36:55 +0800
Subject: [PATCH] 标签,房屋,住户管理
---
src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java | 47 +++++++++++++++++++++++------------------------
1 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java b/src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
similarity index 68%
rename from src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
rename to src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
index 22bbfe3..3b4700f 100644
--- a/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
+++ b/src/main/java/org/springblade/modules/house/controller/UserHouseLabelController.java
@@ -24,17 +24,16 @@
import lombok.AllArgsConstructor;
import javax.validation.Valid;
-import org.springblade.core.secure.BladeUser;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.springblade.modules.house.entity.HouseLabelEntity;
+import org.springblade.modules.house.entity.UserHouseLabelEntity;
import org.springblade.modules.house.vo.HouseLabelVO;
import org.springblade.modules.house.wrapper.HouseLabelWrapper;
-import org.springblade.modules.house.service.IHouseLabelService;
+import org.springblade.modules.house.service.IUserHouseLabelService;
import org.springblade.core.boot.ctrl.BladeController;
/**
@@ -45,11 +44,11 @@
*/
@RestController
@AllArgsConstructor
-@RequestMapping("blade-houseLabel/houseLabel")
-@Api(value = "房屋-标签", tags = "房屋-标签接口")
-public class HouseLabelController extends BladeController {
+@RequestMapping("blade-houseLabel/userHouseLabel")
+@Api(value = "用户房屋-标签", tags = "用户房屋-标签接口")
+public class UserHouseLabelController extends BladeController {
- private final IHouseLabelService houseLabelService;
+ private final IUserHouseLabelService userHouseLabelService;
/**
* 房屋-标签 详情
@@ -57,8 +56,8 @@
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入houseLabel")
- public R<HouseLabelVO> detail(HouseLabelEntity houseLabel) {
- HouseLabelEntity detail = houseLabelService.getOne(Condition.getQueryWrapper(houseLabel));
+ public R<HouseLabelVO> detail(UserHouseLabelEntity houseLabel) {
+ UserHouseLabelEntity detail = userHouseLabelService.getOne(Condition.getQueryWrapper(houseLabel));
return R.data(HouseLabelWrapper.build().entityVO(detail));
}
/**
@@ -67,8 +66,8 @@
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入houseLabel")
- public R<IPage<HouseLabelVO>> list(HouseLabelEntity houseLabel, Query query) {
- IPage<HouseLabelEntity> pages = houseLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(houseLabel));
+ public R<IPage<HouseLabelVO>> list(UserHouseLabelEntity houseLabel, Query query) {
+ IPage<UserHouseLabelEntity> pages = userHouseLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(houseLabel));
return R.data(HouseLabelWrapper.build().pageVO(pages));
}
@@ -79,7 +78,7 @@
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入houseLabel")
public R<IPage<HouseLabelVO>> page(HouseLabelVO houseLabel, Query query) {
- IPage<HouseLabelVO> pages = houseLabelService.selectHouseLabelPage(Condition.getPage(query), houseLabel);
+ IPage<HouseLabelVO> pages = userHouseLabelService.selectHouseLabelPage(Condition.getPage(query), houseLabel);
return R.data(pages);
}
@@ -89,8 +88,8 @@
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入houseLabel")
- public R save(@Valid @RequestBody HouseLabelEntity houseLabel) {
- return R.status(houseLabelService.save(houseLabel));
+ public R save(@Valid @RequestBody UserHouseLabelEntity houseLabel) {
+ return R.status(userHouseLabelService.save(houseLabel));
}
/**
@@ -99,8 +98,8 @@
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入houseLabel")
- public R update(@Valid @RequestBody HouseLabelEntity houseLabel) {
- return R.status(houseLabelService.updateById(houseLabel));
+ public R update(@Valid @RequestBody UserHouseLabelEntity houseLabel) {
+ return R.status(userHouseLabelService.updateById(houseLabel));
}
/**
@@ -109,8 +108,8 @@
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入houseLabel")
- public R submit(@Valid @RequestBody HouseLabelEntity houseLabel) {
- return R.status(houseLabelService.saveOrUpdate(houseLabel));
+ public R submit(@Valid @RequestBody UserHouseLabelEntity houseLabel) {
+ return R.status(userHouseLabelService.saveOrUpdate(houseLabel));
}
/**
@@ -120,8 +119,8 @@
*/
@PostMapping("/saveOrUpdateHouseLabel")
@ApiOperation(value = "自定义新增或修改", notes = "传入houseLabel")
- public R saveOrUpdateHouseLabel(@Valid @RequestBody HouseLabelEntity houseLabel) {
- return R.status(houseLabelService.saveOrUpdateHouseLabel(houseLabel));
+ public R saveOrUpdateHouseLabel(@Valid @RequestBody UserHouseLabelEntity houseLabel) {
+ return R.status(userHouseLabelService.saveOrUpdateHouseLabel(houseLabel));
}
/**
@@ -131,7 +130,7 @@
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
- return R.status(houseLabelService.removeByIds(Func.toLongList(ids)));
+ return R.status(userHouseLabelService.removeByIds(Func.toLongList(ids)));
}
/**
@@ -139,12 +138,12 @@
*/
@PostMapping("/removeHouseLabel")
@ApiOperationSupport(order = 7)
- public R removeHouseLabel(@RequestBody HouseLabelEntity houseLabel) {
- QueryWrapper<HouseLabelEntity> wrapper = new QueryWrapper<>();
+ public R removeHouseLabel(@RequestBody UserHouseLabelEntity houseLabel) {
+ QueryWrapper<UserHouseLabelEntity> wrapper = new QueryWrapper<>();
wrapper.eq("label_id",houseLabel.getLabelId())
.eq("house_code",houseLabel.getHouseCode());
// 返回
- return R.status(houseLabelService.remove(wrapper));
+ return R.status(userHouseLabelService .remove(wrapper));
}
--
Gitblit v1.9.3