| | |
| | | @Resource
|
| | | private TaoBaoClassService taoBaoClassService;
|
| | |
|
| | |
|
| | | /**
|
| | | *
|
| | | * @param callback
|
| | |
| | | public void queryOnSale(String callback, Integer pageIndex, Integer pageSize, String key, Long tbClassId,
|
| | | Integer startPrice, Integer endPrice, String startTkRate, String endTkRate, Integer sort, Integer istmall,
|
| | | Integer hasCoupon, Integer baoYou, Integer startDsr, Integer overseas, Integer needPrepay,
|
| | | Integer includePayRate30, Integer includeGoodRate, Integer includeRfdRate, Integer npxLevel,
|
| | | Integer includePayRate30, Integer includeGoodRate, Integer includeRfdRate, Integer npxLevel, String cid,
|
| | | PrintWriter out) {
|
| | |
|
| | | try {
|
| | | // 查询物料
|
| | | TaoBaoSearchResult result = getGoodsByWuLiao(pageIndex, pageSize, key, tbClassId, startPrice, endPrice, startTkRate, endTkRate, sort,
|
| | | istmall, hasCoupon, baoYou, startDsr, overseas, needPrepay, includePayRate30, includeGoodRate, |
| | | includeRfdRate, npxLevel);
|
| | | TaoBaoSearchResult result = getGoodsByWuLiao(pageIndex, pageSize, key, tbClassId, startPrice, endPrice,
|
| | | startTkRate, endTkRate, sort, istmall, hasCoupon, baoYou, startDsr, overseas, needPrepay,
|
| | | includePayRate30, includeGoodRate, includeRfdRate, npxLevel,cid);
|
| | |
|
| | | if (result == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未获取到淘宝商品信息"));
|
| | |
| | |
|
| | | /**
|
| | | * 加入精选库商品
|
| | | * |
| | | * @param callback
|
| | | * @param pageIndex
|
| | | * @param key
|
| | |
| | | }
|
| | |
|
| | | Gson gson2 = new Gson();
|
| | | List<Long> listTaoBaoId = gson2.fromJson(auctionIds, new TypeToken<ArrayList<Long>>() {}.getType());
|
| | | List<Long> listTaoBaoId = gson2.fromJson(auctionIds, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | | if (listTaoBaoId == null || listTaoBaoId.size() == 0) {
|
| | | out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("请选择正确的商品入库")));
|
| | | return;
|
| | | }
|
| | |
|
| | | // 查询物料
|
| | | TaoBaoSearchResult result = getGoodsByWuLiao(pageIndex, pageSize, key, tbClassId, startPrice, endPrice, startTkRate, endTkRate, sort,
|
| | | istmall, hasCoupon, baoYou, startDsr, overseas, needPrepay, includePayRate30, includeGoodRate, |
| | | includeRfdRate, npxLevel);
|
| | | TaoBaoSearchResult result = getGoodsByWuLiao(pageIndex, pageSize, key, tbClassId, startPrice, endPrice,
|
| | | startTkRate, endTkRate, sort, istmall, hasCoupon, baoYou, startDsr, overseas, needPrepay,
|
| | | includePayRate30, includeGoodRate, includeRfdRate, npxLevel,null);
|
| | |
|
| | | if (result == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("未获取到淘宝商品信息"));
|
| | |
| | |
|
| | | /**
|
| | | * 根据条件淘宝商品查询
|
| | | * |
| | | * @param pageIndex
|
| | | * @param pageSize
|
| | | * @param key
|
| | |
| | | public TaoBaoSearchResult getGoodsByWuLiao(Integer pageIndex, Integer pageSize, String key, Long tbClassId,
|
| | | Integer startPrice, Integer endPrice, String startTkRate, String endTkRate, Integer sort, Integer istmall,
|
| | | Integer hasCoupon, Integer baoYou, Integer startDsr, Integer overseas, Integer needPrepay,
|
| | | Integer includePayRate30, Integer includeGoodRate, Integer includeRfdRate, Integer npxLevel)
|
| | | Integer includePayRate30, Integer includeGoodRate, Integer includeRfdRate, Integer npxLevel, String cids)
|
| | | throws Exception {
|
| | |
|
| | | SearchFilter filter = new SearchFilter();
|
| | |
| | | filter.setCateIds(taoBaoCatIds);
|
| | | }
|
| | | }
|
| | | if (!StringUtil.isNullOrEmpty(cids))
|
| | | filter.setCateIds(cids);
|
| | |
|
| | | // 查询条件和类目id不能同时为空
|
| | | if (StringUtil.isNullOrEmpty(key) && tbClassId == null) {
|
| | |
| | | int tkRate = (int) (Float.parseFloat(endTkRate) * 100);
|
| | | filter.setEndTkRate(tkRate);
|
| | | }
|
| | | // 排序字段 销量(total_sales)淘客佣金比率(tk_rate)累计推广量(tk_total_sales)总支出佣金(tk_total_commi)
|
| | | // 排序字段
|
| | | // 销量(total_sales)淘客佣金比率(tk_rate)累计推广量(tk_total_sales)总支出佣金(tk_total_commi)
|
| | | if (sort != null) {
|
| | | filter.setSort(sort);
|
| | | }
|
| | |
| | | if (npxLevel != null && npxLevel > 0 && npxLevel < 4) {
|
| | | filter.setNpxLevel(npxLevel);
|
| | | }
|
| | | |
| | |
|
| | | boolean islink = false;
|
| | | Long auctionId = null;
|