| | |
| | | |
| | | /** |
| | | * 单个商品加入选品库 |
| | | * |
| | | * @param callback |
| | | * @param storageIds |
| | | * id数组 |
| | | * |
| | | * id数组 |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "accordtorage", method = RequestMethod.POST) |
| | | public void accordtorage(AcceptData acceptData, Long uid, long id, Integer goodsType, PrintWriter out) { |
| | | public void accordtorage(AcceptData acceptData, Long uid, String id, Integer goodsType, PrintWriter out) { |
| | | |
| | | if (uid == null) { |
| | | out.print(JsonUtil.loadFalseResult("用户未登录")); |
| | |
| | | userGoodsStorageService.deleteByPrimaryKey(userGoodsStorage.getId()); |
| | | } else { |
| | | // 加入选品库 |
| | | Set<Long> set = new HashSet<Long>(); |
| | | Set<String> set = new HashSet<>(); |
| | | set.add(id); |
| | | userGoodsStorageService.save(uid, set, goodsType); |
| | | storageState = true; |
| | |
| | | // API网络接口验证是否在售 |
| | | List<TaoBaoGoodsBrief> listTaoKeGoods = null; |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | List<Long> listGid = new ArrayList<Long>(); |
| | | List<String> listGid = new ArrayList<>(); |
| | | for (UserGoodsStorage userGoodsStorage : listStorage) { |
| | | CommonGoods commonGoods = userGoodsStorage.getCommonGoods(); |
| | | if (commonGoods == null) { |
| | |
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | if (listTaoKeGoods != null && listTaoKeGoods.size() > 0) { |
| | | int state = 1; // 默认停售 |
| | | Long goodsId = commonGoods.getGoodsId(); |
| | | String goodsId = commonGoods.getGoodsId(); |
| | | for (TaoBaoGoodsBrief taoKeGoods : listTaoKeGoods) { |
| | | Long auctionId = taoKeGoods.getAuctionId(); |
| | | String auctionId = taoKeGoods.getAuctionId(); |
| | | if (goodsId == auctionId || goodsId.equals(auctionId)) { |
| | | state = 0; // 在售 |
| | | break; |
| | |
| | | |
| | | /** |
| | | * 分享商品返回二维码图片 |
| | | * |
| | | * @param callback |
| | | * |
| | | * @param storageIds |
| | | * id数组 |
| | | * @param out |