admin
2019-08-13 37194e2d4b4ab85f7f29c1e900c406afe294579a
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/PushController.java
@@ -11,6 +11,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.yeshi.utils.JsonUtil;
import org.yeshi.utils.taobao.TbImgUtil;
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.common.JumpDetailV2;
@@ -156,7 +157,8 @@
    */
   @RequestMapping(value = "/bindHWPush", method = RequestMethod.POST)
   public void bindHWDeviceToken(AcceptData acceptData, String token, Long uid, PrintWriter out) {
      deviceTokenHWService.addDeviceToken(token, acceptData.getDevice(), uid);
      deviceTokenHWService.addDeviceToken(token, acceptData.getDevice(), uid,
            Integer.parseInt(acceptData.getVersion()));
      out.print(JsonUtil.loadTrueResult("成功"));
   }
@@ -212,7 +214,8 @@
               // 统计商品数量
               long totalgoods = 0;
               // 商品id
               Long auctionId = null;
               CommonGoods commonGoods = null;
               if (StringUtil.isNullOrEmpty(picture)) {
                  try {
                     List<PushGoodsGroup> listGroup = pushGoodsGroupService.getAllInfoByPushId(pushId);
@@ -223,10 +226,9 @@
                        PushGoodsGroup pushGoodsGroup = listGroup.get(0);
                        if (pushGoodsGroup != null) {
                           CommonGoods commonGoods = pushGoodsGroup.getCommonGoods();
                           commonGoods = pushGoodsGroup.getCommonGoods();
                           if (commonGoods != null) {
                              picture = commonGoods.getPicture();
                              auctionId = commonGoods.getGoodsId();
                           }
                        }
                     }
@@ -235,7 +237,7 @@
                  }
               }
               result.put("picture", picture);
               result.put("picture", TbImgUtil.getTBSize320Img(picture));
               String fontColor1 = "#666666";
               String fontColor2 = "#E5005C";
@@ -263,10 +265,12 @@
               JumpDetailV2 jumpDetail = null;
               if (totalgoods == 1) {
                  params = JumpDetailParamsFactory.createGoodsParams(auctionId);
                  params = JumpDetailParamsFactory.createGoodsParams(commonGoods.getGoodsId(),
                        commonGoods.getGoodsType());
                  // 单个商品跳转商品详情
                  jumpDetail = jumpDetailV2Service.getByTypeCache("goodsdetail");
                  jumpDetail = jumpDetailV2Service.getByTypeCache("goodsdetail",
                        Constant.getPlatformCode(acceptData.getPlatform()),
                        Integer.parseInt(acceptData.getVersion()));
               } else {
                  String url = configService.get("push_goods_details");
@@ -278,7 +282,9 @@
                  params = JumpDetailParamsFactory.createWEBParams(url);
                  // 跳转推荐详情
                  jumpDetail = jumpDetailV2Service.getByTypeCache("web");
                  jumpDetail = jumpDetailV2Service.getByTypeCache("web",
                        Constant.getPlatformCode(acceptData.getPlatform()),
                        Integer.parseInt(acceptData.getVersion()));
               }
               result.put("params", params);
               result.put("jumpDetail", jumpDetail);