| | |
| | | @RequestMapping(value = "removeGoods")
|
| | | public void removeGoods(String callback, String ids, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<String> goodsIds = gson.fromJson(ids, new TypeToken<ArrayList<String>>() {}.getType());
|
| | | List<Long> goodsIds = gson.fromJson(ids, new TypeToken<ArrayList<Long>>() {}.getType());
|
| | |
|
| | | if (goodsIds == null || goodsIds.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("未检测到移除商品数据")));
|
| | | } else {
|
| | | // 商品移除精品库
|
| | | qualityFactoryService.deleteByGoodsId(goodsIds);
|
| | | // 清理商品所有标签
|
| | | labelGoodsService.deleteByGoodsId(goodsIds);
|
| | |
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult("移除成功")));
|
| | | return;
|
| | | }
|
| | |
|
| | | qualityFactoryService.deleteBatchByTaoBaoGoodsId(goodsIds);
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult("移除成功")));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作失败")));
|
| | | e.printStackTrace();
|