From 8d8c7da4e91028fc877f101dcd244bef3e18c197 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Sun, 12 Nov 2023 07:34:21 +0800
Subject: [PATCH] 标签报事+通知公告
---
src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java b/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java
index 13f6e01..f34961f 100644
--- a/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java
+++ b/src/main/java/org/springblade/modules/house/service/impl/HouseLabelServiceImpl.java
@@ -23,6 +23,9 @@
import org.springblade.modules.house.mapper.HouseLabelMapper;
import org.springblade.modules.house.service.IHouseLabelService;
import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springblade.modules.label.entity.LabelEntity;
+import org.springblade.modules.label.service.ILabelService;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -34,6 +37,9 @@
*/
@Service
public class HouseLabelServiceImpl extends ServiceImpl<HouseLabelMapper, HouseLabelEntity> implements IHouseLabelService {
+
+ @Autowired
+ private ILabelService labelService;
@Override
public IPage<HouseLabelVO> selectHouseLabelPage(IPage<HouseLabelVO> page, HouseLabelVO houseLabel) {
@@ -48,7 +54,7 @@
@Override
public boolean saveOrUpdateHouseLabel(HouseLabelEntity houseLabel) {
// 查询标签名称
- HouseLabelEntity labelEntity = getById(houseLabel.getLabelId());
+ LabelEntity labelEntity = labelService.getById(houseLabel.getLabelId());
houseLabel.setLabelName(labelEntity.getLabelName());
// 判断同一个房屋同一个标签是否已存在,已存在则更新,不存在则新增
QueryWrapper<HouseLabelEntity> queryWrapper = new QueryWrapper<>();
@@ -56,6 +62,7 @@
.eq("label_id",houseLabel.getLabelId());
HouseLabelEntity one = getOne(queryWrapper);
if (null != one){
+ houseLabel.setId(one.getId());
// 更新
return updateById(houseLabel);
}
--
Gitblit v1.9.3