| | |
| | | @Override
|
| | | public FileUploadResult save(Long uid, ShareSourceTypeEnum source, String title, List<TaoBaoGoodsBrief> listGoods) throws UserShareGoodsRecordException {
|
| | |
|
| | | if (listGoods == null || listGoods.size() <= 1) {
|
| | | if (listGoods == null || listGoods.size() < 0) {
|
| | | throw new UserShareGoodsRecordException(1, "分享商品数量不足");
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | FileUploadResult shareImg = createShareImg(userShareGoodsRecord, listGoodsBrief);
|
| | | |
| | | // 短连接
|
| | | String shortLink = HttpUtil.getShortLink(shareImg.getUrl());
|
| | | if (!StringUtil.isNullOrEmpty(shortLink)) {
|
| | | shareImg.setUrl(shortLink);
|
| | | }
|
| | | |
| | |
|
| | | if (listGroup.size() > 0) {
|
| | | userShareGoodsGroupService.insertBatch(listGroup);
|