| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "accordtorage", method = RequestMethod.POST)
|
| | | public void accordtorage(AcceptData acceptData, Long uid, Long auctionId, Integer goodsType, PrintWriter out) {
|
| | | public void accordtorage(AcceptData acceptData, Long uid, Long auctionId, PrintWriter out) {
|
| | |
|
| | | if (auctionId == null) {
|
| | | out.print(JsonUtil.loadFalseResult("未选择商品"));
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (goodsType == null) {
|
| | | goodsType = Constant.SOURCE_TYPE_TAOBAO;
|
| | | }
|
| | |
|
| | | try {
|
| | | UserGoodsStorage userGoodsStorage = userGoodsStorageService.getByUidAndAuctionId(uid, auctionId, goodsType);
|
| | | UserGoodsStorage userGoodsStorage = userGoodsStorageService.getByUidAndAuctionId(uid, auctionId, Constant.SOURCE_TYPE_TAOBAO);
|
| | | boolean storageState = false;
|
| | | if (userGoodsStorage != null) {
|
| | | // 取消加入选品库
|
| | |
| | | // 加入选品库
|
| | | Set<Long> set = new HashSet<Long>();
|
| | | set.add(auctionId);
|
| | | userGoodsStorageService.save(uid, set, goodsType);
|
| | | userGoodsStorageService.save(uid, set, Constant.SOURCE_TYPE_TAOBAO);
|
| | | storageState = true;
|
| | | }
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "sharegoods", method = RequestMethod.POST)
|
| | | public void shareGoods(AcceptData acceptData, Long uid, String storageIds, Integer goodsType, PrintWriter out) {
|
| | | public void shareGoods(AcceptData acceptData, Long uid, String storageIds, PrintWriter out) {
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(storageIds)) {
|
| | | out.print(JsonUtil.loadFalseResult("分享商品不能为空"));
|
| | |
| | | out.print(JsonUtil.loadFalseResult("分享商品数量只能是9个"));
|
| | | return;
|
| | | }
|
| | | |
| | | if (goodsType == null) {
|
| | | goodsType = Constant.SOURCE_TYPE_TAOBAO;
|
| | | }
|
| | |
|
| | | JSONObject data = userGoodsStorageService.shareGoods(uid, listStorageID, goodsType);
|
| | | JSONObject data = userGoodsStorageService.shareGoods(uid, listStorageID);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (UserGoodsStorageException e) {
|