From 8b7258c9427882bb1798f1502eaa35184c6e374e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 09 Aug 2024 14:29:18 +0800
Subject: [PATCH] 短信指定楼栋发送

---
 src/main/java/org/springblade/modules/house/controller/HouseLabelController.java |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java b/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
index 0b1a16b..2483b52 100644
--- a/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
+++ b/src/main/java/org/springblade/modules/house/controller/HouseLabelController.java
@@ -16,6 +16,7 @@
  */
 package org.springblade.modules.house.controller;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
@@ -23,7 +24,6 @@
 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;
@@ -31,7 +31,7 @@
 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.vo.HouseLabelVO;
+import org.springblade.modules.house.vo.UserHouseLabelVO;
 import org.springblade.modules.house.wrapper.HouseLabelWrapper;
 import org.springblade.modules.house.service.IHouseLabelService;
 import org.springblade.core.boot.ctrl.BladeController;
@@ -56,7 +56,7 @@
 	@GetMapping("/detail")
 	@ApiOperationSupport(order = 1)
 	@ApiOperation(value = "详情", notes = "传入houseLabel")
-	public R<HouseLabelVO> detail(HouseLabelEntity houseLabel) {
+	public R<UserHouseLabelVO> detail(HouseLabelEntity houseLabel) {
 		HouseLabelEntity detail = houseLabelService.getOne(Condition.getQueryWrapper(houseLabel));
 		return R.data(HouseLabelWrapper.build().entityVO(detail));
 	}
@@ -66,7 +66,7 @@
 	@GetMapping("/list")
 	@ApiOperationSupport(order = 2)
 	@ApiOperation(value = "分页", notes = "传入houseLabel")
-	public R<IPage<HouseLabelVO>> list(HouseLabelEntity houseLabel, Query query) {
+	public R<IPage<UserHouseLabelVO>> list(HouseLabelEntity houseLabel, Query query) {
 		IPage<HouseLabelEntity> pages = houseLabelService.page(Condition.getPage(query), Condition.getQueryWrapper(houseLabel));
 		return R.data(HouseLabelWrapper.build().pageVO(pages));
 	}
@@ -77,8 +77,8 @@
 	@GetMapping("/page")
 	@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);
+	public R<IPage<UserHouseLabelVO>> page(UserHouseLabelVO houseLabel, Query query) {
+		IPage<UserHouseLabelVO> pages = houseLabelService.selectHouseLabelPage(Condition.getPage(query), houseLabel);
 		return R.data(pages);
 	}
 
@@ -133,5 +133,18 @@
 		return R.status(houseLabelService.removeByIds(Func.toLongList(ids)));
 	}
 
+	/**
+	 * 房屋-标签 自定义删除
+	 */
+	@PostMapping("/removeHouseLabel")
+	@ApiOperationSupport(order = 7)
+	public R removeHouseLabel(@RequestBody HouseLabelEntity houseLabel) {
+		QueryWrapper<HouseLabelEntity> wrapper = new QueryWrapper<>();
+		wrapper.eq("label_id",houseLabel.getLabelId())
+			.eq("house_code",houseLabel.getHouseCode());
+		// 返回
+		return R.status(houseLabelService.remove(wrapper));
+	}
+
 
 }

--
Gitblit v1.9.3