yujian
2020-04-02 1dc1b5e88283c2ea8cf53c9f014300b3ad0f53de
vip消息
19个文件已修改
540 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/DailyCountCouponServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/DailyCountOrderServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/count/DailyCountUserServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/DynamicInfoServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java 356 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/UserInviteSeparateServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/DailyCountCouponService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/DailyCountOrderService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/count/DailyCountUserService.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/dynamic/GoodsEvaluateService.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserOtherMsgNotificationService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/Constant.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java
@@ -35,7 +35,8 @@
        passVIPApply("超级会员"),
        rejectVIPApply("超级会员"),
        teamVIPCallBoss ("温馨提醒"),
        teamSplitCallBoss ("邀请脱离");
        teamSplitCallBoss ("邀请脱离"),
        vipUpgradeReward("vip升级奖励");
        private final String desc;
fanli/src/main/java/com/yeshi/fanli/service/impl/count/DailyCountCouponServiceImpl.java
@@ -89,7 +89,8 @@
     * @param typeEnum
     * @throws Exception
     */
    private void initData(DailyCountCouponEnum typeEnum) throws Exception {
    @Override
    public void initData(DailyCountCouponEnum typeEnum) throws Exception {
        Date lastDate = null;
        DailyCountCoupon lastRecord = dailyCountCouponDao.getMaxDate(typeEnum);
        if (lastRecord != null) {
@@ -97,6 +98,12 @@
        } else {
            lastDate = TimeUtil.parse("2019-03-04");
        }
        long min = DateUtil.dateDiffMin(lastDate, new Date());
        if (min <= 10) { // 10分钟以内不统计
            return;
        }
        Date today = new Date();
        int betweenDays = DateUtil.daysBetween2(lastDate, today);
fanli/src/main/java/com/yeshi/fanli/service/impl/count/DailyCountOrderServiceImpl.java
@@ -124,7 +124,8 @@
     * @param typeEnum
     * @throws Exception
     */
    private void initData(DailyCountOrderEnum typeEnum) throws Exception {
    @Override
    public void initData(DailyCountOrderEnum typeEnum) throws Exception {
        Date lastDate = null;
        DailyCountOrder lastRecord = dailyCountOrderDao.getMaxDate(typeEnum);
        if (lastRecord != null) {
fanli/src/main/java/com/yeshi/fanli/service/impl/count/DailyCountUserServiceImpl.java
@@ -11,7 +11,6 @@
import org.yeshi.utils.DateUtil;
import com.yeshi.fanli.dao.user.count.DailyCountUserDao;
import com.yeshi.fanli.dto.order.CountOrderDTO;
import com.yeshi.fanli.entity.admin.count.DailyCountUser;
import com.yeshi.fanli.entity.admin.count.DailyCountUser.DailyCountUserEnum;
import com.yeshi.fanli.entity.bus.user.Extract;
@@ -119,7 +118,8 @@
     * @param typeEnum
     * @throws Exception
     */
    private void initData(DailyCountUserEnum typeEnum) throws Exception {
    @Override
    public void initData(DailyCountUserEnum typeEnum) throws Exception {
        Date lastDate = null;
        DailyCountUser lastRecord = dailyCountUserDao.getMaxDate(typeEnum);
        if (lastRecord != null) {
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/DynamicInfoServiceImpl.java
@@ -569,14 +569,6 @@
        // 保存信息
        dynamicInfoDao.insert(dynamicInfo);
        // 更新商品信息
        executor.execute(new Runnable() {
            @Override
            public void run() {
                goodsEvaluateService.addGoodsEvaluateByDynamicInfo(dynamicInfo);
            }
        });
        
        addSuccess = true;
        return addSuccess;
fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -1855,107 +1855,140 @@
    }
    @Override
    public void addGoodsEvaluateByDynamicInfo(DynamicInfo info) {
        if (1 > 0) {
            return; // 暂不启用自动生成
    public void addGoodsEvaluate(Long goodsId, Integer cid, String title, String comment) throws GoodsEvaluateException{
        if (goodsId == null || cid == null || StringUtil.isNullOrEmpty(title)) {
            throw new GoodsEvaluateException(1, "相关参数不能为空");
        }
        if (info == null) {
            return;
        }
        TaoBaoGoodsBrief goodsBrief = null;
        try {
            GoodsEvaluate goodsEvaluate = new GoodsEvaluate();
            goodsEvaluate.setId(UUID.randomUUID().toString().replace("-", ""));
            ActivityUser user = info.getUser();
            goodsEvaluate.setUser(user);
            goodsEvaluate.setState(1);
            goodsEvaluate.setDynamicType(1);
            goodsEvaluate.setType(EvaluateEnum.single);
            goodsEvaluate.setLineNum(2);
            goodsEvaluate.setShareNum(info.getShareCount());
            goodsEvaluate.setShareNumReal(0);
            goodsEvaluate.setPublishTime(info.getCreateTime());
            goodsEvaluate.setCreateTime(new Date());
            goodsEvaluate.setUpdateTime(new Date());
            goodsEvaluate.setWeight(0.0);
            goodsEvaluate.setStartTime(new Date());
            goodsEvaluate.setEndTime(DateUtil.plusDayDate(3, new Date()));
            List<ClientTextStyleVO> titles = info.getTitle();
            if (titles != null) {
                goodsEvaluate.setTitle(info.getTitle().get(0).getContent());
            } else {
                goodsEvaluate.setTitle("");
            }
            List<ImgInfo> imgList = new ArrayList<>();
            List<GoodsPicture> imgs = info.getImgs();
            for (GoodsPicture goodsPicture : imgs) {
                ImgInfo imgInfo = new ImgInfo();
                imgInfo.setH(1);
                imgInfo.setW(1);
                imgInfo.setLarge(false);
                imgInfo.setUrl(goodsPicture.getUrl());
                imgInfo.setUrlHD(goodsPicture.getUrl());
                GoodsDetailVO goodsVO = goodsPicture.getGoodsVO();
                if (goodsVO == null) {
                    imgInfo.setType(ImgEnum.img);
                } else {
                    imgInfo.setType(ImgEnum.goods);
                    SimpleGoods simpleGoods = new SimpleGoods();
                    simpleGoods.setGoodsId(goodsVO.getGoodsId());
                    simpleGoods.setGoodsType(goodsVO.getGoodsType());
                    simpleGoods.setState(goodsVO.getState());
                    CouponInfoVO couponInfo = goodsVO.getCouponInfo();
                    if (couponInfo == null) {
                        simpleGoods.setPrice(goodsVO.getZkPrice());
                    } else {
                        simpleGoods.setPrice(goodsVO.getCouponPrice());
                        simpleGoods.setAmount(couponInfo.getAmount());
                    }
                    imgInfo.setGoods(simpleGoods);
                    TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(1L, goodsVO.getGoodsId(), "0");
                    // TaoBaoLink taoBaoLink =
                    // shareGoodsService.getTaoBaoLinkForShare(Constant.LINK_TOKEN_VERIFY_UID,
                    // goodsVO.getGoodsId(), null);
                    String template = configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey());
                    String commentText = template.replace("[淘口令]", TaoBaoUtil.filterTaoToken(taoBaoLink.getTaoToken()));
                    commentText = commentText.replace("[原价]", goodsVO.getZkPrice().toString());
                    if (!goodsVO.isHasCoupon()) {
                        commentText = commentText.replace("领券抢购", "抢购");
                        commentText = commentText.replace("【券后价】[券后价]元", "");
                    } else {
                        commentText = commentText.replace("[券后价]", goodsVO.getCouponPrice().toString());
                    }
                    commentText = commentText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n")
                            .replace("\r\n\r\n", "\r\n");
                    CommentInfo commentInfo = new CommentInfo();
                    commentInfo.setId(UUID.randomUUID().toString().replace("-", ""));
                    commentInfo.setContent(commentText);
                    commentInfo.setTypeEnum(CommentInfoEnum.goodsCoupon);
                    commentInfo.setType(CommentInfoEnum.goodsCoupon.getDesc());
                    List<CommentInfo> commentsNew = new ArrayList<>();
                    commentsNew.add(commentInfo);
                    goodsEvaluate.setComments(commentsNew);
                    goodsEvaluate.setGoods(goodsVO);
                }
                imgList.add(imgInfo);
            }
            goodsEvaluate.setImgList(imgList);
            goodsEvaluateDao.save(goodsEvaluate);
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
            goodsBrief = redisManager.getTaoBaoGoodsBrief(goodsId);
        } catch (TaobaoGoodsDownException e) {
            throw new GoodsEvaluateException(1, "商品已下架");
        }
        if (goodsBrief == null) {
            throw new GoodsEvaluateException(1, "未找到商品信息");
        }
        BigDecimal couponAmount = goodsBrief.getCouponAmount();
        if (couponAmount == null || couponAmount.compareTo(new BigDecimal(0)) < 1) {
            throw new GoodsEvaluateException(1, "该商品无券");
        }
        // 发布用户
        ActivityUser user = activityUserService.getRandomByDaTaoKeCid(cid);
        if (user == null) {
            throw new GoodsEvaluateException(1, "未找到发布用户");
        }
        // 白底图
        List<String> imgs = new ArrayList<>();
        if (!StringUtil.isNullOrEmpty(goodsBrief.getPictUrlWhite())) {
            imgs.add(goodsBrief.getPictUrlWhite());
        }
        imgs.addAll(goodsBrief.getImgList());
        // 商品VO
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate("android", "55");
        paramsDTO.setBaseFanliRate(hongBaoManageService.getBaseFanliRate());
        GoodsDetailVO goodsVO = GoodsDetailVOFactory.convertTaoBao(goodsBrief, paramsDTO);
        // 商品图片信息
        int i = 0;
        List<ImgInfo> imgList = new ArrayList<>();
        for (String img : imgs) {
            ImgInfo imgInfo = new ImgInfo();
            imgInfo.setH(1);
            imgInfo.setW(1);
            imgInfo.setLarge(false);
            imgInfo.setUrl(img);
            imgInfo.setUrlHD(img);
            if (i != 0) {
                imgInfo.setType(ImgEnum.img);
            } else {
                imgInfo.setType(ImgEnum.goods);
                SimpleGoods simpleGoods = new SimpleGoods();
                simpleGoods.setGoodsId(goodsVO.getGoodsId());
                simpleGoods.setGoodsType(goodsVO.getGoodsType());
                simpleGoods.setState(goodsVO.getState());
                CouponInfoVO couponInfo = goodsVO.getCouponInfo();
                if (couponInfo == null) {
                    simpleGoods.setPrice(goodsVO.getZkPrice());
                } else {
                    simpleGoods.setPrice(goodsVO.getCouponPrice());
                    simpleGoods.setAmount(couponInfo.getAmount());
                }
                imgInfo.setGoods(simpleGoods);
                imgInfo.setGoodsVO(goodsVO);
            }
            imgList.add(imgInfo);
            i++;
        }
        // 评论内容
        CommentInfo commentInfo = new CommentInfo();
        commentInfo.setId(UUID.randomUUID().toString().replace("-", ""));
        commentInfo.setTypeEnum(CommentInfoEnum.goodsCoupon);
        if (!StringUtil.isNullOrEmpty(comment)) {
            commentInfo.setContent(comment);
            commentInfo.setType("");
        } else {
            String token = shareGoodsService.createTaoBaoToken(Constant.LINK_TOKEN_VERIFY_UID, goodsBrief);
            String template = configService.get(ConfigKeyEnum.quickShareTBCommentText.getKey());
            String commentText = template.replace("[淘口令]", TaoBaoUtil.filterTaoToken(token));
            commentText = commentText.replace("[原价]", MoneyBigDecimalUtil.getWithNoZera(goodsVO.getZkPrice()) + "");
            if (!goodsVO.isHasCoupon()) {
                commentText = commentText.replace("领券抢购", "抢购");
                commentText = commentText.replace("【券后价】[券后价]元", "");
            } else {
                commentText = commentText.replace("[券后价]",
                        MoneyBigDecimalUtil.getWithNoZera(goodsVO.getCouponPrice()) + "");
            }
            commentText = commentText.replace("\r\n\r\n", "\r\n").replace("\r\n\r\n", "\r\n").replace("\r\n\r\n","\r\n");
            commentInfo.setContent(commentText);
            commentInfo.setType(CommentInfoEnum.goodsCoupon.getDesc());
        }
        List<CommentInfo> commentsNew = new ArrayList<>();
        commentsNew.add(commentInfo);
        // 一行显示多少个图片
        int lineNum = 0;
        if (imgs.size() > 0) {
            if (imgs.size() == 1) {
                lineNum = 1;
            } else if (imgs.size() == 3) {
                lineNum = 3;
            } else if (imgs.size() <= 4) {
                lineNum = 2;
            } else {
                lineNum = 3;
            }
        }
        GoodsEvaluate goodsEvaluate = new GoodsEvaluate();
        goodsEvaluate.setId(UUID.randomUUID().toString().replace("-", ""));
        goodsEvaluate.setUser(user);
        goodsEvaluate.setTitle(getDescNew(title));
        goodsEvaluate.setState(1);
        goodsEvaluate.setDynamicType(1);
        goodsEvaluate.setType(EvaluateEnum.single);
        goodsEvaluate.setShareNum((int) (Math.random() * 5000) + 1000);
        goodsEvaluate.setShareNumReal(0);
        goodsEvaluate.setWeight(0.0);
        goodsEvaluate.setStartTime(new Date());
        goodsEvaluate.setEndTime(DateUtil.plusDayDate(3, new Date()));
        goodsEvaluate.setPublishTime(new Date());
        goodsEvaluate.setCreateTime(new Date());
        goodsEvaluate.setUpdateTime(new Date());
        goodsEvaluate.setGoods(goodsVO);
        goodsEvaluate.setLineNum(lineNum);
        goodsEvaluate.setImgList(imgList);
        goodsEvaluate.setComments(commentsNew);
        goodsEvaluateDao.save(goodsEvaluate);
    }
    @Override
@@ -2162,12 +2195,12 @@
                    commentsNew.add(commentInfo);
                    commentsNew.add(commentInfo2);
                    goodsEvaluate.setComments(commentsNew);
                    goodsEvaluate.setGoods(goodsVO);
                }
                imgList.add(imgInfo);
                i++;
            }
            goodsEvaluate.setGoods(goodsVO);
            goodsEvaluate.setImgList(imgList);
            goodsEvaluateDao.save(goodsEvaluate);
        } catch (Exception e) {
@@ -2178,100 +2211,46 @@
        return true;
    }
    private String getDesc(String desc) {
        System.out.println(desc);
        String newDesc = "";
        int emoji = 0;
        String content = desc.replace(",", ",");
        while (content.length() > 0) {
            int length = 0;
            boolean end = true;
            for (int i = 0; i < content.length(); i++) {
                if (content.substring(0, i).length() >= 18) {
                    length = i;
                    end = false;
                    break;
                }
            }
            if (end) {
                length = content.length();
            }
            String introduce = content.substring(0, length);
            System.out.println(introduce);
            if (verify(introduce)) {
                if (emoji >= 4) {
                    introduce = introduce.replace(",", "\n"); // 需要换行
    /**
     * 发圈标题 加入表情
     * @param desc
     * @return
     */
    private String getDescNew(String desc) {
        String[] split = desc.split(",");
        int max = 1;
        if (Math.random() > 0.5) {
            max = 2;
        }
        int e = 0;
        String emojis = "";
        String descNew = "";
        if (split.length > 0) {
            for (int i = 0; i < split.length; i++) {
                if (Math.random() > 0.5 && e < max) {
                    for (int j = 0; j < 10; j++) {
                        String emojisTemp = DaTaoKeUtil.getEvaluateEmojis();
                        if (!emojis.equals(emojisTemp)) {
                            emojis = emojisTemp;
                            break;
                        }
                    }
                    e++;
                    descNew += split[i] + emojis;
                } else {
                    emoji++;
                    introduce = introduce.replace(",", DaTaoKeUtil.getRandomCommonEmoji() + "\n"); // 需要换行
                    descNew += split[i] + ",";
                }
            }
            // 随机替换emoji
            if (emoji <= 4 && Math.random() > 0.5) {
                introduce = introduce.replace(",", DaTaoKeUtil.getRandomCommonEmoji());
                emoji++;
            }
            newDesc += introduce;
            content = content.substring(length);
        } else {
            descNew = desc;
        }
        return newDesc;
        if (descNew.endsWith(",")) {
            descNew = descNew.substring(0, descNew.length() - 1);
        }
        return descNew;
    }
    private boolean verify(String content) {
        // 18个字符内(包含标点也算一个字符)有多个逗号,则不换行
        char d = ',';
        int count = 0;
        char chs[] = content.toCharArray();// 转换成char数组
        for (int i = 0; i < chs.length; i++) {
            if (d == chs[i]) {
                count++;
            }
        }
        if (count > 1) {
            return false;
        }
        // 书名号,大括号,小括号里面的内容不换行
        if (content.contains("[") && content.contains("]")) {
            return false;
        } else if (content.contains("【") && content.contains("】")) {
            return false;
        } else if (content.contains("{") && content.contains("}")) {
            return false;
        } else if (content.contains("(") && content.contains(")")) {
            return false;
        }
        int index = content.lastIndexOf(",");
        // (除开逗号以外的符号)感叹号/句号/问号前面有逗号,不换行
        if (content.contains("!") && index < content.lastIndexOf("!")) {
            return false;
        }
        if (content.contains("!") && index < content.lastIndexOf("!")) {
            return false;
        }
        if (content.contains("。") && index < content.lastIndexOf("。")) {
            return false;
        }
        if (content.contains("?") && index < content.lastIndexOf("?")) {
            return false;
        }
        if (content.contains("?") && index < content.lastIndexOf("?")) {
            return false;
        }
        if (content.contains(":")) {
            return false;
        }
        return true;
    }
    @Override
    public void updateTaoBaoGoods(TaoBaoGoodsBrief goods) {
@@ -2391,4 +2370,5 @@
            }
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
@@ -64,6 +64,9 @@
                || detail.getType() == MsgTypeOtherTypeEnum.teamSplitCallBoss) {
            msgOtherDetailMapper.insertSelective(detail);
            userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
        }else if (detail.getType() == MsgTypeOtherTypeEnum.vipUpgradeReward) {
            msgOtherDetailMapper.insertSelective(detail);
            userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
        }
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java
@@ -535,4 +535,21 @@
            e.printStackTrace();
        }
    }
    @Override
    public void vipUpgradeReward(Long uid, String beiZhu, MsgOtherSystemGiveDTO dto) {
        try {
            MsgOtherDetail detail = new MsgOtherDetail();
            detail.setBeiZhu(beiZhu);
            detail.setCreateTime(new Date());
            detail.setRead(false);
            detail.setUser(new UserInfo(uid));
            detail.setContent(new Gson().toJson(dto));
            detail.setType(MsgTypeOtherTypeEnum.vipUpgradeReward);
            msgOtherDetailService.addMsgOtherDetail(detail);
        } catch (MsgOtherDetailException e) {
            e.printStackTrace();
        }
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -1967,15 +1967,14 @@
            }
            
            // 2.1显示返利说明连接>
            // 2.1显示返利说明连接>  未失效-自购-分享
            if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                if (CommonOrder.STATE_SX != orderState && thirdCreateTime.getTime() > TimeUtil.convertDateToTemp(Constant.ORDER_SHOW_BRACE_TIME)) {
                if (CommonOrder.STATE_SX != orderState && thirdCreateTime.getTime() > TimeUtil.convertDateToTemp(Constant.ORDER_SHOW_BRACE_TIME)
                        && ((HongBaoV2.TYPE_ZIGOU == hongBaoType || 2 == hongBaoType) || HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) ) {
                    String rebateLink = configService.get(ConfigKeyEnum.orderRebateDescLink.getKey());
                    order.setRebateLink(rebateLink + "?orderNo=" + orderNo +"&sourceType=" + sourceType);
                }
            }
                        
            BigDecimal hongBao = order.getHongBao();
            if (hongBao == null) {
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/UserInviteSeparateServiceImpl.java
@@ -73,6 +73,14 @@
        inviteSeparate.setCreateTime(new Date());
        inviteSeparate.setUpdateTime(new Date());
        userInviteSeparateMapper.insertSelective(inviteSeparate);
        UserInfo userInfo = userInfoService.getUserById(workerId);
        // 消息
        MsgOtherVIPDTO msgboss = new MsgOtherVIPDTO();
        msgboss.setContent1(userInfo.getNickName() + " " + workerId);
        msgboss.setContent2("于" + TimeUtil.formatDateDot(new Date()) + "成功升级成为会员");
        msgboss.setContent3("今日起" + limitDays + "天内,你未能成为会员将会与其脱离邀请关系 ");
        userOtherMsgNotificationService.teamVIPCallBoss(bossId, "如有疑问请联系我的-人工客服", msgboss);
    }
    
    @Override
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java
@@ -13,6 +13,7 @@
import com.yeshi.fanli.dao.mybatis.user.vip.UserVIPInfoMapper;
import com.yeshi.fanli.dto.msg.MsgAccountVipDTO;
import com.yeshi.fanli.dto.msg.MsgOtherSystemGiveDTO;
import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
@@ -248,6 +249,13 @@
                    userSystemCouponService.insertUserCoupon(uid, CouponTypeEnum.freeCouponGive.name(),
                            UserSystemCoupon.SOURCE_SYSTEM_PUSH, null, false);
                }
                // 消息
                MsgOtherSystemGiveDTO dto = new MsgOtherSystemGiveDTO();
                dto.setName("系统赠送 ");
                dto.setReason("恭喜你!成功升级为超级会员");
                dto.setDesc("获得赠送免单券" + num +"张");
                userOtherMsgNotificationService.vipUpgradeReward(uid, "详情查看,对应会员权益", dto);
            }
        } catch (Exception e) {
            throw new UserVIPInfoException(1, "券赠送失败");
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
@@ -14,6 +14,7 @@
import com.yeshi.fanli.dao.mybatis.user.vip.UserVIPPreInfoMapper;
import com.yeshi.fanli.dto.msg.MsgAccountVipDTO;
import com.yeshi.fanli.dto.msg.MsgOtherSystemGiveDTO;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
import com.yeshi.fanli.entity.bus.user.ThreeSale;
import com.yeshi.fanli.entity.bus.user.UserInfo;
@@ -27,7 +28,9 @@
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
import com.yeshi.fanli.service.inter.msg.UserOtherMsgNotificationService;
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.service.inter.user.UserInviteSeparateService;
import com.yeshi.fanli.service.inter.user.UserSystemCouponService;
import com.yeshi.fanli.service.inter.user.integral.IntegralDetailService;
@@ -76,6 +79,12 @@
    
    @Resource
    private UserInviteSeparateService userInviteSeparateService;
    @Resource
    private UserInfoService userInfoService;
    @Resource
    private UserOtherMsgNotificationService userOtherMsgNotificationService;
    
    @Override
@@ -267,6 +276,8 @@
                // 赠送金币
                String goldcoin = userVipConfigService.getValueByKey("vip_pre_3_gift_goldcoin");
                if (!StringUtil.isNullOrEmpty(goldcoin)) {
                    int goldcoinNum = Integer.parseInt(goldcoin);
                    // 添加金币明细
                    IntegralDetail detail = new IntegralDetail();
                    detail.setTitle("升级VIP福利");
@@ -279,7 +290,12 @@
                    // 添加金币
                    userInfoExtraService.addGoldCoinByUid(uid, Integer.parseInt(goldcoin));
                    
                    //TODO 消息
                    // 消息
                    MsgOtherSystemGiveDTO dto = new MsgOtherSystemGiveDTO();
                    dto.setName("系统赠送 ");
                    dto.setReason("恭喜你!成功升级为普通会员");
                    dto.setDesc("获得金币" + goldcoinNum+"枚");
                    userOtherMsgNotificationService.vipUpgradeReward(uid, "详情查看,对应会员权益", dto);
                }
                
                // 是否存在下级脱离期限 -更新不脱离
@@ -302,7 +318,13 @@
        if (threeSale == null)
            return;
        
        // 验证上级是否正常
        Long bossId = threeSale.getBoss().getId();
        UserInfo userInfo = userInfoService.getUserById(bossId);
        if (userInfo == null || userInfo.getState() != UserInfo.STATE_NORMAL) {
            return;
        }
        // 验证上级是否已是会员
        UserVIPPreInfo oldInfo = userVIPPreInfoMapper.selectByUidAndProcess(bossId, UserVIPPreInfo.PROCESS_1);
        if (oldInfo != null) {
@@ -311,9 +333,6 @@
        
        // 添加脱离关系倒计时
        userInviteSeparateService.addPreSeparateRecord(uid, bossId);
        // TODO 消息
    }
    
    
@@ -391,10 +410,14 @@
                        userSystemCouponService.insertUserCoupon(uid, CouponTypeEnum.rebatePercentCoupon.name(),
                                UserSystemCoupon.SOURCE_SYSTEM_PUSH, percent, false);
                    }
                    // 消息
                    MsgOtherSystemGiveDTO dto = new MsgOtherSystemGiveDTO();
                    dto.setName("系统赠送 ");
                    dto.setReason("恭喜你!成功升级为高级会员");
                    dto.setDesc("获得返利奖励券" + num +"张");
                    userOtherMsgNotificationService.vipUpgradeReward(uid, "详情查看,对应会员权益", dto);
                }
                // TODO 发券消息
            } catch (Exception e) {
                e.printStackTrace();
                LogHelper.error(e);
fanli/src/main/java/com/yeshi/fanli/service/inter/count/DailyCountCouponService.java
@@ -4,6 +4,7 @@
import java.util.List;
import com.yeshi.fanli.entity.admin.count.DailyCountCoupon;
import com.yeshi.fanli.entity.admin.count.DailyCountCoupon.DailyCountCouponEnum;
public interface DailyCountCouponService {
@@ -23,6 +24,13 @@
     * @return
     */
    public String getTypeEnumDesc(String type);
    /**
     * 初始化数据统计
     * @param typeEnum
     * @throws Exception
     */
    public void initData(DailyCountCouponEnum typeEnum) throws Exception;
    
    
fanli/src/main/java/com/yeshi/fanli/service/inter/count/DailyCountOrderService.java
@@ -4,6 +4,7 @@
import java.util.List;
import com.yeshi.fanli.entity.admin.count.DailyCountOrder;
import com.yeshi.fanli.entity.admin.count.DailyCountOrder.DailyCountOrderEnum;
public interface DailyCountOrderService {
@@ -25,6 +26,14 @@
     */
    public String getTypeEnumDesc(String type);
    /**
     * 初始化统计数据
     * @param typeEnum
     * @throws Exception
     */
    public void initData(DailyCountOrderEnum typeEnum) throws Exception;
     
    
fanli/src/main/java/com/yeshi/fanli/service/inter/count/DailyCountUserService.java
@@ -4,6 +4,7 @@
import java.util.List;
import com.yeshi.fanli.entity.admin.count.DailyCountUser;
import com.yeshi.fanli.entity.admin.count.DailyCountUser.DailyCountUserEnum;
public interface DailyCountUserService {
@@ -25,7 +26,11 @@
     */
    public String getTypeEnumDesc(String type);
    /**
     * 初始化统计数据
     * @param typeEnum
     * @throws Exception
     */
    public void initData(DailyCountUserEnum typeEnum) throws Exception;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/dynamic/GoodsEvaluateService.java
@@ -138,8 +138,6 @@
    public void release(String id) throws GoodsEvaluateException;
    public void addGoodsEvaluateByDynamicInfo(DynamicInfo info);
    public void saveGoodsComment(String id, int kind, List<CommentInfo> comments) throws GoodsEvaluateException, Exception;
@@ -161,5 +159,14 @@
    public void addRanDomShareCount();
    /**
     *  添加发圈内容
     * @param goodsId 商品id  必传
     * @param cid 大淘客分类id  必传
     * @param title 标题    必传
     * @param comment
     */
    public void addGoodsEvaluate(Long goodsId, Integer cid, String title, String comment) throws GoodsEvaluateException;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserOtherMsgNotificationService.java
@@ -301,4 +301,12 @@
     */
    public void teamSplitCallBoss(Long uid, String beiZhu, MsgOtherVIPDTO dto);
    /**
     * vip升级奖励
     * @param uid
     * @param beiZhu
     * @param dto
     */
    public void vipUpgradeReward(Long uid, String beiZhu, MsgOtherSystemGiveDTO dto);
}
fanli/src/main/java/com/yeshi/fanli/util/Constant.java
@@ -175,9 +175,8 @@
    // 订单实付款
    public static final BigDecimal VIP_ORDER_PAY = new BigDecimal("1");
    
    // 订单列表显> 时间 TODO
    public static final String ORDER_SHOW_BRACE_TIME = "2019-12-14";
    public static final String ORDER_SHOW_BRACE_TIME = "2012-03-01";
        
    // 奖励券倒计时 - 天数
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -1746,6 +1746,35 @@
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        } else if (msg.getType() == MsgTypeOtherTypeEnum.vipUpgradeReward) {
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgOtherSystemGiveDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherSystemGiveDTO.class);
            if (dto == null)
                return null;
            List<ClientTextStyleVO> contentList = new ArrayList<>();
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("状        态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getDesc() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖        励", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备        注", COLOR_TITLE), contentList));
            UserMsgVO userMsgVO = new UserMsgVO();
            userMsgVO.setIcon("http://img.flqapp.com/resource/msg/icon_msg_vip.png");
            userMsgVO.setTitle(dto.getName());
            userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
            userMsgVO.setContentItems(items);
            return userMsgVO;
        }
        return new UserMsgVO(icon, msg.getType().getDesc(),