From 9ebd493f879d20a312c24d5762d4610a0e79c757 Mon Sep 17 00:00:00 2001
From: hayu <1604366271@qq.com>
Date: Fri, 29 Aug 2025 18:18:41 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../material/lease/mapper/LeaseTaskMapper.java | 7 +++++++
.../lease/service/impl/LeaseTaskServiceImpl.java | 7 ++++++-
.../mapper/material/lease/LeaseTaskMapper.xml | 14 +++++++++++++-
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java
index 59b01659..8589782e 100644
--- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java
+++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/mapper/LeaseTaskMapper.java
@@ -209,4 +209,11 @@ public interface LeaseTaskMapper {
String getAncestors(Long userId);
String getProjectNameById(Long projectId);
+
+ /**
+ * 根据新类型查询旧类型
+ * @param leaseApplyDetails
+ * @return
+ */
+ LeaseApplyDetails selectTypeByNewType(LeaseApplyDetails leaseApplyDetails);
}
diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java
index c11c3c6e..de69691b 100644
--- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java
+++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseTaskServiceImpl.java
@@ -954,13 +954,18 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
if (leaseApplyDetails == null) {
return AjaxResult.error("参数不能为空");
}
+ //查询是否有newType
+ LeaseApplyDetails newType = mapper.selectTypeByNewType(leaseApplyDetails);
+ if (newType != null) {
+ leaseApplyDetails.setTypeId(newType.getTypeId());
+ }
// 根据parentId及typeId更新lease_apply_details表的发布数量
int result = mapper.updatePublishSub(leaseApplyDetails);
if (result == 0) {
return AjaxResult.error("发布驳回失败,请联系管理员");
}
- // 根据parentId及typeId更新lease_apply_details表的发布数量
+ // 根据parentId及newTypeId更新lease_apply_details表的发布数量
int details = mapper.deletePublishDetails(leaseApplyDetails);
if (details == 0) {
throw new ServiceException("发布驳回详情删除失败,请联系管理员");
diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml
index 4976b12c..72a408eb 100644
--- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml
+++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseTaskMapper.xml
@@ -1039,7 +1039,7 @@
lease_publish_details
WHERE
parent_id = #{parentId}
- and type_id = #{typeId}
+ and new_type = #{newTypeId}
and publish_task = #{publishTask}
@@ -1064,4 +1064,16 @@
+