yujian
2019-08-27 d8359ddb48dab5cc797a9d552e11fde571f4920c
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/JingDongControllerV2.java
@@ -28,6 +28,7 @@
import com.yeshi.fanli.service.inter.lable.QualityGoodsService;
import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsService;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.jd.JDApiUtil;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
import net.sf.json.JSONArray;
@@ -54,25 +55,25 @@
   @Resource
   private DaTaoKeGoodsService daTaoKeGoodsService;
   @Resource
   private SwiperPictureService swiperPictureService;
   @Resource
   private QualityGoodsService qualityGoodsService;
   @Resource
   private ConfigService configService;
   @Resource
   private SpecialService specialService;
   @Resource
   private JDGoodsService jdGoodsService;
   /**
    * 京东专题分类
    *
    * @param acceptData
    * @param out
    */
@@ -83,10 +84,11 @@
      root.put("jdLink", configService.get("jingdong_h5_link"));
      out.print(JsonUtil.loadTrueResult(root));
   }
   /**
    * 京东专题 + 商品列表
    *
    * @param acceptData
    * @param out
    */
@@ -99,14 +101,14 @@
            topPicList = new ArrayList<SwiperPicture>();
         }
         root.put("listPic", JsonUtil.getApiCommonGson().toJson(topPicList));
         List<Special> listSpecial = specialService.listByPlaceKey("jingdong_special_index");
         if (listSpecial == null) {
            listSpecial = new ArrayList<Special>();
         }
         root.put("listSpe", JsonUtil.getApiCommonGson().toJson(listSpecial));
      }
      try {
         List<JDGoods> goodsList = jdGoodsService.specialSearch(page, cid);
         JSONArray array = new JSONArray();
@@ -116,12 +118,11 @@
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                  .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            for (JDGoods goods : goodsList) {
               GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, null, fanLiRate,
                     shareRate);
               GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, fanLiRate, shareRate);
               array.add(gson.toJson(goodsDetailVO));
            }
         }
         root.put("list", array);
         root.put("count", 1000);
         out.print(JsonUtil.loadTrueResult(root));