From 2b1a74f4faa5a00a294bdc6a6d956c2e009cf467 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Tue, 16 Apr 2024 15:32:09 +0800
Subject: [PATCH] 管理员过滤文章
---
src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java
index af3164f..3971f67 100644
--- a/src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java
+++ b/src/main/java/org/springblade/modules/house/service/impl/UserHouseLabelServiceImpl.java
@@ -100,4 +100,27 @@
public IPage<HouseholdLabelVO> getCommunityStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) {
return page.setRecords(baseMapper.getCommunityStatisticalLabels(page, householdLabel));
}
+
+ /**
+ * 房屋-标签 房屋自定义新增或修改
+ *
+ * @param userHouseLabelEntity
+ * @return
+ */
+ @Override
+ public boolean saveOrUpdateHouseLabel(UserHouseLabelEntity userHouseLabelEntity) {
+ // 查询标签名称
+ LabelEntity labelEntity = labelService.getById(userHouseLabelEntity.getLabelId());
+ if (labelEntity != null) {
+ userHouseLabelEntity.setLabelName(labelEntity.getLabelName());
+ }
+ // 先删除之前的房屋绑定的标签
+ QueryWrapper<UserHouseLabelEntity> queryWrapper = new QueryWrapper<>();
+ queryWrapper.eq("house_code", userHouseLabelEntity.getHouseCode())
+ .eq("lable_type", 2);
+ // 删除
+ remove(queryWrapper);
+ // 插入
+ return save(userHouseLabelEntity);
+ }
}
--
Gitblit v1.9.3