diff --git a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/mapper/MerchantMapeer.java b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/mapper/MerchantMapeer.java index 3723dd8bb..ef1f28ad4 100644 --- a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/mapper/MerchantMapeer.java +++ b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/mapper/MerchantMapeer.java @@ -16,10 +16,29 @@ import java.util.List; public interface MerchantMapeer extends BaseMapper { - MerchantOrderDTO findMerchantOrder(@Param("contract_number") String contract_number, List warehouseId); - + /** + * 根据合同号和仓库ID列表查找商家订单。 + * + * @param contractNumber 合同编号,用于查找相关的商家订单。 + * @param warehouseId 仓库ID列表,用于筛选在指定仓库中的订单。 + * @return 返回一个MerchantOrderDTO对象,包含符合条件的商家订单信息。 + */ + MerchantOrderDTO findMerchantOrder(@Param("contractNumber") String contractNumber, @Param("warehouseId") List warehouseId); + + /** + * 根据授权密钥查找仓库ID列表。 + * + * @param authKey 授权密钥,用于权限验证和特定仓库的访问。 + * @return 返回一个字符串列表,包含匹配的仓库ID。如果没有找到匹配的仓库ID,则返回空列表。 + */ List findWarehouseIdByAuthKey(@Param("authKey") String authKey); - List findPackage(@Param("contract_number") String contract_number); + /** + * 根据合同编号查找包件信息。 + * + * @param contractNumber 合同编号,用于查询特定合同下的包件信息。 + * @return 返回一个MerchantPackageVO类型的列表,包含符合条件的包件信息。 + */ + List findPackage(@Param("contractNumber") String contractNumber); } diff --git a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/mapper/MerchantMapper.xml b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/mapper/MerchantMapper.xml index dc51542d4..593bc3589 100644 --- a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/mapper/MerchantMapper.xml +++ b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/mapper/MerchantMapper.xml @@ -9,7 +9,7 @@ t.is_zero zeroOrder, t.total_number total from logpm_distribution_stock_article t - where t.order_code = #{contract_number} + where t.order_code = #{contractNumber} and t.warehouse_id in @@ -25,26 +25,26 @@ and t.is_deleted = 0 diff --git a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/MerchantService.java b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/MerchantService.java index 6ea0b028d..dc9944946 100644 --- a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/MerchantService.java +++ b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/MerchantService.java @@ -9,10 +9,11 @@ import com.logpm.datasharing.vo.MerchantOrderVO; public interface MerchantService { /** - * 鏍规嵁鍚堝悓缂栧彿鏌ヨ鍟嗗搧淇℃伅銆 + * 鏍规嵁鍚堝悓缂栧彿鍜屾巿鏉冨瘑閽ヨ幏鍙栧晢鎴疯鍗曚俊鎭 * - * @param contract_number 鍚堝悓缂栧彿锛岀敤浜庢煡璇㈢壒瀹氬悎鍚屼笅鐨勫晢鍝佷俊鎭 - * @return 杩斿洖涓涓寘鍚晢鍝佷俊鎭殑鍝嶅簲瀵硅薄锛屽叿浣撳晢鍝佷俊鎭皝瑁呭湪MerchantOrderVO涓 + * @param contractNumber 鍚堝悓缂栧彿锛岀敤浜庤瘑鍒壒瀹氱殑鍚堝悓 + * @param authKey 鎺堟潈瀵嗛挜锛岀敤浜庨獙璇佽姹傜殑鍚堟硶鎬 + * @return MerchantOrderVO 鍟嗘埛璁㈠崟鐨勮鍥惧璞★紝鍖呭惈璁㈠崟鐨勮缁嗕俊鎭 */ MerchantOrderVO goods(String contractNumber, String authKey); } diff --git a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/MerchantServiceImpl.java b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/MerchantServiceImpl.java index 04dd6de5a..16f5d7340 100644 --- a/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/MerchantServiceImpl.java +++ b/blade-service/logpm-data-sharing/src/main/java/com/logpm/datasharing/service/impl/MerchantServiceImpl.java @@ -25,18 +25,19 @@ public class MerchantServiceImpl implements MerchantService { private final MerchantMapeer merchantMapeer; @Override - public MerchantOrderVO goods(String contract_number, String authKey) { + public MerchantOrderVO goods(String contractNumber, String authKey) { MerchantOrderDTO dto = null; // 鏍规嵁 authKey 鑾峰彇浠撳簱淇℃伅 List warehouseId = merchantMapeer.findWarehouseIdByAuthKey(authKey); if (CollUtil.isNotEmpty(warehouseId)) { // 鏍规嵁鍚堝悓缂栧彿鑾峰彇鍚堝悓淇℃伅 - dto = merchantMapeer.findMerchantOrder(contract_number, warehouseId); + dto = merchantMapeer.findMerchantOrder(contractNumber, warehouseId); if (ObjectUtil.isNotEmpty(dto)) { + // TODO 杩欓噷鍒嗗嚑绉嶆儏鍐 闆舵媴璁㈠崟锛屽寘浠讹紝搴撳瓨鍝佹湁鏁版嵁/鏃犳暟鎹 鐩墠鍙疄鐜颁簡鍖呬欢锛屽叾浠栫殑鍚庣画澶勭悊 // 闆舵媴璁㈠崟 // 瀹氬埗鍝 // 鍖呬欢/搴撳瓨鍝 - List packageVO = merchantMapeer.findPackage(contract_number); + List packageVO = merchantMapeer.findPackage(contractNumber); MerchantOrderPackageVO orderPackageVO = new MerchantOrderPackageVO(); BeanUtil.copyProperties(dto, orderPackageVO); orderPackageVO.setPackageInfor(packageVO); @@ -45,4 +46,5 @@ public class MerchantServiceImpl implements MerchantService { } return null; } + }