| | |
| | | @Resource
|
| | | private PinDuoDuoCacheUtil pinDuoDuoCacheUtil;
|
| | |
|
| | | |
| | | /**
|
| | | * 淘宝商品详情
|
| | | * |
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param uid
|
| | |
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
|
| | | |
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, null, fanLiRate, shareRate);
|
| | |
| | | if (moneyInfo != null) {
|
| | | String shareMoney = moneyInfo.getShareMoney();
|
| | | if (goods.getBiz30day() >= 1000) {
|
| | | listShareUser = shamUserService.listRandShareUser(10, new BigDecimal(shareMoney.replaceAll("¥", "")), 1, 5);
|
| | | listShareUser = shamUserService.listRandShareUser(10, new BigDecimal(shareMoney.replaceAll("¥", "")), 1,
|
| | | 5);
|
| | | }
|
| | | }
|
| | | extraVO.setListShareUser(listShareUser);
|
| | | |
| | |
|
| | | // 领券人列表
|
| | | List<ShamUser> listCouponUser = new ArrayList<ShamUser>();
|
| | |
| | | }
|
| | | extraVO.setListCouponUser(listCouponUser);
|
| | |
|
| | | |
| | | if (uid != null) {
|
| | | // 是否加入收藏
|
| | | CollectionGoodsV2 collectionGoods = collectionGoodsV2Service.findByUidAndAuctionId(uid, id,
|
| | |
| | | // 是否加入选品库
|
| | | extraVO.setStorage(userGoodsStorageService.isExistStorage(uid, id, Constant.SOURCE_TYPE_TAOBAO));
|
| | | }
|
| | |
|
| | |
|
| | | // 测试
|
| | | SystemClientParams params = systemClientParamsService.getSystemClientParamsBySystemAndKey(system,
|
| | |
| | | reduceHongBao.setTip("当日领取,当日内使用,过期失效");
|
| | | reduceHongBao.setTotal(buyGoods.getTotalHongBaoCount());
|
| | |
|
| | | |
| | | OtherInfo otherInfo = new OtherInfo();
|
| | | otherInfo.setReduceHongBao(reduceHongBao);
|
| | | goodsDetail.setOtherInfo(otherInfo);
|
| | |
| | | if (goodsMoney != null) {
|
| | | goodsMoney.setMoneyType(moneyType);
|
| | | }
|
| | | |
| | |
|
| | | // 分享路径
|
| | | if (StringUtil.isNullOrEmpty(helpLink)) {
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 京东商品详情
|
| | |
| | | if (couponInfo != null) {
|
| | | // 券链接处理
|
| | | String materialId = "https://item.jd.com/" + id + ".html";
|
| | | String url = JDApiUtil.convertShortLink(materialId, couponInfo.getLink(), JDApiUtil.POSITION_COUPON+"", null);
|
| | | String url = JDApiUtil.convertShortLink(materialId, couponInfo.getLink(), JDApiUtil.POSITION_COUPON + "",
|
| | | null);
|
| | | couponInfo.setLink(url);
|
| | | }
|
| | |
|
| | |
| | | goodsDetail.setShopInfo(null);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | GoodsDetailExtraVO extraVO = new GoodsDetailExtraVO();
|
| | | extraVO.setIsNative(false);
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 商品详情推荐(猜你喜欢 + 推荐)
|
| | | *
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | |
| | | List<TaoBaoGoodsBrief> goodsList = TaoKeApiUtil.getRelationGoodsRecommend(id, 10);
|
| | | // 初始化
|
| | | if (goodsList == null) {
|
| | | goodsList = new ArrayList<TaoBaoGoodsBrief>();
|
| | | }
|
| | |
|
| | |
|
| | | List<GoodsDetailVO> listExtra = new ArrayList<GoodsDetailVO>();
|
| | | TaoKeAppInfo app = new TaoKeAppInfo();
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | |
| | | List<GoodsDetailVO> listQuality = new ArrayList<GoodsDetailVO>();
|
| | | // 取偶数个数据
|
| | | if (listExtra.size() % 2 != 0) {
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | |
| | | /**
|
| | | * 京东购买链接
|
| | | * |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param id
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 拼多多购买链接
|
| | | * |
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param id
|
| | |
| | | data.put("jumpLink", jumpLink);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 是否在参与推广
|
| | | * |
| | | * @param goodsId
|
| | | * -商品ID
|
| | | * @param goodsType
|
| | | * -TB/JD
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "isGoodsExtend")
|
| | | public void isGoodsExtend(AcceptData acceptData, String goodsId, Integer goodsType, PrintWriter out) {
|
| | | if (StringUtil.isNullOrEmpty(goodsId)) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "未参与推广"));
|
| | | return;
|
| | | }
|
| | | if (goodsType == null) {
|
| | | out.print(JsonUtil.loadFalseResult(2, "缺少goodsType"));
|
| | | return;
|
| | | }
|
| | | JSONObject data = new JSONObject();
|
| | | if (goodsType == Constant.SOURCE_TYPE_TAOBAO) {
|
| | | TaoBaoGoodsBrief goods = null;
|
| | | try {
|
| | | goods = TaoKeApiUtil.getSimpleGoodsInfo(Long.parseLong(goodsId));
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | if (goods == null) {
|
| | | data.put("extend", false);
|
| | | data.put("url", "https://h5.m.taobao.com/awp/core/detail.htm?id=" + goodsId);
|
| | | } else {
|
| | | data.put("extend", true);
|
| | | }
|
| | |
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_JD) {
|
| | | JDGoods goods = JDApiUtil.getGoodsDetail(Long.parseLong(goodsId));
|
| | | if (goods == null) {
|
| | | data.put("extend", false);
|
| | | data.put("url", String.format("https://item.m.jd.com/product/%s.html", goodsId));
|
| | | } else {
|
| | | data.put("extend", true);
|
| | | }
|
| | | } else if (goodsType == Constant.SOURCE_TYPE_PDD) {
|
| | | PDDGoodsDetail goods = PinDuoDuoApiUtil.getGoodsDetail(Long.parseLong(goodsId));
|
| | | if (goods == null) {
|
| | | data.put("extend", false);
|
| | | data.put("url", String.format("https://mobile.yangkeduo.com/goods.html?goods_id=%s", goodsId));
|
| | | } else {
|
| | | data.put("extend", true);
|
| | | }
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|