chenjiahe
2024-02-28 1bf4be7f148e425d6c7b916bbf6de2cf362e3e3c
爆款活动-测2024-02-28-1
3个文件已修改
89 ■■■■ 已修改文件
phi_platform_common/src/main/java/com/hx/phip/tool/user/UserMessageNotifyTool.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/controller/user/UserMoneyUnclaimedController.java 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/service/tool/OrderGeneralServiceTool.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_common/src/main/java/com/hx/phip/tool/user/UserMessageNotifyTool.java
@@ -58,7 +58,7 @@
        MpMessageDto mpMessageDto = new MpMessageDto();
        mpMessageDto.setMpId(mpAppId);
        mpMessageDto.setTemplateId("RGs6kg415MR6Yu72Aoupvcsdxe6nZBoUFu0k7mf7Rkg");
        mpMessageDto.setTemplateId("RGs6kq415MR6Yu72Aoupvcsdxe6nZBoUFu0k7mf7Rkg");
        mpMessageDto.setPage(CrmPagesConstants.PAGES_INCREMENT_DETAILS);
        mpMessageDto.setMinIpGramState(mpVersion);
        mpMessageDto.setTouSer(userUnionHis.getOpenId());
phi_platform_user/src/main/java/com/hx/phip/controller/user/UserMoneyUnclaimedController.java
@@ -266,13 +266,15 @@
                    }
                    //查询不可使用原因
                    userMoneyUnclaimedInfo.setIsShowNotUse(0);
                    userMoneyUnclaimedInfo.setIsShowNotUse(BaseEntity.NO);
                    /*当前这个判断先不用
                    if (userMoneyUnclaimed.getIsSelectNotUse() != null && userMoneyUnclaimed.getIsSelectNotUse().equals(BaseEntity.YES)){
                        String canUseReason = getCanUseReason(userMoneyUnclaimedInfo);
                        if (StringUtils.noNull(canUseReason)){
                            userMoneyUnclaimedInfo.setIsShowNotUse(1);
                            userMoneyUnclaimedInfo.setNotUseReason(canUseReason);
                        }
                    }*/
                    String canUseReason = getCanUseReason(userMoneyUnclaimedInfo);
                    if (StringUtils.noNull(canUseReason)){
                        userMoneyUnclaimedInfo.setIsShowNotUse(1);
                        userMoneyUnclaimedInfo.setNotUseReason(canUseReason);
                    }
                }
            }
@@ -303,41 +305,44 @@
    /**获取不可领取原因*/
    private String getCanUseReason(UserMoneyUnclaimed userMoneyUnclaimed) {
        if (userMoneyUnclaimed.getIsReceiveLimit() != null && userMoneyUnclaimed.getIsReceiveLimit().equals(BaseEntity.YES)){
            // 具体限制类型
            if (userMoneyUnclaimed.getReceiveLimitType() != null){
                List<MoneyRuleValueDto> limitList = JSONArray.parseArray(userMoneyUnclaimed.getReceiveLimitData(), MoneyRuleValueDto.class);
                if (limitList != null && limitList.size() > 0){
                    //判断校验逻辑
                    if (userMoneyUnclaimed.getReceiveLimitType().equals(BaseEntity.YES)){
                        boolean isPass = false;
                        StringBuilder msg = new StringBuilder();
                        //满足其一
                        for (MoneyRuleValueDto moneyRuleValueDto : limitList) {
                            //满足一个则设为通过,退出循环
                            if (SysFunctionLimitEnum.checkPassByCode(moneyRuleValueDto.getFunctionCode()
                                    ,userMoneyUnclaimed.getUserId(),userMoneyUnclaimed.getOrderId())){
                                if (msg.length() > 0){
                                    msg.append(",");
                                }
                                msg.append(SysFunctionLimitEnum.getNameByCode(moneyRuleValueDto.getFunctionCode()));
                                isPass = true;
                                break;
                            }
                        }
                        if (!isPass){
                            return "未达成其中一个条件:" + msg;
                        }
                    } else if (userMoneyUnclaimed.getReceiveLimitType().equals(BaseEntity.NO)){
                        //都要满足
                        for (MoneyRuleValueDto moneyRuleValueDto : limitList) {
                            //存在一个不满足则退出循环
                            if (!SysFunctionLimitEnum.checkPassByCode(moneyRuleValueDto.getFunctionCode()
                                    ,userMoneyUnclaimed.getUserId(),userMoneyUnclaimed.getOrderId())){
                                return "未达成条件:"+SysFunctionLimitEnum.getNameByCode(moneyRuleValueDto.getFunctionCode());
                            }
                        }
        if (userMoneyUnclaimed.getIsReceiveLimit() == null || !userMoneyUnclaimed.getIsReceiveLimit().equals(BaseEntity.YES)){
            return null;
        }
        // 具体限制类型
        if (userMoneyUnclaimed.getReceiveLimitType() == null){
            return null;
        }
        List<MoneyRuleValueDto> limitList = JSONArray.parseArray(userMoneyUnclaimed.getReceiveLimitData(), MoneyRuleValueDto.class);
        if (limitList == null || limitList.size() == 0){
            return null;
        }
        //判断校验逻辑
        if (userMoneyUnclaimed.getReceiveLimitType().equals(BaseEntity.YES)){
            boolean isPass = false;
            StringBuilder msg = new StringBuilder();
            //满足其一
            for (MoneyRuleValueDto moneyRuleValueDto : limitList) {
                //满足一个则设为通过,退出循环
                if (SysFunctionLimitEnum.checkPassByCode(moneyRuleValueDto.getFunctionCode()
                        ,userMoneyUnclaimed.getUserId(),userMoneyUnclaimed.getOrderId())){
                    if (msg.length() > 0){
                        msg.append(",");
                    }
                    msg.append(SysFunctionLimitEnum.getNameByCode(moneyRuleValueDto.getFunctionCode()));
                    isPass = true;
                    break;
                }
            }
            if (!isPass){
                return "未达成其中一个条件:" + msg;
            }
        } else if (userMoneyUnclaimed.getReceiveLimitType().equals(BaseEntity.NO)){
            //都要满足
            for (MoneyRuleValueDto moneyRuleValueDto : limitList) {
                //存在一个不满足则退出循环
                if (!SysFunctionLimitEnum.checkPassByCode(moneyRuleValueDto.getFunctionCode()
                        ,userMoneyUnclaimed.getUserId(),userMoneyUnclaimed.getOrderId())){
                    return "未达成条件:"+SysFunctionLimitEnum.getNameByCode(moneyRuleValueDto.getFunctionCode());
                }
            }
        }
phi_platform_user/src/main/java/com/hx/phip/service/tool/OrderGeneralServiceTool.java
@@ -65,7 +65,7 @@
        try {
            if(StringUtils.noNull(user.getTel())){
                //发送短信通知
                UserMessageNotifyTool.sendBurstIncreaseSms(ordersTotal.getActivityPageName(),userMoneyUnclaimed.getExpirationTime(),payDto.getGiveIncrease(),user,crmBean.getAppId(),crmBean.getVersion(),sWxTokenService,fSmsSendService);
                UserMessageNotifyTool.sendBurstIncreaseSms(ordersTotal.getActivityPageName(),userMoneyUnclaimed.getLimitEndTime(),payDto.getGiveIncrease(),user,crmBean.getAppId(),crmBean.getVersion(),sWxTokenService,fSmsSendService);
            }
        }catch (Exception e){
            logger.error("[12547]错误信息:",e);