yujian
2019-03-13 1a89a80dafd7842653087ff40c0fec8594df69b6
fanli/src/main/java/com/yeshi/fanli/controller/client/GoodsClassController.java
@@ -112,11 +112,10 @@
   @Resource
   private MonitorService monitorService;
   @Resource(name = "taskExecutor")
   private TaskExecutor executor;
   /**
    * 获取主类目
    * 
@@ -125,24 +124,24 @@
    */
   @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("获取失败"));
@@ -152,7 +151,7 @@
            e1.printStackTrace();
         }
      }
   }
   /**
@@ -182,7 +181,7 @@
         data.put("count", goodsSubClassList.size());
         data.put("goodsSecondClassList", JsonUtil.getApiCommonGson().toJson(goodsSubClassList));
         out.print(JsonUtil.loadTrueResult(data));
         // 更新分类点击次数
         executor.execute(new Runnable() {
            @Override
@@ -533,8 +532,8 @@
            // 设置SearchFilter
            taoKeGoodsService.setSearchFilter(searchfilter, filter, order, startprice, endprice, fastFilter,
                  totalSales);
            // 用户未输入最高价格时    最高价格限制99999
            // 用户未输入最高价格时 最高价格限制99999
            if (searchfilter.getEndPrice() == null) {
               searchfilter.setEndPrice(new BigDecimal(99999));
            }
@@ -646,6 +645,11 @@
         } else {
            taoBaoGoodsBrief.setSalesCount(biz30day + "");
         }
         // 白底图测试
         // if
         // (!StringUtil.isNullOrEmpty(taoBaoGoodsBrief.getPictUrlWhite()))
         // taoBaoGoodsBrief.setPictUrl(taoBaoGoodsBrief.getPictUrlWhite());
         array.add(gson.toJson(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null)));
      }
@@ -816,10 +820,10 @@
    */
   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);
         }
      }
@@ -837,14 +841,14 @@
         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 {