admin
2019-09-18 b19d2e730b0ea707b500b307f58c46ba0cef695f
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserGoodsStorageController.java
@@ -57,10 +57,10 @@
         out.print(JsonUtil.loadFalseResult("用户未登录"));
         return;
      }
      try {
         UserGoodsStorage userGoodsStorage = userGoodsStorageService.getByUidAndAuctionId(uid, auctionId);
         UserGoodsStorage userGoodsStorage = userGoodsStorageService.getByUidAndAuctionId(uid, auctionId, Constant.SOURCE_TYPE_TAOBAO);
         boolean storageState = false;
         if (userGoodsStorage != null) {
            // 取消加入选品库
@@ -69,7 +69,7 @@
            // 加入选品库
            Set<Long> set = new HashSet<Long>();
            set.add(auctionId);
            userGoodsStorageService.save(uid, set);
            userGoodsStorageService.save(uid, set, Constant.SOURCE_TYPE_TAOBAO);
            storageState = true;
         }
         
@@ -94,7 +94,7 @@
    * @param out
    */
   @RequestMapping(value = "addstorage", method = RequestMethod.POST)
   public void addStorage(AcceptData acceptData, Long uid, String auctionIds, PrintWriter out) {
   public void addStorage(AcceptData acceptData, Long uid, String auctionIds, Integer goodsType,PrintWriter out) {
      try {
         Gson gson = new Gson();
         Set<Long> set = gson.fromJson(auctionIds, new TypeToken<HashSet<Long>>() {}.getType());
@@ -103,7 +103,10 @@
            return;
         }
         userGoodsStorageService.save(uid, set);
         if (goodsType == null) {
            goodsType = Constant.SOURCE_TYPE_TAOBAO;
         }
         userGoodsStorageService.save(uid, set, goodsType);
         out.print(JsonUtil.loadTrueResult("添加成功"));
      } catch (UserGoodsStorageException e) {
@@ -143,9 +146,9 @@
         JSONObject data = new JSONObject();
         JSONArray array = new JSONArray();
         long count = userGoodsStorageService.countQueryByUid(uid);
         long count = userGoodsStorageService.countQueryByUid(uid, null);
         if (count > 0) {
            array = userGoodsStorageService.getMyStorage((page - 1) * pageSize, pageSize, uid);
            array = userGoodsStorageService.getMyStorage((page - 1) * pageSize, pageSize, uid, null);
         }
         data.put("count", count);
@@ -221,7 +224,6 @@
      }
      try {
         Gson gson = new Gson();
         List<Long> listStorageID = gson.fromJson(storageIds, new TypeToken<ArrayList<Long>>() {}.getType());
         if (listStorageID == null || listStorageID.size() < 9) {
@@ -233,7 +235,6 @@
            out.print(JsonUtil.loadFalseResult("分享商品数量只能是9个"));
            return;
         }
         JSONObject data = userGoodsStorageService.shareGoods(uid, listStorageID);
         out.print(JsonUtil.loadTrueResult(data));