fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsController.java
@@ -25,6 +25,7 @@ import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException; import com.yeshi.fanli.exception.tlj.TaoLiJinCreateException; import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.log.TaoKeLogHelper; import com.yeshi.fanli.service.inter.goods.ShareGoodsService; import com.yeshi.fanli.service.inter.goods.recommend.RecommendGoodsDeleteHistoryService; import com.yeshi.fanli.service.inter.monitor.BusinessEmergent110Service; @@ -91,10 +92,9 @@ @Resource private IntegralGetService integralGetService; @Resource private TLJFreeBuyGoodsService tljFreeBuyGoodsService; private void doTaoLiJinBuy(AcceptData acceptData, Long uid, Long auctionId, PrintWriter out) { JSONObject data = new JSONObject(); @@ -132,7 +132,6 @@ integralGetService.addTaoLiJinBuy(uid, auctionId); } /** * 获取淘宝的分享链接 @@ -189,7 +188,7 @@ doTaoLiJinBuy(acceptData, uid, auctionId, out); return; } ClientTBPid clientTBPid = null; String dpid = null; @@ -276,7 +275,7 @@ if (!StringUtil.isNullOrEmpty(relationId)) {// if (source != null && "taolijin_free_buy".equals(source)) { taoBaoLink = shareGoodsService.getTaoLiJinLinkForBuy(uid, specialId, auctionId, TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID); TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID); } else { taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(uid, auctionId, relationId, TaoBaoConstant.TAOBAO_RELATION_AS_SPECIAL_PID); @@ -303,6 +302,9 @@ data.put("tbPidInfo", clientTBPid); out.print(JsonUtil.loadTrueResult(data)); TaoKeLogHelper.convertLinkInfo( String.format("uid:%s auctionId:%s 输出结果:", uid, auctionId + "") + data.toString()); // 获得金币 integralGetService.addCouponRebate(uid); fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -33,7 +33,6 @@ import com.yeshi.fanli.entity.bus.user.UserInfo; import com.yeshi.fanli.entity.common.JumpDetailV2; import com.yeshi.fanli.entity.dynamic.CommentInfo; import com.yeshi.fanli.entity.dynamic.CommentInfo.CommentInfoEnum; import com.yeshi.fanli.entity.dynamic.DynamicInfo; import com.yeshi.fanli.entity.dynamic.GoodsEvaluate; import com.yeshi.fanli.entity.dynamic.GoodsEvaluate.EvaluateEnum; @@ -123,7 +122,7 @@ @Resource private QrCodeService qrCodeService; @Resource private ConvertLinkManager convertLinkManager; @@ -590,6 +589,7 @@ */ @RequestMapping(value = "getDynamicList", method = RequestMethod.POST) public void getDynamicListNew(AcceptData acceptData, Integer page, Long cid, String subId, PrintWriter out) { try { int type = 1; if (cid == TYPE_FAQUAN){ @@ -773,7 +773,7 @@ continue; } String jumpLink = getJumpLink(goodsVO, user,relationId, inviteCode); String jumpLink = getJumpLink(goodsVO, user, relationId, inviteCode); if (!StringUtil.isNullOrEmpty(jumpLink)) { list.add(jumpLink); } @@ -785,7 +785,7 @@ if (imgInfo.getGoodsVO() != null) if (imgInfo.getGoodsVO().getGoodsId().longValue() == goodsId.longValue() && imgInfo.getGoodsVO().getGoodsType() == goodsType.intValue()) { String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user,relationId, inviteCode); String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode); if (!StringUtil.isNullOrEmpty(jumpLink)) { list.add(jumpLink); } @@ -795,7 +795,7 @@ } else if (type == 2 || type == 3) { for (ImgInfo imgInfo : imgs) { if (imgInfo.getGoodsVO() != null) { String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user,relationId, inviteCode); String jumpLink = getJumpLink(imgInfo.getGoodsVO(), user, relationId, inviteCode); if (!StringUtil.isNullOrEmpty(jumpLink)) { list.add(jumpLink); } @@ -816,7 +816,6 @@ } } } Integer shareCount = goodsEvaluate.getShareNum(); if (shareCount == null) { @@ -838,21 +837,22 @@ data.put("list", list); out.print(JsonUtil.loadTrueResult(data)); } @Resource private ShareGoodsService shareGoodsService; private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user,String relationId, String inviteCode) { private String getJumpLink(GoodsDetailVO goodsVO, UserInfo user, String relationId, String inviteCode) { String jumpLink = null; if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { TaoBaoLink taoBaoLink=null; TaoBaoLink taoBaoLink = null; try { taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(user.getId(), goodsVO.getGoodsId(), relationId); } catch (ShareGoodsException e) { e.printStackTrace(); } jumpLink =configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()).replace("[淘口令]", taoBaoLink.getTaoToken()); jumpLink = configService.get(ConfigKeyEnum.taobaoShareQrcodeText.getKey()).replace("[淘口令]", taoBaoLink.getTaoToken()); } else if (goodsVO.getGoodsType() == Constant.SOURCE_TYPE_JD) { JDGoods jdGoods = jdGoodsCacheUtil.getGoodsInfo(goodsVO.getGoodsId()); if (jdGoods == null) { @@ -933,12 +933,12 @@ } } } try { text=convertLinkManager.convertLinkFromText(text, uid, true); text = convertLinkManager.convertLinkFromText(text, uid, true); } catch (Exception e) { e.printStackTrace(); out.print(JsonUtil.loadFalseResult("转链失败")); out.print(JsonUtil.loadFalseResult("评论生成失败")); return; } @@ -946,6 +946,5 @@ data.put("text", text); out.print(JsonUtil.loadTrueResult(data)); } } } fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/GoodsController.java
@@ -471,7 +471,7 @@ * @param out */ private void getDetialPDD(WXMPAcceptData acceptData, Long id, Long uid, String from, PrintWriter out) { PDDGoodsDetail pddGoods = PinDuoDuoApiUtil.getGoodsDetail(id); PDDGoodsDetail pddGoods =null; //PinDuoDuoApiUtil.getGoodsDetail(id); if (pddGoods == null) { out.print(JsonUtil.loadFalseResult(2, "商品不存在")); return; fanli/src/main/java/com/yeshi/fanli/log/TaoKeLogHelper.java
@@ -34,5 +34,9 @@ taoKeLogger.error(message); } public static void convertLinkInfo(String msg){ taoKeLogger.info("淘宝转链结果:"+msg); } } fanli/src/main/resource/image/share/down_tip_jd_pdd.pngfanli/src/main/resource/image/share/down_tip_tb.pngfanli/src/test/java/org/fanli/TaoKeTest.java
@@ -400,5 +400,14 @@ } } @Test public void test13(){ try { TaoKeApiUtil.getSimpleGoodsInfo(573867930843L); } catch (TaobaoGoodsDownException e) { e.printStackTrace(); } } } fanli/src/test/java/org/fanli/Test_Thread.java
@@ -1,19 +1,11 @@ package org.fanli; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import org.apache.http.client.HttpClient; import org.apache.http.impl.client.DefaultHttpClient; public class Test_Thread { public static void main(String[] args) { new Thread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub } }); HttpClient client=new DefaultHttpClient(); } }