| | |
| | | import com.yeshi.fanli.exception.pdd.PDDApiException; |
| | | import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException; |
| | | import com.yeshi.fanli.lijin.manager.GoodsLijinMnager; |
| | | import com.yeshi.fanli.lijin.manager.UserLijinMnager; |
| | | import com.yeshi.fanli.service.inter.goods.CollectionGoodsV2Service; |
| | | import com.yeshi.fanli.service.inter.pdd.PDDAuthService; |
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService; |
| | |
| | | @Resource |
| | | private GoodsLijinMnager goodsLijinMnager; |
| | | |
| | | |
| | | @Resource |
| | | private UserLijinMnager userLijinMnager; |
| | | |
| | | @Resource |
| | | private PIDManager pidManager; |
| | | |
| | | |
| | | /** |
| | | * 获取商品详情 |
| | |
| | | GoodsDetailVO goodsDetailVO = new GoodsDetailVO(); |
| | | GoodsDetailVO.GoodsExtraVO extraVO = new GoodsDetailVO.GoodsExtraVO(); |
| | | GoodsMoneyConfigParamsDTO paramsDTO = new GoodsMoneyConfigParamsDTO(); |
| | | paramsDTO.setFanLiRate(new BigDecimal("60")); |
| | | paramsDTO.setFanLiRate(goodsLijinMnager.getFanLiRate(uid)); |
| | | // 领券人列表 |
| | | List<ShamUser> listCouponUser = new ArrayList<>(); |
| | | Long goodsIdSuning = null; |
| | | switch (goodsType) { |
| | | case Constant |
| | | .SOURCE_TYPE_TAOBAO: |
| | |
| | | .SOURCE_TYPE_SUNING: |
| | | String[] ids = SuningUtil.getGoodsIdDetail(goodsId); |
| | | SuningGoodsInfo suningGoodsInfo = SuningApiUtil.getGoodsDetail(ids[1], ids[0]); |
| | | goodsIdSuning = Long.parseLong(suningGoodsInfo.getCommodityInfo().getCommodityCode()); |
| | | |
| | | goodsDetailVO.setGoods(GoodsDetailVOLijinFactory.convertSuningGoods(suningGoodsInfo, paramsDTO)); |
| | | extraVO.setDetailUrl("http://apph5.banliapp.com/apppage/goods_img_suning.html?id=" |
| | | + suningGoodsInfo.getCommodityInfo().getCommodityCode() + "&supplierCode=" |
| | |
| | | //是否收藏 |
| | | extraVO.setCollected(false); |
| | | if (uid != null) { |
| | | CollectionGoodsV2 collectionGoodsV2 = collectionGoodsV2Service.findByUidAndAuctionId(uid, Long.parseLong(goodsDetailVO.getGoods().getGoodsId()), goodsType); |
| | | CollectionGoodsV2 collectionGoodsV2 = collectionGoodsV2Service.findByUidAndAuctionId(uid, goodsType == Constant.SOURCE_TYPE_SUNING ? goodsIdSuning : Long.parseLong(goodsDetailVO.getGoods().getGoodsId()), goodsType); |
| | | if (collectionGoodsV2 != null) { |
| | | extraVO.setCollected(true); |
| | | } |
| | |
| | | data.put("type", 1); |
| | | data.put("link", link); |
| | | data.put("native", true); |
| | | data.put("userLevel", userLijinMnager.getUserLevelInfo(uid, acceptData.getSystem())); |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | } catch (LiJinException e) { |
| | | out.print(JsonUtil.loadFalseResult(e.getMsg())); |
| | |
| | | * @param goodsDetailVO |
| | | */ |
| | | private void loadLijinInfo(Long uid, GoodsDetailVO goodsDetailVO) { |
| | | VIPEnum vipRank = goodsLijinMnager.getVIPRank(uid); |
| | | VIPEnum vipRank = userLijinMnager.getVIPRank(uid); |
| | | GoodsDetailVO.GoodsHongBaoListVO.UserLevelVO userLevelVO = goodsLijinMnager.getUserLevel(vipRank); |
| | | if (goodsDetailVO.getGoods().getPriceList() != null && goodsDetailVO.getGoods().getPriceList().size() > 0) |
| | | goodsDetailVO.getGoods().getPriceList().get(0).setUserLevel(userLevelVO); |