From e6564194923cee1454abc55be1ee64fa6bb68be6 Mon Sep 17 00:00:00 2001 From: mashuai Date: Tue, 19 Aug 2025 09:27:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bonus/material/part/mapper/PartLeaseMapper.java | 4 ++-- .../material/part/service/impl/PartLeaseServiceImpl.java | 5 ++--- .../main/resources/mapper/material/part/PartLeaseMapper.xml | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/part/mapper/PartLeaseMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/part/mapper/PartLeaseMapper.java index cf05a843..7de90069 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/part/mapper/PartLeaseMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/part/mapper/PartLeaseMapper.java @@ -154,10 +154,10 @@ public interface PartLeaseMapper { /** * 查询配件库管员配置 - * @param typeId + * @param typeKeepers * @return */ - List selectTypeKeeperByTypeId(Long typeId); + List selectTypeKeeperByTypeId(MaPartTypeKeeper typeKeepers); /** * 查询配件库管关系 diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/part/service/impl/PartLeaseServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/part/service/impl/PartLeaseServiceImpl.java index 13a7660c..8744482c 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/part/service/impl/PartLeaseServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/part/service/impl/PartLeaseServiceImpl.java @@ -429,14 +429,13 @@ public class PartLeaseServiceImpl implements PartLeaseService { if (!CollectionUtils.isEmpty(typeKeepers.getTypeIds())) { for (Long typeId : typeKeepers.getTypeIds()) { // 先根据typeId查询库管员配置是否已经存在,存在则先删除 - List list = partLeaseMapper.selectTypeKeeperByTypeId(typeId); + typeKeepers.setTypeId(typeId); + List list = partLeaseMapper.selectTypeKeeperByTypeId(typeKeepers); if (!CollectionUtils.isEmpty(list)) { for (MaPartTypeKeeper typeKeeper : list) { partLeaseMapper.deleteTypeKeeper(typeKeeper); } } - typeKeepers.setTypeId(typeId); - typeKeepers.setUserId(typeKeepers.getUserId()); typeKeepers.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString()); typeKeepers.setCreateTime(DateUtils.getNowDate()); int res = partLeaseMapper.insertTypeKeeper(typeKeepers); diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/part/PartLeaseMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/part/PartLeaseMapper.xml index ec02edb8..8280c03e 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/part/PartLeaseMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/part/PartLeaseMapper.xml @@ -203,6 +203,7 @@ ma_part_type_keeper WHERE type_id = #{typeId} + AND user_id = #{userId}