peng
4 天以前 184ba31ccdd9f18c6ea7ab12b341ffd2a03b2cef
seller-api/src/main/java/cn/lili/controller/goods/GoodsStoreController.java
@@ -101,7 +101,13 @@
        //获取当前登录商家账号
        String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
        goodsSearchParams.setStoreId(storeId);
        return ResultUtil.data(goodsSkuService.getGoodsSkuByPage(goodsSearchParams));
        IPage<GoodsSku> page = goodsSkuService.getGoodsSkuByPage(goodsSearchParams);
        page.getRecords().forEach(item ->{
            if (StringUtils.isNotBlank(item.getThumbnail())&&!item.getThumbnail().contains("http")) {
                item.setThumbnail(cosUtil.getPreviewUrl(item.getThumbnail()));
            }
        });
        return ResultUtil.data(page);
    }
    @ApiOperation(value = "分页获取库存告警商品列表")
@@ -157,7 +163,6 @@
    @ApiOperation(value = "修改商品")
    @PutMapping(value = "/update/{goodsId}", consumes = "application/json", produces = "application/json")
    public ResultMessage<GoodsOperationDTO> update(@Valid @RequestBody GoodsOperationDTO goodsOperationDTO, @PathVariable String goodsId) {
        System.err.println(JSONObject.toJSONString(goodsOperationDTO));
        goodsService.editGoods(goodsOperationDTO, goodsId);
        return ResultUtil.success();
    }