| | |
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TaoBaoConstant;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
|
| | | import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil;
|
| | | import com.yeshi.fanli.util.cache.TaoBaoGoodsCacheUtil;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static String getERCodeContent(TaoBaoGoodsBrief goods, String token) {
|
| | | String content = String.format("【%s】%s元", goods.getUserType() == 1 ? "T猫价" : "T宝价",
|
| | | MoneyBigDecimalUtil.getWithNoZera(goods.getZkPrice()) + "");
|
| | | content += "\n\r";
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(goods.getCouponInfo())) {
|
| | | content += String.format("【券后价】%s元", TaoBaoUtil.getAfterUseCouplePrice(goods) + "");
|
| | | content += "\n\r";
|
| | | }
|
| | | content += "------------";
|
| | | content += "\n\r";
|
| | | content += "復制这条" + token + ",進入Tao宝即可购买";
|
| | | return content;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 创建淘宝分享信息
|
| | | *
|
| | |
| | |
|
| | | try {
|
| | | ShareInfoVO shareInfo = new ShareInfoVO();
|
| | | // 测试
|
| | | List<String> commentTexts = new ArrayList<>();
|
| | | commentTexts.add("口令1");
|
| | | commentTexts.add("口令2口令口令淘口令口令口令淘口令");
|
| | | commentTexts.add("口令3");
|
| | | commentTexts.add("口令口令淘口令口令口令淘口令口令口令淘口令口令口令淘口令口令口令淘口令口令口令淘口令");
|
| | | shareInfo.setCommentTexts(commentTexts);
|
| | |
|
| | | TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(uid, goodsId, relationId);
|
| | |
|
| | |
| | | descText = descText.substring(0);
|
| | | }
|
| | | shareInfo.setDescText(descText);
|
| | | // 测试
|
| | | // 2.0.2之前
|
| | | if (!VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | shareInfo.setClickUrl(getERCodeContent(taoBaoLink.getGoods(), shareInfo.getToken()));
|
| | |
|
| | | shareInfo.setWxErCode(getERCodeContent(taoBaoLink.getGoods(), shareInfo.getToken()));
|
| | |
|
| | | // 提示图文内容
|
| | | String imgs = configService.get("goods_share_notify_imgs");
|
| | |
| | | public void createJDShare(AcceptData acceptData, Long uid, Long goodsId, String source, PrintWriter out) {
|
| | | JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(goodsId);
|
| | | if (jdGoods == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "该商品淘已下架"));
|
| | | out.print(JsonUtil.loadFalseResult(1, "该商品已下架"));
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE);
|
| | |
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|