| | |
| | | public static final int PROPOR_ASC = 7;
|
| | | public static final int PROPOR_DESC = 8;
|
| | |
|
| | | /**
|
| | | * 批量添加标签 --- 淘宝
|
| | | * |
| | | * @param callback
|
| | | * @param label
|
| | | * @param request
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "addBatch")
|
| | | public void addBatch(String callback, String auctionIds, String lableNames, HttpServletRequest request, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | // 获取当前操作用户
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("当前账户失效,请重新登陆。")));
|
| | | return;
|
| | | }
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(auctionIds)) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("请选择正确的商品入库")));
|
| | | return;
|
| | | }
|
| | |
|
| | | Gson gson = new Gson();
|
| | | List<Long> auctionIdList = gson.fromJson(auctionIds, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | | if (auctionIdList == null || auctionIdList.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("请选择正确的商品入库")));
|
| | | return;
|
| | | }
|
| | |
|
| | | qualityFactoryService.addBatch(auctionIdList,lableNames, admin);
|
| | |
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult("添加成功")));
|
| | |
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | |
| | |
|
| | | /**
|
| | | * 保存修改精品库商品关联信息
|
| | |
| | | if (taoBaoGoodsBrief == null)
|
| | | continue; // 为空结束本次循环
|
| | |
|
| | | |
| | | String auctionUrl = taoBaoGoodsBrief.getAuctionUrl();
|
| | | if (auctionUrl != null && auctionUrl.trim().length() > 0 && auctionUrl.contains("id=null")) {
|
| | | auctionUrl =auctionUrl.replace("id=null","id="+ taoBaoGoodsBrief.getAuctionId());
|
| | | taoBaoGoodsBrief.setAuctionUrl(auctionUrl);
|
| | | }
|
| | | |
| | | Map<String, Object> map = new HashMap<String, Object>();
|
| | |
|
| | | BoutiqueAutoRule boutiqueAutoRule = selectionGoods.getBoutiqueAutoRule();
|