| | |
| | |
|
| | | @Resource
|
| | | private MonitorService monitorService;
|
| | | |
| | |
|
| | | @Resource(name = "taskExecutor")
|
| | | private TaskExecutor executor;
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 获取主类目
|
| | | *
|
| | |
| | | */
|
| | | @RequestMapping(value = "getgoodsclass", method = RequestMethod.POST)
|
| | | public void getGoodsClass(AcceptData acceptData, PrintWriter out) {
|
| | | |
| | |
|
| | | try {
|
| | | System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
|
| | | if (system == null) {
|
| | | out.print(JsonUtil.loadFalseResult("系统不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | List<GoodsClass> goodsClassList = goodsClassService.getListClassCache(system.getId());
|
| | | if (goodsClassList == null || goodsClassList.size() == 0) {
|
| | | out.print(JsonUtil.loadFalseResult("暂无数据"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", goodsClassList.size());
|
| | | data.put("goodsClassList", goodsClassList);
|
| | | |
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("获取失败"));
|
| | |
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | data.put("count", goodsSubClassList.size());
|
| | | data.put("goodsSecondClassList", JsonUtil.getApiCommonGson().toJson(goodsSubClassList));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | |
| | |
|
| | | // 更新分类点击次数
|
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | |
| | | // 设置SearchFilter
|
| | | taoKeGoodsService.setSearchFilter(searchfilter, filter, order, startprice, endprice, fastFilter,
|
| | | totalSales);
|
| | | |
| | | // 用户未输入最高价格时 最高价格限制99999
|
| | |
|
| | | // 用户未输入最高价格时 最高价格限制99999
|
| | | if (searchfilter.getEndPrice() == null) {
|
| | | searchfilter.setEndPrice(new BigDecimal(99999));
|
| | | }
|
| | |
| | | } else {
|
| | | taoBaoGoodsBrief.setSalesCount(biz30day + "");
|
| | | }
|
| | |
|
| | | // 白底图测试
|
| | | // if
|
| | | // (!StringUtil.isNullOrEmpty(taoBaoGoodsBrief.getPictUrlWhite()))
|
| | | // taoBaoGoodsBrief.setPictUrl(taoBaoGoodsBrief.getPictUrlWhite());
|
| | |
|
| | | array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)));
|
| | | }
|
| | |
| | | */
|
| | | private void setTaoBaoCouponHongBao(List<TaoBaoCoupon> taoBaoCoupons) {
|
| | | if (taoBaoCoupons.size() > 0) {
|
| | | BigDecimal proportion= hongBaoManageService.getFanLiRate();
|
| | | |
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | |
|
| | | for (TaoBaoCoupon taoBaoCoupon : taoBaoCoupons) {
|
| | | BigDecimal hb = TaoBaoUtil.getCouponHongBaoInfo(taoBaoCoupon,proportion);
|
| | | BigDecimal hb = TaoBaoUtil.getCouponHongBaoInfo(taoBaoCoupon, proportion);
|
| | | taoBaoCoupon.setHongbao(hb);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | List<Map<String, Object>> listCache = goodsClassService.getClassListAllCache(system.getId());
|
| | | if (listCache == null) {
|
| | | listCache = new ArrayList<Map<String,Object>>();
|
| | | listCache = new ArrayList<Map<String, Object>>();
|
| | | }
|
| | | |
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("categoryList", listCache);
|
| | | |
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | |
| | |
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("获取失败"));
|
| | | try {
|