admin
2021-09-03 b41a6efe17ba61d150c5a9b7309651cebae54e0d
src/main/java/com/yeshi/buwan/aspect/SignAspect.java
@@ -40,15 +40,6 @@
        for (Object obj : args) {
            if (obj instanceof AcceptData) {
                acceptData = (AcceptData) obj;
                if (acceptData != null) {
                    if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
                        acceptData.setChannel("appstore");
                    }
                    //注入detailSystem
                    DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName());
                    acceptData.setDetailSystem(detailSystem);
                }
            } else if (obj instanceof PrintWriter) {
                out = (PrintWriter) obj;
            }
@@ -57,13 +48,13 @@
        //如果是Android新版本则调用新的签名方法
        //布丸3.8.7之后调用新的签名方法
        if (acceptData != null && "android".equalsIgnoreCase(acceptData.getPlatform()) && acceptData.getVersion() >= 105) {
        if (acceptData != null && "android" .equalsIgnoreCase(acceptData.getPlatform()) && acceptData.getVersion() >= 105) {
            Map<String, String[]> params = request.getParameterMap();
            //签名
            List<String> list = new ArrayList<>();
            for (Iterator<String> its = params.keySet().iterator(); its.hasNext(); ) {
                String key = its.next();
                if ("sign".equalsIgnoreCase(key))
                if ("sign" .equalsIgnoreCase(key))
                    continue;
                list.add(key + "=" + params.get(key)[0]);
            }
@@ -86,6 +77,24 @@
            }
        }
        if (acceptData != null) {
            if ("ios" .equalsIgnoreCase(acceptData.getPlatform())) {
                acceptData.setChannel("appstore");
            }
            if (acceptData.getPackageName().equalsIgnoreCase("com.doudou.ysvideo.lite"))
                acceptData.setPackageName("com.doudou.ysvideo");
            //注入detailSystem
            DetailSystem detailSystem = systemService.getDetailSystemByPackage(acceptData.getPackageName());
            acceptData.setDetailSystem(detailSystem);
            acceptData.setChildPackage(acceptData.getPackage());
            detailSystem = systemService.getDetailSystemByPackage(acceptData.getChildPackage());
        }
        return joinPoint.proceed(args);
    }