From 45c5ae21cb4d475fbc3a17df7e64aad434173bfd Mon Sep 17 00:00:00 2001 From: jianminghui Date: Tue, 5 Dec 2023 14:43:18 +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 --- .../impl/DdCategoryToSourceRelationIdServiceImpl.java | 3 ++- .../spi/move/SearchChoicenessSourceItemService.java | 6 +++--- .../mapper/DdCategoryToSourceRelationIdMapper.xml | 10 ++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/DdCategoryToSourceRelationIdServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/DdCategoryToSourceRelationIdServiceImpl.java index 29e849c1..338aefcc 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/DdCategoryToSourceRelationIdServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/DdCategoryToSourceRelationIdServiceImpl.java @@ -5,6 +5,7 @@ import com.ms.dal.entity.DdCategoryToSourceRelation; import com.ms.api.service.DdCategoryToSourceRelationIdService; import com.ms.dal.mapper.DdCategoryToSourceRelationIdMapper; import lombok.extern.slf4j.Slf4j; +import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -63,7 +64,7 @@ public class DdCategoryToSourceRelationIdServiceImpl implements DdCategoryToSour } @Override - public Integer getSingleDdCanUsedDsCid(Long shopId, String curCid) { + public Integer getSingleDdCanUsedDsCid(@Param("shopId") Long shopId, @Param("curCid") String curCid) { String dsCid = ddCategoryToSourceRelationIdMapper.getSingleDdCanUsedDsCid(shopId, curCid); if (dsCid == null) { return 0; diff --git a/ms-biz/src/main/java/com/ms/api/spi/move/SearchChoicenessSourceItemService.java b/ms-biz/src/main/java/com/ms/api/spi/move/SearchChoicenessSourceItemService.java index bedcdca4..01c3e928 100644 --- a/ms-biz/src/main/java/com/ms/api/spi/move/SearchChoicenessSourceItemService.java +++ b/ms-biz/src/main/java/com/ms/api/spi/move/SearchChoicenessSourceItemService.java @@ -61,7 +61,7 @@ public class SearchChoicenessSourceItemService extends SPIBaseService implements } if(ddCanUsed != null && ddCanUsed > 0 && cid != null && cid > 0) { - cid = getSingleDdCanUsedDsCid(cid); + cid = getSingleDdCanUsedDsCid(String.valueOf(cid)); if (cid == 0) { result.put("result", "success"); result.put("sourceItems", new ArrayList<>()); @@ -148,8 +148,8 @@ public class SearchChoicenessSourceItemService extends SPIBaseService implements return getDsCidByDdCid(ddCid); } - private Integer getSingleDdCanUsedDsCid(Integer curCid) { - return ddCategoryToSourceRelationIdService.getSingleDdCanUsedDsCid(shopId, String.valueOf(curCid)); + private Integer getSingleDdCanUsedDsCid(String curCid) { + return ddCategoryToSourceRelationIdService.getSingleDdCanUsedDsCid(shopId, curCid); } private Integer getDsCidByDdCid(Long ddCid) { diff --git a/ms-dal/src/main/resources/mapper/DdCategoryToSourceRelationIdMapper.xml b/ms-dal/src/main/resources/mapper/DdCategoryToSourceRelationIdMapper.xml index 08d5f16a..8cb5d52f 100644 --- a/ms-dal/src/main/resources/mapper/DdCategoryToSourceRelationIdMapper.xml +++ b/ms-dal/src/main/resources/mapper/DdCategoryToSourceRelationIdMapper.xml @@ -158,10 +158,12 @@