| | |
| | | * 保存修改精品库商品关联信息 |
| | | * |
| | | * @param callback |
| | | * @param label |
| | | * @param request |
| | | * @param out |
| | | */ |
| | |
| | | public void removeGoods(AdminAcceptData acceptData,String callback, String ids, PrintWriter out) { |
| | | try { |
| | | Gson gson = new Gson(); |
| | | List<Long> goodsIds = gson.fromJson(ids, new TypeToken<ArrayList<Long>>() { |
| | | List<String> goodsIds = gson.fromJson(ids, new TypeToken<ArrayList<String>>() { |
| | | }.getType()); |
| | | |
| | | if (goodsIds == null || goodsIds.size() == 0) { |
| | |
| | | Long id = taoBaoGoodsBrief.getId(); |
| | | idBuf.append(id + ","); |
| | | |
| | | Long auctionId = taoBaoGoodsBrief.getAuctionId(); |
| | | String auctionId = taoBaoGoodsBrief.getAuctionId(); |
| | | if (auctionId != null) { |
| | | j++; |
| | | auctionIdBuf.append(auctionId + ","); |
| | |
| | | |
| | | /* 商品销售状态: 0 在售 1停售 */ |
| | | int saleStae = 1; |
| | | Long auctionId = taoBaoGoodsBrief.getAuctionId(); |
| | | String auctionId = taoBaoGoodsBrief.getAuctionId(); |
| | | if (auctionId != null) { |
| | | if (goodsBriefList != null && goodsBriefList.size() > 0) { |
| | | for (TaoBaoGoodsBrief tb : goodsBriefList) { |
| | | Long auctionIdTB = tb.getAuctionId(); |
| | | String auctionIdTB = tb.getAuctionId(); |
| | | if (auctionId.equals(auctionIdTB)) { |
| | | saleStae = 0; |
| | | } |
| | |
| | | } |
| | | |
| | | /* 券后价--计算 */ |
| | | BigDecimal couponPrice = TaoBaoUtil.getAfterUseCouplePrice(taoBaoGoodsBrief); |
| | | BigDecimal couponPrice = TaoBaoUtil.getCouponPrice(taoBaoGoodsBrief); |
| | | map.put("couponPrice", couponPrice); |
| | | |
| | | /* 预计收益: 公司、用户 */ |
| | |
| | | } |
| | | |
| | | /* 商品标签列表 */ |
| | | Long id = taoBaoGoodsBrief.getId(); |
| | | String id = taoBaoGoodsBrief.getAuctionId(); |
| | | int totalLabels = labelGoodsService.getCountQueryByGoodsId(id); |
| | | |
| | | // List<LabelGoods> labelList = labelService.getByGoodsId(id); |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "addGoodsLable") |
| | | public void addGoodsLable(AdminAcceptData acceptData,String callback, Long id, Long labId, HttpServletRequest request, PrintWriter out) { |
| | | public void addGoodsLable(AdminAcceptData acceptData,String callback, String id, Long labId, HttpServletRequest request, PrintWriter out) { |
| | | |
| | | try { |
| | | // 获取当前操作用户 |
| | |
| | | return; |
| | | } |
| | | |
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = taoBaoGoodsBriefService.selectByPrimaryKey(id); |
| | | TaoBaoGoodsBrief taoBaoGoodsBrief = taoBaoGoodsBriefService.selectByGoodsId(id); |
| | | if (taoBaoGoodsBrief == null) { |
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("该商品已不存在"))); |
| | | return; |
| | |
| | | } |
| | | |
| | | Gson gson = new Gson(); |
| | | List<Long> idList = gson.fromJson(ids, new TypeToken<ArrayList<Long>>() { |
| | | List<String> idList = gson.fromJson(ids, new TypeToken<ArrayList<String>>() { |
| | | }.getType()); |
| | | if (idList == null || idList.size() == 0) { |
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("请传递正确参数:102"))); |
| | |
| | | return; |
| | | } |
| | | |
| | | Long id = idList.get(0); |
| | | String id = idList.get(0); |
| | | |
| | | if (id == null) { |
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("请传递正确参数:104"))); |
| | |
| | | * @param pageIndex |
| | | * @param pageSize |
| | | * @param key |
| | | * @param id |
| | | * @param request |
| | | * @param out |
| | | */ |