| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "getBuyLink", method = RequestMethod.POST) |
| | | public void getBuyLink(WXMPAcceptData acceptData, Long goodsId, Integer goodsType, String from, String couponUrl, |
| | | public void getBuyLink(WXMPAcceptData acceptData, String goodsId, Integer goodsType, String from, String couponUrl, |
| | | Long uid, String inviteCode, PrintWriter out) { |
| | | if (goodsId == null || goodsType == null) { |
| | | out.print(JsonUtil.loadFalseResult(1, "商品信息传递错误")); |
| | |
| | | |
| | | String jumpLink = null; |
| | | if (goodsType.intValue() == Constant.SOURCE_TYPE_JD) { // 京东 |
| | | JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(goodsId); |
| | | JDGoods goods = jdGoodsCacheUtil.getGoodsInfo(Long.parseLong(goodsId)); |
| | | if (goods == null) { |
| | | out.print(JsonUtil.loadFalseResult(2, "商品已下架")); |
| | | return; |
| | |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "sharePoster", method = RequestMethod.POST) |
| | | public void sharePoster(WXMPAcceptData acceptData, Long goodsId, Integer goodsType, String from, Integer type, |
| | | public void sharePoster(WXMPAcceptData acceptData, String goodsId, Integer goodsType, String from, Integer type, |
| | | Long uid, PrintWriter out) { |
| | | if (uid == null || uid < 1) { |
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录")); |
| | |
| | | } |
| | | |
| | | if (goodsType.intValue() == Constant.SOURCE_TYPE_JD) { // 京东 |
| | | createPosterJD(acceptData, goodsId, goodsType, from, type, user, inviteCode, out); |
| | | createPosterJD(acceptData, Long.parseLong(goodsId), goodsType, from, type, user, inviteCode, out); |
| | | } else if (goodsType.intValue() == Constant.SOURCE_TYPE_PDD) { // 拼多多 |
| | | createPosterPDD(acceptData, goodsId, goodsType, from, type, user, inviteCode, out); |
| | | } else { |
| | |
| | | /** |
| | | * 创建拼多多分享海报 |
| | | */ |
| | | private void createPosterPDD(WXMPAcceptData acceptData, Long goodsId, Integer goodsType, String from, Integer type, |
| | | private void createPosterPDD(WXMPAcceptData acceptData, String goodsId, Integer goodsType, String from, Integer type, |
| | | UserInfo user, String inviteCode, PrintWriter out) { |
| | | PDDGoodsDetail pddGoods = pinDuoDuoCacheUtil.getGoodsInfo(goodsId); |
| | | if (pddGoods == null) { |