admin
2019-05-17 4ccdfd05dc5967eaa7876920eeaff190f49e6a81
品牌版本控制修改,淘宝授权之后取消提示页面
6个文件已修改
83 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/aspect/SignValidateAspect.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/AuthCallBackController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/RecommendController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/aspect/SignValidateAspect.java
@@ -33,7 +33,7 @@
@Aspect
@Order(2)
public class SignValidateAspect {
    public static final String EDP = "execution(* com.yeshi.fanli.controller.client.*.*(..))";
    public static final String EDP = "execution(* com.yeshi.fanli.controller.client.v1.*.*(..))";
    public static String KEY = "";
fanli/src/main/java/com/yeshi/fanli/controller/AuthCallBackController.java
@@ -1,6 +1,7 @@
package com.yeshi.fanli.controller;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.Date;
@@ -225,9 +226,11 @@
            if (errCode == 0)// 成功
            {
                if ("share".equalsIgnoreCase(source)) {
                    response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=0");
                    // response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=0");
                    closeWebPage(response.getWriter());
                } else if ("zigou".equalsIgnoreCase(source)) {
                    response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_rebateState.html?code=0");
                    // response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_rebateState.html?code=0");
                    closeWebPage(response.getWriter());
                } else if ("bind".equalsIgnoreCase(source)) {
                    String script = String.format(
                            "<script>if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href = 'yestv://toast#%s';setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.toast(\"恭喜你,淘宝绑定成功\");yestv.finishPage();}</script>",
@@ -236,9 +239,11 @@
                }
            } else {// 失败
                if ("share".equalsIgnoreCase(source)) {
                    response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=1");
                    // response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_bonusState.html?code=1");
                    closeWebPage(response.getWriter());
                } else if ("zigou".equalsIgnoreCase(source)) {
                    response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_rebateState.html?code=1");
                    // response.sendRedirect("http://apph5.yeshitv.com/apppage/flq_rebateState.html?code=1");
                    closeWebPage(response.getWriter());
                } else if ("bind".equalsIgnoreCase(source)) {
                    String script = String.format(
                            "<script>if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href = 'yestv://toast#%s';setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.toast(\"抱歉,淘宝绑定失败\");yestv.finishPage();}</script>",
@@ -252,6 +257,11 @@
    }
    private void closeWebPage(PrintWriter out) {
        String script = "<script>if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href = 'yestv://toast#%s';setTimeout(function(){window.location.href = 'yestv://finishPage';},100);} else {yestv.finishPage();}</script>";
        out.print(script);
    }
    @RequestMapping(value = "pinduoduo")
    public void pinDuoDuo(HttpServletResponse response) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
@@ -48,8 +48,7 @@
    @Resource
    private FloatADService floatADService;
    /**
     * 首页配置信息
     * 
@@ -62,18 +61,18 @@
        if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && !Constant.IS_TEST) {
            appHomeFloatImg = null;
        }
        JSONObject data = new JSONObject();
        if (appHomeFloatImg != null) {
            data.put("floatImg", appHomeFloatImg);
        }
        String notifyImg = configService.getAppHomeFloatNotifyImg();
        if (!StringUtil.isNullOrEmpty(notifyImg)) {
            data.put("floatNotifyImg", notifyImg);
        }
        // 悬浮大图 1.5.2  -2019.3.20
        // 悬浮大图 1.5.2 -2019.3.20
        FloatAD floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX);
        if (floatAD != null) {
            JSONObject detail = new JSONObject();
@@ -82,7 +81,7 @@
            detail.put("params", floatAD.getParams());
            detail.put("showTime", floatAD.getShowMode());
            detail.put("accountLogin", floatAD.isJumpNeedLogin());
            if (uid != null && userInfoExtraService.isNewUser(uid)) {
                // 新用户
                data.put("floatImgDetail", detail);
@@ -90,11 +89,11 @@
                data.put("floatImgDetail", detail);
            }
        }
        // 领券帮助链接,1.5.2后生效
        String couponHelp = configService.get("taobao_coupon_help");
        data.put("couponHelpUrl", couponHelp);
        // 底部网页链接
        String platform = acceptData.getPlatform();
        if ("android".equalsIgnoreCase(platform)) {
@@ -188,24 +187,24 @@
            out.print(JsonUtil.loadFalseResult("获取失败"));
            e.printStackTrace();
        }
    }
    /**
     * 订单解析配置
     *
     * @param acceptData
     * @param out
     */
    @RequestMapping(value = "getOrderParseConfig", method = RequestMethod.POST)
    public void getOrderParseConfig(AcceptData acceptData, PrintWriter out) {
        String orderJS = "var orderId= document.getElementById('tp-bought-root').getElementsByClassName('js-order-container')[0].getElementsByTagName('div')[0].getAttribute('data-id');";
        orderJS += "if(/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {window.location.href='yestv://taobaoorder#'+orderId;} else {window.handle.showOrder(orderId)}";
        String orderJS = configService.get("taobao_order_parse_js");
        JSONObject data = new JSONObject();
        try {
            data.put("orderJS", DESUtil.encode(orderJS, StringUtil.getBase64String("YeShiFANLI889*+"),
                    StringUtil.getBase64String("*M#34f?,")));
            data.put("orderUrl", DESUtil.encode( "https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm",StringUtil.getBase64String("YeShiFANLI889*+"),
                    StringUtil.getBase64String("*M#34f?,")));
            data.put("orderUrl", DESUtil.encode("https://buyertrade.taobao.com/trade/itemlist/list_bought_items.htm",
                    StringUtil.getBase64String("YeShiFANLI889*+"), StringUtil.getBase64String("*M#34f?,")));
        } catch (Exception e) {
            e.printStackTrace();
        }
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/GoodsController.java
@@ -155,8 +155,10 @@
                        else
                            taoBaoLink = shareGoodsService.getTaoBaoLink(uid, auctionId,
                                    tbPidService.getIOSDefault().getPid());
                    } else
                        taoBaoLink = shareGoodsService.getTaoBaoLinkForBuy(uid, auctionId, pidType);
                    LogHelper.test("购买转链:默认PID转链-"+uid+":"+auctionId);
                }
            } else {// 不是返利库的商品,用特殊PID替代
                try {
@@ -175,6 +177,8 @@
                    else
                        taoBaoLink = shareGoodsService.getTaoBaoLink(uid, auctionId,
                                tbPidService.getIOSDefault().getPid());
                    LogHelper.test("购买转链:默认PID转链-非返利库商品-"+uid+":"+auctionId);
                }
            }
            JSONObject link = new JSONObject();
@@ -198,6 +202,8 @@
            } else {
                tbPid = tbPidService.getTBPid(uid, PidUser.TYPE_FANLI_IOS);
            }
            LogHelper.test("购买转链:默认PID转链-异常商品-"+uid+":"+auctionId);
            data.put("native", isNative);
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/RecommendController.java
@@ -2027,8 +2027,6 @@
        goodsJson.put("hongBao", hongBao);
        List<ClientTextStyleVO> labels = new ArrayList<>();
        labels.add(new ClientTextStyleVO("标签内容", "#F14242"));
        labels.add(new ClientTextStyleVO("标签内容", "#00FF00"));
        goodsJson.put("labels", labels);
        data.put("tbPidInfo", clientTBPid);
@@ -2069,7 +2067,7 @@
            goodsJson.put("shopInfo", tbShopInfo);
        }
        goodsJson.put("fanliValid",Math.random()>0.5? true:false);// 是否有返利
        goodsJson.put("fanliValid",true);// 是否有返利
        // 分享路径
        String shareUrl = String.format("%s?id=" + tb.getAuctionId(), Constant.systemCommonConfig.getAppShareInfoUrl());
fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java
@@ -327,7 +327,7 @@
    }
    @Override
    @Cacheable(value = "configCache", key = "'listCacheSpecialToIndex'")
    @Cacheable(value = "configCache", key = "'listCacheSpecialToIndex'+#acceptData.platform+'-'+#acceptData.version")
    public JSONObject listCacheSpecialToIndex(AcceptData acceptData) throws Exception {
        // 首页-5圆形2排区域
@@ -365,16 +365,6 @@
                activityMap.put("bottomPicture", special.getBottomPicture());
            }
        }
        // 品牌券
        // >=1.5.40后的版本可以用
        if (("android".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 39)
                || "ios".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 48)
            if (listActivity != null)
                for (int i = 0; i < listActivity.size(); i++) {
                    if ("品牌券".equalsIgnoreCase(listActivity.get(i).getName())) {
                        listActivity.get(i).setJumpDetail(jumpDetailV2Service.getByTypeCache("hot_cakes"));
                    }
                }
        handlelist(listActivity);
@@ -392,6 +382,18 @@
                blockJsonMap.put("bottomPicture", special.getBottomPicture());
            }
        }
        // 品牌券
        // >=1.5.40后的版本可以用
        if (("android".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 39)
                || "ios".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 48)
            if (listBlock != null)
                for (int i = 0; i < listBlock.size(); i++) {
                    if ("品牌券".equalsIgnoreCase(listBlock.get(i).getName())) {
                        listBlock.get(i).setJumpDetail(jumpDetailV2Service.getByTypeCache("hot_cakes"));
                    }
                }
        // 数据处理
        handlelist(listBlock);
        blockJsonMap.put("list", JsonUtil.getApiCommonGson().toJson(listBlock));