admin
2019-11-15 534a87e48dfbaff65605995ec2a29211e0a8f45a
红包功能改为2.1版本后再放开
9个文件已修改
52 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/aspect/VersionLimitAspect.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/TestController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackWinInviteServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/ThreeSaleSerivceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/VersionUtil.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/aspect/VersionLimitAspect.java
@@ -77,8 +77,8 @@
                if (uid != null && NumberUtil.isNumeric(uid)) {
                    UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(Long.parseLong(uid));
                    if (activeLog != null) {
                        // 小于2.0.2版本不增加积分
                        if (!VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
                        // 小于2.1版本不增加红包
                        if (!VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
                                activeLog.getVersionCode()))
                            return null;
                    }
fanli/src/main/java/com/yeshi/fanli/controller/TestController.java
@@ -42,7 +42,6 @@
import com.yeshi.fanli.dto.jd.JDSearchResult;
import com.yeshi.fanli.entity.bus.activity.ActivityShareResult;
import com.yeshi.fanli.entity.bus.activity.RecommendActivity;
import com.yeshi.fanli.entity.bus.user.UserMoneyExtra;
import com.yeshi.fanli.entity.dynamic.DynamicInfo;
import com.yeshi.fanli.entity.dynamic.GoodsPicture;
import com.yeshi.fanli.entity.dynamic.InviteMaterial;
@@ -74,7 +73,6 @@
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.jd.JDApiUtil;
import com.yeshi.fanli.util.push.OPPOPushUtil;
import com.yeshi.fanli.util.push.VIVOPushUtil;
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
@@ -643,19 +641,6 @@
                System.out.println(groupName);
            }
        } catch (Exception e) {
        }
    }
    @RequestMapping("taoLiJinExchange")
    public void taoLiJinExchange(PrintWriter out) {
        try {
            for (int i = 1; i <= 100; i ++) {
                userMoneyExtraService.taoLiJinExchange(i, 200);
            }
            JsonUtil.printMode(out, null, JsonUtil.loadTrueResult("操作成功"));
        } catch (Exception e) {
            JsonUtil.printMode(out, null, JsonUtil.loadFalseResult("操作失败"));
            e.printStackTrace();
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -2180,7 +2180,7 @@
            }
            
            // 2.0.2 版本
            if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
            if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                RedPackBalance redPackBalance = redPackBalanceService.selectByPrimaryKey(uid);
                if (redPackBalance != null && redPackBalance.getState() != null && 
                        redPackBalance.getState() == RedPackBalance.STATE_LOCKED) {
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -277,7 +277,7 @@
        boolean rewardOrder = false;
        int type = 1; // 1 常规跳转页面 2弹出选项(奖励券)
        if (rewardSuccess) {
            if (!VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
            if (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                rewardOrder = true; //奖励成功 2.0.2 消失
            }
        } else if (hasRewardCoupon && !freeOrder && HongBaoV2.TYPE_ZIGOU == hongBaoType
@@ -294,8 +294,8 @@
                String unit = null;
                boolean canUse = false;
                
                // 版本区分:2.0.2
                if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
                // 版本区分:2.1
                if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                    Date thirdCreateTime = order.getThirdCreateTime();
                    if (thirdCreateTime != null) {
                        long downOrderTime = thirdCreateTime.getTime();
@@ -344,7 +344,7 @@
                    rewardStyleVO.setColor("#E5005C");
                    rewardStyleVO.setBottomColor("#FFDCEA");
                    if (!newEdition) {
                        if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
                        if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                            rewardStyleVO.setContent("使用奖励券 >");
                        } else {
                            rewardStyleVO.setContent("返利奖励 >");
@@ -658,7 +658,7 @@
                signList.add(CommonOrder.TYPE_INVITE);
                
                // 版本区分:2-0-2
                if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
                if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                    InviteOrderSubsidy orderSubsidy = inviteOrderSubsidyService.getByOrderNoAndType(uid, order.getOrderNo(), sourceType);
                    if (orderSubsidy != null) {
                        ClientTextStyleVO subsidyInfo = new ClientTextStyleVO();
fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackWinInviteServiceImpl.java
@@ -107,7 +107,7 @@
            return;
        
        // 小于2.0.2版本不增加
        if (!VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
        if (!VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
                activeLog.getVersionCode()))
            return;
        
@@ -267,7 +267,7 @@
            return;
        
        // 小于2.0.2版本不增加
        if (!VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
        if (!VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
                activeLog.getVersionCode()))
            return;
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java
@@ -220,7 +220,7 @@
                throw new TokenRecordException(1, "口令已失效");
            }
        } else if (tokenType == TokenTypeEnum.redPack) {
            if(!VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion()))
            if(!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
                throw new TokenRecordException(1, "请升级到最新版");
            
            
@@ -510,7 +510,7 @@
                }
            });
        } else if (tokenType == TokenTypeEnum.redPack) {
            if(!VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion()))
            if(!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
                throw new TokenRecordException(1, "请升级到最新版");
            
            try {
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
@@ -840,7 +840,7 @@
            throw new UserSystemCouponException(1, "订单信息获取失败");
        // 版本区分:2.0.2
        if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
        if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
            Date thirdCreateTime = orderVO.getThirdCreateTime();
            if (thirdCreateTime != null) {
                long downOrderTime = thirdCreateTime.getTime();
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/ThreeSaleSerivceImpl.java
@@ -604,7 +604,7 @@
        // 邀请消息
        UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(bossId);
        if (activeLog != null) {
            if (VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
            if (VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
                    activeLog.getVersionCode())) { // 2.0.2版本以上
                userInviteMsgNotificationService.inviteSuccess2_0_2(bossId, threeSale);
            } else { // 最初消息
fanli/src/main/java/com/yeshi/fanli/util/VersionUtil.java
@@ -77,6 +77,15 @@
        else
            return false;
    }
    public static boolean greaterThan_2_1(String platform, String versionCode) {
        if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 52))
                || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 71)))
            return true;
        else
            return false;
    }
    public static boolean smallerThan_1_5_1(String platform, String versionCode) {