From b629a3455ed7f6cd6ad96f0988ba418bcba3e1c4 Mon Sep 17 00:00:00 2001 From: "15989082884@163.com" <15989082884@163.com> Date: Mon, 22 Jan 2024 17:53:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/third/PortalGoodsController.java | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/qs/serve/modules/third/PortalGoodsController.java b/src/main/java/com/qs/serve/modules/third/PortalGoodsController.java index da29d0df..f22ebdbf 100644 --- a/src/main/java/com/qs/serve/modules/third/PortalGoodsController.java +++ b/src/main/java/com/qs/serve/modules/third/PortalGoodsController.java @@ -45,19 +45,20 @@ public class PortalGoodsController { */ @PostMapping("getSpuBySku") public List getSpuBySku(@RequestBody SkuToGetSpuParam param){ - LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); - lqw.eq(SysDictData::getGroupKey,"book-code-to-belong"); - List sysDictDataList = dictDataService.list(lqw); - String placeName = null; - for (SysDictData dictData : sysDictDataList) { - if(dictData.getKeyVal().equals(param.getPlaceName())){ - placeName = dictData.getLabel(); - } - } - if(placeName==null){ - log.warn("字典缺账套{}配置",param.getPlaceName()); - Assert.throwEx("缺账套["+param.getPlaceName()+"]配置"); - } +// LambdaQueryWrapper lqw = new LambdaQueryWrapper<>(); +// lqw.eq(SysDictData::getGroupKey,"book-code-to-belong"); +// List sysDictDataList = dictDataService.list(lqw); +// String placeName = null; +// for (SysDictData dictData : sysDictDataList) { +// if(dictData.getKeyVal().equals(param.getPlaceName())){ +// placeName = dictData.getLabel(); +// } +// } +// if(placeName==null){ +// log.warn("字典缺账套{}配置",param.getPlaceName()); +// Assert.throwEx("缺账套["+param.getPlaceName()+"]配置"); +// } + String placeName = param.getPlaceName(); List skuList = goodsSkuService.getByCodes(param.getInvCodes()); List specialSkuKey = new ArrayList<>(); @@ -73,7 +74,7 @@ public class PortalGoodsController { spuLqw.eq(GoodsSpu::getShelf,1); spuLqw.in(GoodsSpu::getId,spuIds); List spuList = goodsSpuService.list(spuLqw); - spuIds = spuList.stream().map(a->a.getId).collect(Collectors.toList()); + spuIds = spuList.stream().map(a->a.getId()).collect(Collectors.toList()); if(spuIds.size()==0){ spuIds.add(0L);