| | |
| | | public List<GoodsVO> goodsList(Goods search) { |
| | | List<Goods> goodsList = this.list(new LambdaQueryWrapper<Goods>() |
| | | .eq(Goods::getStatus, GoodsStatus.UP.getCode()) |
| | | .eq(Goods::getDelFlag, 0) |
| | | .eq(Objects.nonNull(search.getGoodsCategoryId()), Goods::getGoodsCategoryId, search.getGoodsCategoryId()) |
| | | .like(StringUtils.isNotEmpty(search.getName()), Goods::getName, search.getName())); |
| | | |
| | |
| | | |
| | | GoodsArea goodsArea = goodsAreaMapper.selectOne(new LambdaQueryWrapper<GoodsArea>() |
| | | .eq(GoodsArea::getGoodsId, goodsId) |
| | | .eq(GoodsArea::getVip, appUser.getVipId()) |
| | | .eq(GoodsArea::getProvinceCode, appUser.getProvinceCode()) |
| | | .eq(StringUtils.isNotEmpty(appUser.getCityCode()), GoodsArea::getCityCode, appUser.getCityCode()) |
| | | .eq(StringUtils.isNotEmpty(appUser.getDistrictCode()), GoodsArea::getDistrictsCode, appUser.getDistrictCode())); |
| | |
| | | |
| | | // 指定门店 |
| | | Integer appointStore = goods.getAppointStore(); |
| | | if (appointStore == 1){ |
| | | if (null != appointStore && appointStore == 1){ |
| | | List<GoodsShop> goodsShopList = goods.getGoodsShopList(); |
| | | if (CollectionUtils.isEmpty(goodsShopList)){ |
| | | throw new NullPointerException("请选择指定门店"); |