From 9d521d0ff5fe8b09ceb9d7f2ec0f883048860810 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Thu, 04 Jan 2024 18:32:30 +0800
Subject: [PATCH] bug修复+通过小区id 查询小区的楼栋和单元
---
src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java b/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
index fc20728..114aba3 100644
--- a/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
+++ b/src/main/java/org/springblade/modules/task/service/impl/TaskLabelReportingEventServiceImpl.java
@@ -69,21 +69,25 @@
taskLabelReportingEvent.setTaskId(aLong);
taskLabelReportingEvent.setUserId(AuthUtil.getUserId());
taskLabelReportingEvent.setLabelName(name);
- return baseMapper.insert(taskLabelReportingEvent) > 0 ? true : false;
+ return baseMapper.insert(taskLabelReportingEvent) > 0;
}
return false;
}
@Override
- public Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent) {
+ public Boolean updateLabelReporting(TaskLabelReportingEventEntity taskLabelReportingEvent) throws Exception {
Long aLong = taskService.updateTask(null, null, null, "", AuthUtil.getUserId(),
taskLabelReportingEvent.getTaskId(), taskLabelReportingEvent.getStatus());
if (aLong > 0) {
taskLabelReportingEvent.setConfirmFlag(taskLabelReportingEvent.getStatus().toString());
taskLabelReportingEvent.setConfirmUserId(AuthUtil.getUserId());
taskLabelReportingEvent.setConfirmTime(new Date());
- return baseMapper.updateById(taskLabelReportingEvent) > 0 ? true : false;
+ Boolean b = baseMapper.updateById(taskLabelReportingEvent) > 0;
+ if (b) {
+ return b;
+ }
+ throw new Exception("更新失败!");
}
return false;
}
--
Gitblit v1.9.3