yujian
2019-12-25 59aced4fe04f7e2fdcca81cb9ef279a70522301e
Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div

# Conflicts:
# fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralTaskRecordServiceImpl.java
62个文件已修改
6个文件已添加
1122 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/h5/AppH5CouponController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/h5/AppH5TaoLiJinController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsClassControllerV2.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HotSellControllerV2.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/JingDongControllerV2.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/PinDuoDuoControllerV2.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareStorageControllerV2.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dto/ConfigParamsDTO.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/help/AppPageNotification.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/tlj/UserTaoLiJinOrigin.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/integral/IntegralTask.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/integral/IntegralTaskClass.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/log/LogHelper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/integral/CodePublishRecordMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassShopServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java 146 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityGoodsServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/TaoKeGoodsServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderProcessServiceImpl.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/config/HongBaoManageServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/order/msg/UserOrderMsgNotificationServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackWinInviteServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TLJFreeBuyGoodsServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoShopServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralExchangeServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralTaskRecordServiceImpl.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/MsgInviteDetailServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/brand/BrandClassShopService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/brand/BrandInfoService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/lable/QualityGoodsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/lable/TaoKeGoodsService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/order/config/HongBaoManageService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/taobao/TaoBaoShopService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/manger/HongBaoV2AddManager.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/Constant.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgInviteDetailFactory.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/goods/jd/NYouHuiUtil.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/rocketmq/consumer/redpack/RedPackMessageListener.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/taobao/DaTaoKeUtil.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/env-dev/xxl-job.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/env-pro-by/xxl-job.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/env-pro-job/xxl-job.xml 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/env-pro/xxl-job.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/log4j.properties 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/spring.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/resource/xxl-job-executor.properties 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/apph5/AppH5ShareController.java
@@ -7,12 +7,14 @@
import javax.annotation.Resource;
import org.hibernate.engine.spi.VersionValue;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.yeshi.utils.JsonUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.sun.accessibility.internal.resources.accessibility;
import com.yeshi.fanli.dto.ConfigParamsDTO;
import com.yeshi.fanli.dto.jd.JDFilter;
import com.yeshi.fanli.dto.jd.JDSearchResult;
@@ -27,6 +29,7 @@
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.jd.JDApiUtil;
import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil;
@@ -173,6 +176,8 @@
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO configParamsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                        hongBaoManageService.getVIPFanLiRate());
                for (UserShareGoodsGroup goodsGroup : list) {
                    CommonGoods commonGoods = goodsGroup.getCommonGoods();
                    if (commonGoods == null) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -2167,7 +2167,7 @@
            }
            // 1.6.5 之后返回 微信号提示
            if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
                userInfo.setWeiXinTip("添加微信号后,你的邀请人和一级队员可以通过微信与你建立联系。");
                userInfo.setWeiXinTip("添加微信号后,你的邀请人和直接粉丝可以通过微信与你建立联系。");
            // 查询是否为VIP
            if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/h5/AppH5CouponController.java
@@ -26,7 +26,9 @@
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
import com.yeshi.fanli.service.inter.user.UserSystemCouponService;
import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
@@ -50,9 +52,12 @@
    @Resource
    private UserSystemCouponService userSystemCouponService;
    @Resource
    private UserInfoExtraService userInfoExtraService;
    @Resource
    private UserVIPInfoService userVIPInfoService;
    @RequestMapping("getMianDanGoodsList")
    public void getMianDanGoodsList(AcceptData acceptData, PrintWriter out, int page, int pageSize, String callback) {
@@ -87,9 +92,8 @@
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO configParamsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO configParamsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        /* 遍历列表数据 */
        for (QualityFactory selectionGoods : listQuery) {
@@ -174,12 +178,13 @@
        }
        // 获取免单券数量
        long couponCount = userSystemCouponService.countUsableRewardCoupon(uid);
        UserInfoExtra extraInfo=userInfoExtraService.getUserInfoExtra(uid);
        long integralCount=extraInfo!=null?extraInfo.getGoldCoin():0L;
        UserInfoExtra extraInfo = userInfoExtraService.getUserInfoExtra(uid);
        long integralCount = extraInfo != null ? extraInfo.getGoldCoin() : 0L;
        JSONObject userJson = new JSONObject();
        userJson.put("nickName", user.getNickName());
        userJson.put("portrait", user.getPortrait());
        userJson.put("id", user.getId());
        userJson.put("vip", userVIPInfoService.isVIP(user.getId()));
        JSONObject data = new JSONObject();
        data.put("user", userJson);
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/h5/AppH5TaoLiJinController.java
@@ -25,6 +25,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.TaoBaoConstant;
import com.yeshi.fanli.util.TimeUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.util.taobao.TaoLiJinUtil;
@@ -63,8 +64,8 @@
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
        ConfigParamsDTO configParamsDTO = new ConfigParamsDTO(proportion, proportion, Constant.MAX_REWARD_RATE,
                hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO configParamsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        for (TLJBuyGoods goods : goodsList) {
            TaoBaoGoodsBrief taoBaoGoodsBrief = goods.getGoods();
            if (taoBaoGoodsBrief == null) {
@@ -111,11 +112,8 @@
        goodsList = goodsList.size() > 10 ? goodsList.subList(0, 10) : goodsList;
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
        BigDecimal fanLiRate = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
        BigDecimal shareRate = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
        ConfigParamsDTO configParamsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO configParamsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        for (ShareHotGoods hotGoods : goodsList) {
            TaoBaoGoodsBrief taoBaoGoodsBrief = hotGoods.getGoods();
            if (taoBaoGoodsBrief == null) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/BrandControllerV2.java
@@ -111,7 +111,7 @@
        if (page == null || page < 1) {
            page = 1;
        }
        JSONObject data = brandClassShopService.listEffectiveCacheV2(page, cid);
        JSONObject data = brandClassShopService.listEffectiveCacheV2(page, cid,acceptData.getPlatform(),acceptData.getVersion());
        out.print(JsonUtil.loadTrueResult(data));
    }
@@ -308,9 +308,8 @@
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                    acceptData.getVersion());
            // 商品信息过滤
            listGoodsBrief = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(listGoodsBrief);
@@ -384,7 +383,7 @@
        
        long count = brandInfoService.countBrandInfo(cid);
        
        List<BrandInfoVO> list = brandInfoService.listBrandInfoCache((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, cid);
        List<BrandInfoVO> list = brandInfoService.listBrandInfoCache((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, cid,acceptData.getPlatform(),acceptData.getVersion());
        if (list == null)
            list = new ArrayList<BrandInfoVO>();
        
@@ -533,9 +532,8 @@
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                    acceptData.getVersion());
            // 商品信息过滤
            listGoodsBrief = taoBaoGoodsUpdateService.filterImportantTaoBaoGoods(listGoodsBrief);
@@ -681,7 +679,7 @@
        
        long count = brandInfoService.countValidByCidToApp(cid);
        
        List<BrandInfoVO> list = brandInfoService.listValidToApp((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, cid);
        List<BrandInfoVO> list = brandInfoService.listValidToApp((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE, cid,acceptData.getPlatform(),acceptData.getVersion());
        if (list == null)
            list = new ArrayList<BrandInfoVO>();
        
@@ -714,12 +712,12 @@
            brandInfoRecordService.addRecord(id, uid, acceptData.getDevice());
        }
        
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
        
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        JSONArray array = new JSONArray();
        
        List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId((page - 1) * 50, 50,id);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/CommonContentControllerV2.java
@@ -37,6 +37,7 @@
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
@@ -162,9 +163,9 @@
        JSONArray array = new JSONArray();
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create();
        List<TaoBaoGoodsBrief> goodsList = result.getGoodsList();
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        for (TaoBaoGoodsBrief taoBaoGoodsBrief : goodsList) {
            GoodsDetailVO vo = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, paramsDTO);
            if (type == CommonContentTypeEnum.mianDan)// 免单商品
@@ -210,11 +211,11 @@
            List<JDGoods> goodsList = result.getGoodsList();
            if (goodsList != null && goodsList.size() > 0) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                        .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                for (JDGoods goods : goodsList) {
                    array.add(gson.toJson(GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO)));
                }
@@ -260,11 +261,11 @@
            List<PDDGoodsDetail> goodsList = result.getGoodsList();
            if (goodsList != null && goodsList.size() > 0) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                        .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                for (PDDGoodsDetail goods : goodsList) {
                    array.add(gson.toJson(GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO)));
                }
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java
@@ -21,6 +21,7 @@
import com.yeshi.fanli.entity.common.JumpDetailV2;
import com.yeshi.fanli.entity.config.AppHomeFloatImg;
import com.yeshi.fanli.entity.taobao.ClientTBPid;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.homemodule.FloatADService;
@@ -161,8 +162,8 @@
     * @param acceptData
     * @param out
     */
    @RequestMapping(value = "getHomeConfigNew", method = RequestMethod.POST)
    public void getHomeConfigNew(AcceptData acceptData, Long uid, PrintWriter out) {
    @RequestMapping(value = "getHomeConfigNew")
    public void getHomeConfigNew(AcceptData acceptData, Long uid, String callback, PrintWriter out) {
        if (uid != null && uid == 0L)
            uid = null;
@@ -230,7 +231,10 @@
        String platform = acceptData.getPlatform();
        data.put("hotFuctionLink",
                configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));
        out.print(JsonUtil.loadTrueResult(data));
        if (StringUtil.isNullOrEmpty(callback))
            out.print(JsonUtil.loadTrueResult(data));
        else
            out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
    }
    /**
@@ -525,4 +529,19 @@
            out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult(data)));
    }
    /**
     * 获取饿了么的推广链接
     *
     * @param acceptData
     * @param uid
     * @param out
     */
    @RequestMapping(value = "userProtocolListen")
    public void userProtocolListen(AcceptData acceptData, Long uid, int type, PrintWriter out) {
        LogHelper.userProtocolListen(String.format("%s#%s#%s", acceptData.getDevice(), uid, type));
        out.print(JsonUtil.loadTrueResult(""));
    }
}
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConsumerControllerV2.java
@@ -39,6 +39,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.cache.JDGoodsCacheUtil;
import com.yeshi.fanli.util.cache.PinDuoDuoCacheUtil;
import com.yeshi.fanli.util.cache.TaoBaoGoodsCacheUtil;
@@ -84,9 +85,9 @@
    @Resource
    private RedisManager redisManager;
    /**
     * 收藏商品
     *
     * @param acceptData
     * @param uid
     * @param id
@@ -236,9 +237,10 @@
                }
            }
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                    acceptData.getVersion());
            for (CollectionGoodsV2 collectionGoodsV2 : collectionGoodsList) {
                CommonGoods commonGoods = collectionGoodsV2.getCommonGoods();
                if (commonGoods == null) {
@@ -351,9 +353,8 @@
        JSONArray array = new JSONArray();
        if (list != null && list.size() > 0) {
            Gson gson = gsonBuilder.create();
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                    acceptData.getVersion());
            for (ScanHistoryV2 sh : list) {
                CommonGoods commonGoods = sh.getCommonGoods();
                if (commonGoods == null) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsClassControllerV2.java
@@ -7,6 +7,7 @@
import javax.annotation.Resource;
import org.hibernate.id.enhanced.AccessCallback;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -36,6 +37,7 @@
import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
import com.yeshi.fanli.vo.goods.GoodsDetailVO;
@@ -168,7 +170,7 @@
            filter.setPageSize(pageSize);
            filter.setCateIds(taoBaoCatIds);
            JSONObject result = taoKeGoodsService.searchWuLiaoV2(filter);
            JSONObject result = taoKeGoodsService.searchWuLiaoV2(filter,acceptData.getPlatform(),acceptData.getVersion());
            out.print(JsonUtil.loadTrueResult(result));
            return;
        }
@@ -176,9 +178,8 @@
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        
        // 精选库数据
        JSONArray array = new JSONArray();
@@ -293,9 +294,8 @@
                JSONArray array = new JSONArray();
                if (resultGoodsList != null) {
                    BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                    BigDecimal shareRate = hongBaoManageService.getShareRate();
                    ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
                    ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                            acceptData.getVersion());
                    for (TaoBaoGoodsBrief goods : resultGoodsList) {
                        GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
                        array.add(gson2.toJson(goodsDetailVO));
@@ -319,7 +319,7 @@
                taoKeGoodsService.setSearchFilter(searchfilter, filter, order, startprice, endprice, fastFilter,
                        totalSales);
                JSONObject result = taoKeGoodsService.searchWuLiaoV2(searchfilter);
                JSONObject result = taoKeGoodsService.searchWuLiaoV2(searchfilter,acceptData.getPlatform(),acceptData.getVersion());
                out.print(JsonUtil.loadTrueResult(result));
                return;
            }
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -340,11 +340,11 @@
        for (String img : tb.getImgList()) {
            finalImgList.add(TbImgUtil.getTBSizeImg(img, 600));
        }
        if (finalImgList.size() == 0) {
            finalImgList.add(tb.getPictUrl());
        }
        if (!StringUtil.isNullOrEmpty(tb.getPictUrlWhite()))
            finalImgList.add(0, tb.getPictUrlWhite());
@@ -367,10 +367,9 @@
            LogHelper.errorDetailInfo(e);
        }
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
        if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
            goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
@@ -537,8 +536,7 @@
                params1.put("url", configService.get("special_guide_reward_coupon_link"));
            else
                params1.put("url", configService.get("vip_link"));
            rewardCoupon
                    .setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPFanLiRate()));
            rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
            if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                rewardCoupon.setDesc("返");
                params1.put("url", configService.get("vip_link"));
@@ -624,10 +622,8 @@
        // 保存缓存
        jdGoodsCacheUtil.saveGoodsInfo(jdGoods);
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertJDGoods(jdGoods, paramsDTO);
        if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
            goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
@@ -651,12 +647,14 @@
                if (commissionShare != null && commissionShare.compareTo(threeClass.getSelfComm()) > 0) {
                    jdGoods.setCommissionPlus(threeClass.getSelfComm());
                    // plus返利
                    BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods, fanLiRate);
                    BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
                            hongBaoManageService.getFanLiRate());
                    otherInfo.setFanliMoneyPlus("京东plus返¥" + fanliMoneyPlus);
                    // 使用奖励券最高返
                    if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
                        maxMoneyPlus = "(京东plus返¥"
                                + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
                                + JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
                                        hongBaoManageService.getVIPFanLiRate())
                                + ")";
                    } else
                        maxMoneyPlus = "(京东plus最高返¥"
@@ -676,7 +674,7 @@
        else
            params1.put("url", configService.get("vip_link"));
        rewardCoupon.setMaxMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPFanLiRate()));
        rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
        if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
            rewardCoupon.setDesc("返");
            params1.put("url", configService.get("vip_link"));
@@ -820,10 +818,8 @@
            return;
        }
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertPDDGoods(pddGoods, paramsDTO);
        if (goodsDetail != null && goodsDetail.getMoneyInfo() != null && userVIPInfoService.isVIP(uid)) {
            goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
@@ -841,8 +837,7 @@
        else
            params1.put("url", configService.get("vip_link"));
        rewardCoupon
                .setMaxMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPFanLiRate()));
        rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
        if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
            rewardCoupon.setDesc("返");
            params1.put("url", configService.get("vip_link"));
@@ -994,10 +989,8 @@
                    list = list.subList(0, 10);
                }
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                        hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                List<GoodsDetailVO> listDetailVO = new ArrayList<GoodsDetailVO>();
                for (JDGoods goods : list) {
@@ -1038,10 +1031,8 @@
                                goodsList = goodsList.subList(0, 10);
                            }
                            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                            BigDecimal shareRate = hongBaoManageService.getShareRate();
                            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate,
                                    Constant.MAX_REWARD_RATE, hongBaoManageService.getVIPFanLiRate());
                            ConfigParamsDTO paramsDTO = hongBaoManageService
                                    .getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
                            for (PDDGoodsDetail goods : goodsList) {
                                listDetailVO.add(GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO));
                            }
@@ -1084,10 +1075,8 @@
            if (goodsList != null && goodsList.size() > 0) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                        hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                goodsList.parallelStream().forEach(goods -> {
                    if (goods != null) {
@@ -1365,6 +1354,7 @@
        ConfigParamsDTO params = new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
                hongBaoManageService.getShareRate(), new BigDecimal(80), hongBaoManageService.getVIPFanLiRate());
        hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion());
        if (tbGoodsList.size() > 0) {
            List<TaoBaoGoodsBrief> goodsList = null;
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/HotSellControllerV2.java
@@ -96,9 +96,8 @@
            List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>();
            if (detailList != null) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                for (DaTaoKeDetailV2 detail : detailList) {
                    TaoBaoGoodsBrief taoBaoGoodsBrief = TaoBaoUtil.convert(detail);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/InviteControllerV2.java
@@ -110,7 +110,7 @@
            JSONObject data = new JSONObject();
            data.put("nickName", userInfo.getNickName());
            data.put("portrait", userInfo.getPortrait());
            data.put("tips", "确认要成为TA的一级队员吗?邀请关系一旦建立不可更改。");
            data.put("tips", "确认要成为TA的直接粉丝吗?邀请关系一旦建立不可更改。");
            out.print(JsonUtil.loadTrueResult(data));
        } catch (UserInfoExtraException e) {
            out.print(JsonUtil.loadFalseResult(e.getMsg()));
@@ -144,7 +144,7 @@
            JSONObject data = new JSONObject();
            data.put("nickName", userInfo.getNickName());
            data.put("portrait", userInfo.getPortrait());
            data.put("tips", "确认要成为TA的一级队员吗?邀请关系一旦建立不可更改。");
            data.put("tips", "确认要成为TA的直接粉丝吗?邀请关系一旦建立不可更改。");
            data.put("key", activeWX);
            out.print(JsonUtil.loadTrueResult(data));
        } catch (UserInfoExtraException e) {
@@ -196,7 +196,7 @@
    @RequestMapping(value = "getMyTeam", method = RequestMethod.POST)
    public void getMyTeam(AcceptData acceptData, long page, long uid, int type, PrintWriter out) {
        if (type != 1 && type != 2) {
            out.print(JsonUtil.loadFalseResult("队员类型不正确"));
            out.print(JsonUtil.loadFalseResult("粉丝类型不正确"));
            return;
        }
@@ -404,7 +404,7 @@
        if (!hasCode) {
            List<String> tipCode = new ArrayList<String>();
            resultData.put("helpLinkActivate", configService.get("team_help_url"));
            tipCode.add("激活邀请功能后才可以邀请队员,一级队员是由你直接邀请,二级队员是由你的一级队员邀请。");
            tipCode.add("激活邀请功能后才可以邀请粉丝,直接粉丝是由你直接邀请,间接粉丝是由你的直接粉丝邀请。");
            tipCode.add("邀请激活功能,必须要有邀请码,邀请码可以通过金币兑换,也可以全网搜索。");
            resultData.put("tipCode", tipCode);
        }
@@ -412,11 +412,11 @@
        // 未添加微信号
        List<String> tipWeiXin = new ArrayList<String>();
        if (!bdWeiXin) {
            tipWeiXin.add("添加微信号后,你的邀请人和一级队员可通过微信号与你建立联系;");
            tipWeiXin.add("你也可以向邀请人学习或向一级队员教授赚钱技巧。");
            tipWeiXin.add("添加微信号后,你的邀请人和直接粉丝可通过微信号与你建立联系;");
            tipWeiXin.add("你也可以向邀请人学习或向直接粉丝教授赚钱技巧。");
        }
        resultData.put("tipWeiXin", tipWeiXin);
        resultData.put("tipWeiXinAdd", "添加微信号后,你的邀请人和一级队员可以通过微信与你建立联系。");
        resultData.put("tipWeiXinAdd", "添加微信号后,你的邀请人和直接粉丝可以通过微信与你建立联系。");
        resultData.put("bdWeiXin", bdWeiXin);
        out.print(JsonUtil.loadTrueResult(resultData));
@@ -525,13 +525,13 @@
        Long bossId = null;
        Long workerId = null;
        String title = "队员提醒消息";
        String title = "粉丝提醒消息";
        String content = "";
        if (remindBoss) {
            // 提示队长
            bossId = remindId;
            workerId = uid;
            content = "你的一级队员" + userInfo.getNickName()
            content = "你的直接粉丝" + userInfo.getNickName()
                    + ",提醒你添加微信号,以便于和你取得联系和学习省钱技巧,赶快去添加吧;注:请升级到本软件最新版本在“我的-我的信息”中添加。";
        } else {
            // 提示队员
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/JingDongControllerV2.java
@@ -116,9 +116,8 @@
            List<JDGoods> goodsList = jdGoodsService.specialSearch(page, cid);
            JSONArray array = new JSONArray();
            if (goodsList != null && goodsList.size() > 0) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                        .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/PinDuoDuoControllerV2.java
@@ -109,9 +109,8 @@
            JSONArray array = new JSONArray();
            if (goodsList != null && goodsList.size() > 0) {
                Gson gson = JsonUtil.getApiCommonGson();
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,    hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                for (PDDGoodsDetail goods : goodsList) {
                    GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RecommendControllerV2.java
@@ -149,9 +149,9 @@
            JSONObject root = specialService.listCacheSpecialToIndex(acceptData, deviceSex);
            // 2、顶部轮播图
            List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("index_top",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCardAndVersion("index_top",
                    acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
            List<SwiperPicture> topPicList = new ArrayList<>();
            if (oldtopPicList != null && oldtopPicList.size() > 0)
                topPicList.addAll(oldtopPicList);
@@ -164,7 +164,8 @@
                    && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) {
                // 如果IOS当前版本处于审核状态就不返回
            } else {
                invitePicList = swiperPictureService.getByBannerCardAndVersion("index_invite",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()));
                invitePicList = swiperPictureService.getByBannerCardAndVersion("index_invite", acceptData.getPlatform(),
                        Integer.parseInt(acceptData.getVersion()));
            }
            if (invitePicList == null) {
@@ -230,8 +231,8 @@
        long nextTime = nowTime + 1000 * 60 * 60L;// 默认为1小时
        if (nextPos < dtoList.size()) {
            nextTime = TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(nowTime, "yyyyMM") + dtoList.get(nextPos).getTime(),
                    "yyyyMMddHH");
            nextTime = TimeUtil.convertToTimeTemp(
                    TimeUtil.getGernalTime(nowTime, "yyyyMM") + dtoList.get(nextPos).getTime(), "yyyyMMddHH");
        }
        JSONArray array = null;
@@ -278,13 +279,15 @@
            /* 遍历列表数据 */
            ConfigParamsDTO configParamsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                    acceptData.getVersion());
            for (DaTaoKeDetailV2 detail : listGoods) {
                TaoBaoGoodsBrief taoBaoGoodsBrief = TaoBaoUtil.convert(detail);
                if (taoBaoGoodsBrief == null) {
                    continue;
                }
                GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief,
                        new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate()));
                GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, configParamsDTO);
                JSONObject params = new JSONObject();
                params.put("url", configService.get("spike_goods_link") + "?id=" + taoBaoGoodsBrief.getAuctionId());
@@ -359,8 +362,7 @@
        List<SpikeTimeVO> list = new ArrayList<SpikeTimeVO>();
        for (int i = 0; i < timeList.size(); i++) {
            SpikeTimeVO spikeTime1 = new SpikeTimeVO();
            spikeTime1.setTime(
                     timeList.get(i).getTime().subSequence(2, 4)+":00");
            spikeTime1.setTime(timeList.get(i).getTime().subSequence(2, 4) + ":00");
            if (timeList.get(i).getState() <= 0)
                spikeTime1.setState("进行中");
            else
@@ -409,9 +411,8 @@
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
        if (detailList != null) {
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                    acceptData.getVersion());
            for (DaTaoKeDetailV2 detail : detailList) {
                array.add(gson.toJson(GoodsDetailVOFactory.convertTaoBao(TaoBaoUtil.convert(detail), paramsDTO)));
@@ -555,9 +556,8 @@
                }
            }
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
            ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                    acceptData.getVersion());
            for (TaoBaoGoodsBrief goods : goodsList) {
                GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO);
@@ -575,7 +575,8 @@
                List<TLJBuyGoods> list = homeRecommendGoodsService.getZiGouLiJianHotGoods(acceptData.getDevice());
                if (list != null && list.size() > 0) {
                    BigDecimal rateBuy = TaoBaoConstant.OWN_BUY_WITHOUT_FANLI_RATE;
                    ConfigParamsDTO paramsBuy = new ConfigParamsDTO(rateBuy, rateBuy, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
                    ConfigParamsDTO paramsBuy = new ConfigParamsDTO(rateBuy, rateBuy, Constant.MAX_REWARD_RATE,
                            hongBaoManageService.getVIPFanLiRate());
                    for (int i = list.size() - 1; i >= 0; i--) {
                        TLJBuyGoods goods = list.get(i);
                        GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(goods.getGoods(), paramsBuy);
@@ -631,9 +632,8 @@
                    // 设备推荐
                    if (gList != null) {
                        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                        BigDecimal shareRate = hongBaoManageService.getShareRate();
                        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
                        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                                acceptData.getVersion());
                        for (TaoBaoGoodsBrief goods : gList) {
                            if (!StringUtil.isNullOrEmpty(goods.getCouponInfo()) && goods.getCouponAmount() != null
                                    && goods.getCouponAmount().compareTo(new BigDecimal("5")) >= 0
@@ -668,10 +668,10 @@
                    }
                }
            }
            JSONArray localArray = qualityGoodsService.getRecommendToIndexV2((page - 1) * pageSize, pageSize);
            JSONArray localArray = qualityGoodsService.getRecommendToIndexV2((page - 1) * pageSize, pageSize,acceptData.getPlatform(),acceptData.getVersion());
            array.addAll(localArray);
        } else {// 从精选库来
            array = qualityGoodsService.getRecommendToIndexV2((page - 1) * pageSize, pageSize);
            array = qualityGoodsService.getRecommendToIndexV2((page - 1) * pageSize, pageSize,acceptData.getPlatform(),acceptData.getVersion());
            if (array == null) {
                out.print(JsonUtil.loadFalseResult("没有更多了"));
                return;
@@ -704,9 +704,8 @@
            List<JDGoods> goodsList = result.getGoodsList();
            if (goodsList != null && goodsList.size() > 0) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                        .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
@@ -738,9 +737,8 @@
            Gson gson = JsonUtil.getApiCommonGson();
            List<PDDGoodsDetail> goodsList = result.getGoodsList();
            if (goodsList != null && goodsList.size() > 0) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                for (PDDGoodsDetail goods : goodsList) {
                    GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO);
@@ -773,9 +771,8 @@
            JSONArray arrayKeys = JSONArray.fromObject(keys);
            if (arrayKeys != null && arrayKeys.size() > 0) {
                count = arrayKeys.size();
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                int j = 1;
                for (int i = (page - 1) * 3; i < arrayKeys.size(); i++) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -360,14 +360,12 @@
                commonGoods = CommonGoodsFactory.create(goodsBrief);
            }
            BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
            BigDecimal shareRate = hongBaoManageService.getShareRate();
            Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                    .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
            data.put("type", type);
            data.put("goods",
                    gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods, new ConfigParamsDTO(fanLiRate,
                            shareRate, Constant.MAX_REWARD_RATE, hongBaoManageService.getVIPFanLiRate()))));
                    gson.toJson(GoodsDetailVOFactory.convertCommonGoods(commonGoods,hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                            acceptData.getVersion()))));
            out.print(JsonUtil.loadTrueResult(data));
            return;
        }
@@ -483,8 +481,6 @@
                            return false;
                        }
                        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                        BigDecimal shareRate = hongBaoManageService.getShareRate();
                        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
@@ -492,8 +488,8 @@
                        data.put("type", 3);
                        data.put("goods",
                                gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief,
                                        new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                                                hongBaoManageService.getVIPFanLiRate()))));
                                        hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                                                acceptData.getVersion()))));
                        out.print(JsonUtil.loadTrueResult(data));
                        return true;
                    }
@@ -763,10 +759,8 @@
        }
        List<GoodsDetailVO> list = new ArrayList<GoodsDetailVO>();
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        for (TaoBaoGoodsBrief goods : taoBaoGoodsBriefs) {
            list.add(GoodsDetailVOFactory.convertTaoBao(goods, paramsDTO));
@@ -786,13 +780,13 @@
                    || ("android".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0_2(platform, version))) {
                BrandInfoVO brandInfoVO = null;
                try {
                    brandInfoVO = brandInfoService.listByAlikeName(key);
                    brandInfoVO = brandInfoService.listByAlikeName(key,acceptData.getPlatform(),acceptData.getVersion());
                } catch (Exception e) {
                }
                if (brandInfoVO != null)
                    data.put("shop", JsonUtil.getApiCommonGson().toJson(brandInfoVO));
            } else {
                List<TaoBaoShopVO> listShop = taoBaoShopService.getShopByKeyV2(key);
                List<TaoBaoShopVO> listShop = taoBaoShopService.getShopByKeyV2(key,acceptData.getPlatform(),acceptData.getVersion());
                if (listShop != null && listShop.size() > 0 && listShop.get(0).getListGoodsVO() != null
                        && listShop.get(0).getListGoodsVO().size() > 2) {
                    TaoBaoShopVO taoBaoShop = listShop.get(0);
@@ -969,13 +963,10 @@
            List<JDGoods> goodsList = result.getGoodsList();
            if (goodsList != null && goodsList.size() > 0) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                        .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                        hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                for (JDGoods goods : goodsList) {
                    GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertJDGoods(goods, paramsDTO);
                    if (hasCoupon) {
@@ -1056,10 +1047,8 @@
            Gson gson = JsonUtil.getApiCommonGson();
            List<PDDGoodsDetail> goodsList = result.getGoodsList();
            if (goodsList != null && goodsList.size() > 0) {
                BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
                BigDecimal shareRate = hongBaoManageService.getShareRate();
                ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                        hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                for (PDDGoodsDetail goods : goodsList) {
                    GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO);
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareControllerV2.java
@@ -273,9 +273,9 @@
            TaoBaoLink taoBaoLink = shareGoodsService.getTaoBaoLinkForShare(uid, goodsId, relationId);
            if (taoBaoLink != null && taoBaoLink.getGoods() != null && needGoods) {
                ConfigParamsDTO dto = new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
                        hongBaoManageService.getShareRate(), Constant.MAX_REWARD_RATE,
                        hongBaoManageService.getVIPFanLiRate());
                ConfigParamsDTO dto = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                        acceptData.getVersion());
                GoodsDetailVO goodsInfo = GoodsDetailVOFactory.convertTaoBao(taoBaoLink.getGoods(), dto);
                shareInfo.setGoodsInfo(goodsInfo);
            }
@@ -352,9 +352,11 @@
            // 测试
            // 2.0.2之前
            if (!VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion()))
                shareInfo.setClickUrl(getERCodeContent(configService.get("taobao_share_qrcode_text"), taoBaoLink.getGoods(), shareInfo.getToken()));
                shareInfo.setClickUrl(getERCodeContent(configService.get("taobao_share_qrcode_text"),
                        taoBaoLink.getGoods(), shareInfo.getToken()));
            shareInfo.setWxErCode(getERCodeContent(configService.get("taobao_share_qrcode_text"), taoBaoLink.getGoods(), shareInfo.getToken()));
            shareInfo.setWxErCode(getERCodeContent(configService.get("taobao_share_qrcode_text"), taoBaoLink.getGoods(),
                    shareInfo.getToken()));
            // 提示图文内容
            String imgs = configService.get("goods_share_notify_imgs");
@@ -383,7 +385,8 @@
                }
            }
            out.print(JsonUtil.loadTrueResult(JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
            out.print(JsonUtil.loadTrueResult(
                    JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
            final TaoBaoLink taobaoLink = taoBaoLink;
            // 异步操作
@@ -641,11 +644,8 @@
        shareInfo.setCommentTexts(new ArrayList<>());
        if (needGoods)
            shareInfo
                    .setGoodsInfo(GoodsDetailVOFactory.convertJDGoods(jdGoods,
                            new ConfigParamsDTO(hongBaoManageService.getFanLiRate(),
                                    hongBaoManageService.getShareRate(), Constant.MAX_REWARD_RATE,
                                    hongBaoManageService.getVIPFanLiRate())));
            shareInfo.setGoodsInfo(GoodsDetailVOFactory.convertJDGoods(jdGoods,
                    hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), acceptData.getVersion())));
        String shareText = "";
        boolean hasCoupon = false;
@@ -699,7 +699,8 @@
                e1.printStackTrace();
            }
        }
        out.print(JsonUtil.loadTrueResult(JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
        out.print(JsonUtil.loadTrueResult(
                JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
        // 异步操作
        final JDGoods goods = jdGoods;
@@ -824,7 +825,8 @@
                e1.printStackTrace();
            }
        }
        out.print(JsonUtil.loadTrueResult(JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
        out.print(JsonUtil.loadTrueResult(
                JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()).create().toJson(shareInfo)));
        // 异步操作
        com.yeshi.fanli.util.ThreadUtil.run(new Runnable() {
@@ -1413,10 +1415,8 @@
            }
        }
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ShareStorageControllerV2.java
@@ -205,9 +205,8 @@
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        for (UserGoodsStorage userGoodsStorage : listStorage) {
            CommonGoods commonGoods = userGoodsStorage.getCommonGoods();
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
@@ -487,10 +487,9 @@
                isNewUser = false;
            }
        }
        BigDecimal fanLiRate = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
        BigDecimal shareRate = hongBaoManageService.getTLJShareRate(System.currentTimeMillis());
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO =  hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        for (ShareHotGoods hotGoods : listHot) {
            TaoBaoGoodsBrief taoBaoGoodsBrief = hotGoods.getGoods();
@@ -790,8 +789,9 @@
        Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
                .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, fanLiRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(),
                acceptData.getVersion());
        for (TLJFreeBuyGoods freeGoods : listFree) {
            TaoBaoGoodsBrief goods = freeGoods.getGoods();
            if (goods == null)
fanli/src/main/java/com/yeshi/fanli/dto/ConfigParamsDTO.java
@@ -8,7 +8,8 @@
    // 分享比例
    private BigDecimal shareRate;
    // 奖励券最高返比例
//    private BigDecimal maxRewardRate;
    private BigDecimal maxRewardRate;
    // VIP返利比例
    private BigDecimal vipFanLiRate;// 会员返利比例
@@ -27,7 +28,7 @@
    public ConfigParamsDTO(BigDecimal fanLiRate, BigDecimal shareRate, BigDecimal maxRewardRate, BigDecimal vipRate) {
        this.fanLiRate = fanLiRate;
        this.shareRate = shareRate;
//        this.maxRewardRate = maxRewardRate;
        this.maxRewardRate = maxRewardRate;
        this.vipFanLiRate = vipRate;
    }
@@ -47,12 +48,12 @@
        this.shareRate = shareRate;
    }
//    public BigDecimal getMaxRewardRate() {
//        return maxRewardRate;
//    }
//
//    public void setMaxRewardRate(BigDecimal maxRewardRate) {
//        this.maxRewardRate = maxRewardRate;
//    }
    public BigDecimal getMaxRewardRate() {
        return maxRewardRate;
    }
    public void setMaxRewardRate(BigDecimal maxRewardRate) {
        this.maxRewardRate = maxRewardRate;
    }
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/help/AppPageNotification.java
@@ -39,7 +39,7 @@
        orderTaoBao("淘宝订单"),
        coollect("收藏"),
        scanHistory("足迹"),
        team("队员"),
        team("粉丝"),
        kefu("联系客服"),
        taoBaoShoppingCart("淘宝购物车"),
        orderFind("订单申诉"),
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java
@@ -30,7 +30,7 @@
        give("赠送"),
        exchange("金币兑换"),
        couponActivate("免单券激活"),
        firstOrderReward("队员首单奖励邀请人金币"),
        firstOrderReward("粉丝首单奖励邀请人金币"),
        systemGive("系统赠送"),
        passVIPApply("超级会员"),
        rejectVIPApply("超级会员"),
fanli/src/main/java/com/yeshi/fanli/entity/bus/tlj/UserTaoLiJinOrigin.java
@@ -16,7 +16,7 @@
public class UserTaoLiJinOrigin {
    public enum TaoLiJinOriginEnum {
        newbiesWin("新人红包"), shareWin("推广红包福利"), rankWin("账户等级福利"), inviteWin("邀请队员奖励"),
        newbiesWin("新人红包"), shareWin("推广红包福利"), rankWin("账户等级福利"), inviteWin("邀请粉丝奖励"),
        refund("未领取退回"), exchange("金币兑换"), friendsGive("好友赠送"), giveSendBack("赠送退回");
        
        private final String desc;
fanli/src/main/java/com/yeshi/fanli/entity/integral/IntegralTask.java
@@ -53,8 +53,8 @@
        giveFreeCoupon("赠送免单券"),
        giveTaoLiJin("赠送推广红包"),
        inShop("浏览店铺"),
        inShopLevelOne("一级队员浏览店铺"),
        inShopLevelTwo("二级队员浏览店铺"),
        inShopLevelOne("直接粉丝浏览店铺"),
        inShopLevelTwo("简介粉丝浏览店铺"),
        scanPush("浏览推荐记录"),
        scanGoods("浏览商品详情页"),
        scanSearchResult("浏览搜索结果页"),
@@ -66,8 +66,8 @@
        couponRebateLevelOne("浏览购物车页"),
        couponRebateLevelTwo("浏览购物车页"),
        rebateOrder("完成返利订单"),
        inviteOrderLevelOne("一级队员邀请订单"),
        inviteOrderLevelTwo("二级队员邀请订单"),
        inviteOrderLevelOne("直接粉丝邀请订单"),
        inviteOrderLevelTwo("间接粉丝邀请订单"),
        shareOrder("分享订单"),
        bindWeiXin("微信授权"),
        bindPhone("绑定手机"),
fanli/src/main/java/com/yeshi/fanli/entity/integral/IntegralTaskClass.java
@@ -23,7 +23,7 @@
    private static final long serialVersionUID = 1L;
    
    public enum UniqueKeyEnum {
        dailySign("每日签到"), smartSearch("智能搜索"), buyReduce("自购立减"), inviteTeam("邀请队员"), shareReward("分享奖励"),
        dailySign("每日签到"), smartSearch("智能搜索"), buyReduce("自购立减"), inviteTeam("邀请粉丝"), shareReward("分享奖励"),
        giveReward("赠送奖励"), scanReward("浏览奖励") , orderReward("订单奖励"), accountMaintain("账号维护");
        private final String desc;
fanli/src/main/java/com/yeshi/fanli/job/BrandInfoJob.java
@@ -2,9 +2,10 @@
import javax.annotation.Resource;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.brand.BrandInfoService;
import com.yeshi.fanli.util.Constant;
@@ -24,8 +25,15 @@
    /**
     * 每两个小时进行更新品牌商品信息
     */
    @Scheduled(cron = "0 0 1/2 * * ? ")
    // @Scheduled(cron = "0 0 1/2 * * ? ")
    @XxlJob("brandGoodsUpdateHandler")
    public ReturnT<String> demoJobHandler(String param) throws Exception {
        updateGoods();
        return ReturnT.SUCCESS;
    }
    public void updateGoods() {
        System.out.println("品牌商品更新执行");
        if (!Constant.IS_TASK)
            return;
        long startTime = java.lang.System.currentTimeMillis();
@@ -33,17 +41,17 @@
        long count = brandInfoService.countValidByCid(null);
        if (count == 0)
            return;
        long totalPage = (count / 100) + 1;
        for (long page = 0; page < totalPage; page++) {
            try {
                brandInfoService.addShopAndGoods(page * 100, 100);
            } catch (Exception e) {
               LogHelper.errorDetailInfo(e);
                LogHelper.errorDetailInfo(e);
            }
        }
        long endTime = java.lang.System.currentTimeMillis();
        LogHelper.test("结束执行品牌更新---updateGoods" + endTime + ",总耗时:" +(endTime -startTime) / 1000);
        LogHelper.test("结束执行品牌更新---updateGoods" + endTime + ",总耗时:" + (endTime - startTime) / 1000);
    }
}
fanli/src/main/java/com/yeshi/fanli/log/LogHelper.java
@@ -47,6 +47,13 @@
    private static Logger mqLogger = Logger.getLogger("mqLog");
    
    private static Logger vipInfoLogger = Logger.getLogger("vipInfoLog");
    private static Logger userProtocolListenLog = Logger.getLogger("userProtocolListenLog");
    public static void userProtocolListen(Object obj) {
        userProtocolListenLog.info(obj);
    }
    public static void userInfo(Object obj) {
        userLogger.info(obj);
fanli/src/main/java/com/yeshi/fanli/mapping/integral/CodePublishRecordMapper.xml
@@ -65,7 +65,7 @@
    </update>
    <select id="listValid" resultMap="BaseResultVOMap">
        SELECT p.*,u.`nick_name`,u.`portrait`,e.`uie_invite_code` FROM
        SELECT p.*,u.`nick_name`,u.`portrait`,IF(e.uie_invite_code_vip is null, e.`uie_invite_code`,uie_invite_code_vip) as uie_invite_code FROM
        yeshi_ec_code_publish_record p
        LEFT JOIN `yeshi_ec_user` u ON u.`id` =
        p.`pr_uid`
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandClassShopServiceImpl.java
@@ -369,8 +369,8 @@
    }
    @Override
    @Cacheable(value = "brandCache", key = "'listEffectiveCacheV2-'+#page+'-'+#cid")
    public JSONObject listEffectiveCacheV2(int page, Long cid) {
    @Cacheable(value = "brandCache", key = "'listEffectiveCacheV2-'+#page+'-'+#cid+'-'+#platform+'-'+#version")
    public JSONObject listEffectiveCacheV2(int page, Long cid,String platform,String version) {
        long countShop = 0;
        if (cid != null && cid <= 0) {
@@ -431,9 +431,7 @@
            count = taoBaoShopService.countBrandShopinfo(cid);
        }
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO =     hongBaoManageService.getShowComputeRate(platform, version);
        // 淘宝商品信息过滤
        Map<Long, TaoBaoGoodsBrief> goodsMap = getFilterTaoBaoGoods(listInfo);
@@ -528,7 +526,7 @@
    
    @Override
    public List<TaoBaoShopVO> listEffectiveShop(long start, int count, Long cid) {
    public List<TaoBaoShopVO> listEffectiveShop(long start, int count, Long cid,String platform,String version) {
        if (cid != null && cid <= 0) {
            cid = null;
        }
@@ -538,9 +536,8 @@
            return listInfo;
        
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO =
                hongBaoManageService.getShowComputeRate(platform, version);
        // 淘宝商品信息过滤
        Map<Long, TaoBaoGoodsBrief> goodsMap = getFilterTaoBaoGoods(listInfo);
fanli/src/main/java/com/yeshi/fanli/service/impl/brand/BrandInfoServiceImpl.java
@@ -1,7 +1,6 @@
package com.yeshi.fanli.service.impl.brand;
import java.io.InputStream;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -75,8 +74,7 @@
    @Resource(name = "taskExecutor")
    private TaskExecutor executor;
    @Override
    public void saveObject(MultipartFile file, BrandInfo record) throws BrandInfoException {
        String name = record.getName();
@@ -84,20 +82,19 @@
            throw new BrandInfoException(1, "名称不能为空");
        BrandClass brandClass = record.getBrandClass();
        if (brandClass ==null || brandClass.getId() == null)
        if (brandClass == null || brandClass.getId() == null)
            throw new BrandInfoException(1, "分类不能为空");
        BrandInfo existBrand = brandInfoMapper.selectByUniqueName(name.trim(), brandClass.getId(), record.getId());
        if (existBrand != null)
            throw new BrandInfoException(1, "该分类中已存在:" + name.trim());
        Integer state = record.getState();
        if (state == null) {
            state = 0;
            record.setState(state);
        }
        String picture = null;
        if (file != null) {
            try { // 图片上传
@@ -106,27 +103,27 @@
                throw new BrandInfoException(1, "图片上传失败");
            }
        }
        String searchKey = record.getSearchKey();
        if (!StringUtil.isNullOrEmpty(searchKey)) {
            if (StringUtil.isNullOrEmpty(record.getSearchKeyJD()))
                record.setSearchKeyJD(searchKey);
            if (StringUtil.isNullOrEmpty(record.getSearchKeyPDD()))
                record.setSearchKeyPDD(searchKey);
        }
        String shopKey = record.getShopKey();
        if (!StringUtil.isNullOrEmpty(shopKey)) {
            if (StringUtil.isNullOrEmpty(record.getShopKeyJD()))
                record.setShopKeyJD(shopKey);
            if (StringUtil.isNullOrEmpty(record.getShopKeyPDD()))
                record.setShopKeyPDD(shopKey);
        }
        record.setName(name.trim());
        record.setUpdateTime(new Date());
        Long id = record.getId();
        if (id == null) {
            record.setIcon(picture);
@@ -135,7 +132,7 @@
            record.setShopTotal(0);
            record.setCreateTime(new Date());
            brandInfoMapper.insert(record);
            BrandInfo resultObj = new BrandInfo();
            resultObj.setId(record.getId());
            resultObj.setOrder(Integer.valueOf(record.getId().toString()));
@@ -149,14 +146,15 @@
                // 删除老图
                if (resultObj.getIcon() != null && resultObj.getIcon().trim().length() > 0 && !Constant.IS_TEST) {
                    COSManager.getInstance().deleteFile(resultObj.getIcon());
                };
                }
                ;
                // 存储新图
                record.setIcon(picture);
            } else {
                record.setIcon(resultObj.getIcon());
            }
            if (state == 0){
            if (state == 0) {
                record.setGoodsTotal(0);
                record.setShopTotal(0);
            } else {
@@ -167,8 +165,8 @@
            record.setWeight(resultObj.getWeight());
            record.setCreateTime(resultObj.getCreateTime());
            brandInfoMapper.updateByPrimaryKey(record);
            if (state == 0){
            if (state == 0) {
                executor.execute(new Runnable() {
                    @Override
                    public void run() {
@@ -184,7 +182,7 @@
                @Override
                public void run() {
                    BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(record);
                    BrandInfo update = new BrandInfo();
                    update.setId(record.getId());
                    update.setGoodsTotal(numInfo.getGoodsTotal());
@@ -195,76 +193,76 @@
        }
    }
    /**
     * 上传图片
     *
     * @param file
     * @return
     * @throws Exception
     */
    public String uploadPicture(MultipartFile file) throws Exception {
        // 文件解析
        // 文件解析
        InputStream inputStream = file.getInputStream();
        String contentType = file.getContentType();
        String type = contentType.substring(contentType.indexOf("/") + 1);
        // 文件路径
        String filePath="/img/brand/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
        String filePath = "/img/brand/" + UUID.randomUUID().toString().replace("-", "") + "." + type;
        // 执行上传
        String fileLink= COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
        String fileLink = COSManager.getInstance().uploadFile(inputStream, filePath).getUrl();
        return fileLink;
    }
    @Override
    public int deleteBatchByPrimaryKey(List<Long> list) {
        executor.execute(new Runnable() {
            @Override
            public void run() {
                for (Long id: list) {
                for (Long id : list) {
                    brandGoodsCaheService.removeByBrandId(id);
                    brandShopCaheService.removeByBrandId(id);
                }
            }
        });
        return brandInfoMapper.deleteBatchByPrimaryKey(list);
    }
    @Override
    public void updateOrder(Long id, Integer moveType) throws BrandInfoException {
        if (moveType == null || (!moveType.equals(1) && !moveType.equals(-1)))
            throw new BrandInfoException(1, "传递的类型不正确");
        if (id == null)
            throw new BrandInfoException(1, "ID不能为空");
        BrandInfo resultObj = brandInfoMapper.selectByPrimaryKey(id);
        if (resultObj == null)
        if (resultObj == null)
            throw new BrandInfoException(1, "操作数据已不存在");
        Integer oldOrder = resultObj.getOrder();
        BrandInfo changeObj = brandInfoMapper.getByAdjoinOrder(resultObj.getBrandClass().getId(),oldOrder, moveType);
        if (changeObj == null )
        BrandInfo changeObj = brandInfoMapper.getByAdjoinOrder(resultObj.getBrandClass().getId(), oldOrder, moveType);
        if (changeObj == null)
            throw new BrandInfoException(1, "已经在最边缘,无可交换的位置");
        BrandInfo changeObj1 = new BrandInfo();
        changeObj1.setId(id);
        changeObj1.setOrder(changeObj.getOrder());
        BrandInfo changeObj2 = new BrandInfo();
        changeObj2.setId(changeObj.getId());
        changeObj2.setOrder(oldOrder);
        brandInfoMapper.updateByPrimaryKeySelective(changeObj1);
        brandInfoMapper.updateByPrimaryKeySelective(changeObj2);
    }
    @Override
    public List<BrandInfo> listQuery(long start, int count, List<String> keys, Long cid, Integer state, Integer showState) {
        return brandInfoMapper.listQuery(start, count, keys, cid, state,showState);
    public List<BrandInfo> listQuery(long start, int count, List<String> keys, Long cid, Integer state,
            Integer showState) {
        return brandInfoMapper.listQuery(start, count, keys, cid, state, showState);
    }
    @Override
@@ -291,11 +289,11 @@
    }
    @Override
    @Cacheable(value = "brandCache", key = "'listBrandInfoCache-'+#start+'-'+#start +'-'+#cid")
    public List<BrandInfoVO> listBrandInfoCache(long start, int count, Long cid) {
    @Cacheable(value = "brandCache", key = "'listBrandInfoCache-'+#start+'-'+#start +'-'+#cid+'-'+#platform+'-'+#version")
    public List<BrandInfoVO> listBrandInfoCache(long start, int count, Long cid, String platform, String version) {
        List<BrandInfoVO> listInfo = new ArrayList<BrandInfoVO>();
        List<TaoBaoShopVO> listShop = brandClassShopService.listEffectiveShop(start, count, cid);
        List<TaoBaoShopVO> listShop = brandClassShopService.listEffectiveShop(start, count, cid, platform, version);
        if (listShop == null || listShop.size() == 0)
            return listInfo;
@@ -324,15 +322,14 @@
        return brandClassShopService.countBrandShopinfo(cid);
    }
    @Override
    public void removeAgoByDate(Date date) {
        // 删除商品
        brandGoodsCaheService.removeAgoByDate(date);
        // 删除店铺
        brandShopCaheService.removeAgoByDate(date);
        long count = brandInfoMapper.countValidByCid(null);
        if (count == 0)
            return;
@@ -344,6 +341,7 @@
    /**
     * 更新商品数量
     *
     * @param start
     * @param count
     */
@@ -351,13 +349,13 @@
        List<BrandInfo> list = brandInfoMapper.listValidAll(start, count);
        if (list == null || list.size() == 0)
            return;
        for (BrandInfo brandInfo : list) {
            long goodsTotal = brandGoodsCaheService.countByBrandId(brandInfo.getId());
            BrandInfo updateInfo = new BrandInfo();
            updateInfo.setId(brandInfo.getId());
            updateInfo.setGoodsTotal((int)goodsTotal);
            updateInfo.setGoodsTotal((int) goodsTotal);
            List<BrandShopCahe> listshop = brandShopCaheService.getByBrandId(brandInfo.getId());
            if (listshop == null) {
                updateInfo.setShopTotal(0);
@@ -368,8 +366,7 @@
            brandInfoMapper.updateByPrimaryKeySelective(updateInfo);
        }
    }
    @Override
    public void addShopAndGoods(long start, int count) {
        List<BrandInfo> list = brandInfoMapper.listValidAll(start, count);
@@ -378,7 +375,7 @@
        long startTime = java.lang.System.currentTimeMillis();
        LogHelper.test(start + "品牌更新service---addShopAndGoods" + startTime);
        for (BrandInfo brandInfo : list) {
            try {
                String name = brandInfo.getName();
@@ -387,8 +384,8 @@
                    continue;
                // 添加商品
                BrandInfo numInfo = brandGoodsCaheService.addBrandGoods(brandInfo);
                BrandInfo updateInfo = new BrandInfo();
                BrandInfo updateInfo = new BrandInfo();
                updateInfo.setId(brandInfo.getId());
                updateInfo.setWeight(Math.random() * 1000);
                updateInfo.setGoodsTotal(numInfo.getGoodsTotal());
@@ -399,9 +396,9 @@
                LogHelper.errorDetailInfo(e);
            }
        }
        long endTime = java.lang.System.currentTimeMillis();
        LogHelper.test(start + "品牌更新service---addShopAndGoods" + endTime + ",本次总耗时:" +(endTime -startTime) / 1000);
        LogHelper.test(start + "品牌更新service---addShopAndGoods" + endTime + ",本次总耗时:" + (endTime - startTime) / 1000);
    }
    @Override
@@ -424,20 +421,19 @@
    @Cacheable(value = "brandCache", key = "'listValidToApp-'+#start+'-'+#cid")
    @Override
    public List<BrandInfoVO> listValidToApp(long start, int count, Long cid) {
    public List<BrandInfoVO> listValidToApp(long start, int count, Long cid, String platform, String version) {
        List<BrandInfoVO> list = brandInfoMapper.listBrandInfoVO(start, count, cid);
        if (list == null || list.size() == 0)
            return null;
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO configParamsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO configParamsDTO = hongBaoManageService.getShowComputeRate(platform, version);
        List<BrandInfoVO> listInfo = new ArrayList<BrandInfoVO>();
        for (int i = 0; i < list.size(); i++) {
            BrandInfoVO brand = list.get(i);
            if (brand == null)
                continue;
            List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId(1, 3, brand.getId());
            if (listGoods == null || listGoods.size() < 3)
                continue;
@@ -470,24 +466,20 @@
        }
        return listInfo;
    }
    @Override
    @Cacheable(value = "brandCache", key = "'listByAlikeName-'+#key")
    public BrandInfoVO listByAlikeName(String key) {
    @Cacheable(value = "brandCache", key = "'listByAlikeName-'+#key+'-'+#platform+'-'+#version")
    public BrandInfoVO listByAlikeName(String key,String platform,String version) {
        if (StringUtil.isNullOrEmpty(key))
            return null;
        List<BrandInfoVO> list = brandInfoMapper.listByAlikeName(key);
        if (list == null || list.size() == 0)
            return null;
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO configParamsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO configParamsDTO =  hongBaoManageService.getShowComputeRate(platform, version);
        BrandInfoVO brand = list.get(0);
        List<BrandGoodsCahe> listGoods = brandGoodsCaheService.getByBrandId(1, 3, brand.getId());
        if (listGoods == null || listGoods.size() < 3)
@@ -514,9 +506,9 @@
            }
        }
        if (listGoodsVO.size() < 3)
        if (listGoodsVO.size() < 3)
            return null;
        brand.setListGoods(listGoodsVO);
        return brand;
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/goods/CommonTemplateContentServiceImpl.java
@@ -227,9 +227,8 @@
        } else {
            List<Integer> cidList = new ArrayList<>();
            cidList.add(Integer.parseInt(cid));
            result =
                    DaTaoKeApiUtil.getGoodsList("", cidList, null, new BigDecimal("10"), null, page, pageSize,
                            DaTaoKeApiUtil.SORT_DEFAULT);
            result = DaTaoKeApiUtil.getGoodsList("", cidList, null, new BigDecimal("10"), null, page, pageSize,
                    DaTaoKeApiUtil.SORT_DEFAULT);
            if (result == null || result.getGoodsList() == null || result.getGoodsList().size() == 0) {
                result = new DaTaoKeGoodsResult();
@@ -725,8 +724,9 @@
            e.printStackTrace();
        }
        Map<Long, TaoBaoGoodsBrief> goodsMap = new HashMap<>();
        for (TaoBaoGoodsBrief goods : listTaoKeGoods)
            goodsMap.put(goods.getAuctionId(), goods);
        if (listTaoKeGoods != null)
            for (TaoBaoGoodsBrief goods : listTaoKeGoods)
                goodsMap.put(goods.getAuctionId(), goods);
        for (int i = 0; i < goodsList.size(); i++) {
            if (goodsMap.get(goodsList.get(i).getAuctionId()) == null) {
                goodsList.remove(i--);
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityGoodsServiceImpl.java
@@ -339,8 +339,8 @@
     * 首页最底部@商品信息流
     */
    @Override
    @Cacheable(value = "qualityCache", key = "'getRecommendToIndexV2-'+#start")
    public JSONArray getRecommendToIndexV2(long start, int count) {
    @Cacheable(value = "qualityCache", key = "'getRecommendToIndexV2-'+#start+'-'+#platform+'-'+#version")
    public JSONArray getRecommendToIndexV2(long start, int count,String platform,String version) {
        // 返利金额2元以上;
        Integer commision = 2;
@@ -378,8 +378,7 @@
        } catch (Exception e) {
        }
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO =hongBaoManageService.getShowComputeRate(platform, version);
        for (TaoBaoGoodsBrief taoBaoGoodsBrief : goodsList) {
            GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief,paramsDTO);
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/TaoKeGoodsServiceImpl.java
@@ -28,7 +28,6 @@
import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService;
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
import com.yeshi.fanli.util.taobao.TaoBaoUtil;
@@ -276,8 +275,8 @@
    
    
    @Override
    @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoV2-'+#sf")
    public JSONObject searchWuLiaoV2(SearchFilter sf) {
    @Cacheable(value = "searchWuLiaoCache", key = "'searchWuLiaoV2-'+#sf+'-'+#platform+'-'+#version")
    public JSONObject searchWuLiaoV2(SearchFilter sf,String platform,String version) {
        // 淘宝物料接口查询
        TaoBaoSearchResult result = TaoKeApiUtil.searchWuLiao(sf);
@@ -297,9 +296,7 @@
        int fh = sf.getHongbao();
        boolean ft = sf.isTmall();
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(platform, version);
        if (fq == 0 && fh == 0 && !ft) {
            if (result != null && result.getTaoBaoGoodsBriefs() != null)
fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java
@@ -52,7 +52,7 @@
                coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
        try {
            msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
                    coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "至少成功邀请1个队员后可激活"));
                    coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "至少成功邀请1个粉丝后可激活"));
        } catch (MsgOtherDetailException e) {
            e.printStackTrace();
        }
@@ -63,7 +63,7 @@
        if (coupon == null || coupon.getUid() == null)
            return;
        MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createWelfareCouponActive(getLeftDay(coupon),
                "成功邀请队员:" + worker.getNickName(), coupon.getStartTime(), coupon.getEndTime());
                "成功邀请粉丝:" + worker.getNickName(), coupon.getStartTime(), coupon.getEndTime());
        try {
            msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
                    coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "可在首页-免单商品-选择商品-使用"));
@@ -108,7 +108,7 @@
                .createWelfareCouponWillOutOfDate(getLeftDay(coupon), coupon.getStartTime(), coupon.getEndTime());
        try {
            msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
                    coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "至少成功邀请1个队员后可激活"));
                    coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "至少成功邀请1个粉丝后可激活"));
        } catch (MsgOtherDetailException e) {
            e.printStackTrace();
        }
@@ -194,7 +194,7 @@
                .createWelfareCouponWillOutOfDate(getLeftDay(coupon), coupon.getStartTime(), coupon.getEndTime());
        try {
            msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
                    coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, "至少成功邀请1个队员后可激活"));
                    coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, "至少成功邀请1个粉丝后可激活"));
        } catch (MsgOtherDetailException e) {
            e.printStackTrace();
        }
fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderProcessServiceImpl.java
@@ -417,7 +417,7 @@
    private HongBaoOrderMapper hongBaoOrderMapper;
    @Override
    @Transactional(rollbackFor=Exception.class)
    @Transactional(rollbackFor = Exception.class)
    public void fanli(HongBaoV2 hb1) throws TaoBaoWeiQuanException {
        // 查询最新的红包数据
        hb1 = hongBaoV2Mapper.selectByPrimaryKeyForUpdate(hb1.getId());
@@ -484,18 +484,26 @@
        String key = mainUser.getId() + "-" + UUID.randomUUID().toString();
        msg.setKey(key);
        try {
            orderTransactionProducer.send(msg, new LocalTransactionExecuter() {
                @Override
                public TransactionStatus execute(Message arg0, Object arg1) {
                    try {
                        orderMoneySettleService.ziGouSettle(hongBaoOrder.getCommonOrder().getOrderNo(),
                                hongBaoOrder.getCommonOrder().getSourceType(), key);
                        return TransactionStatus.CommitTransaction;
                    } catch (Exception e) {
                        return TransactionStatus.RollbackTransaction;
            if (!Constant.IS_TEST)
                orderTransactionProducer.send(msg, new LocalTransactionExecuter() {
                    @Override
                    public TransactionStatus execute(Message arg0, Object arg1) {
                        try {
                            orderMoneySettleService.ziGouSettle(hongBaoOrder.getCommonOrder().getOrderNo(),
                                    hongBaoOrder.getCommonOrder().getSourceType(), key);
                            return TransactionStatus.CommitTransaction;
                        } catch (Exception e) {
                            return TransactionStatus.RollbackTransaction;
                        }
                    }
                }, null);
            else{
                try {
                    orderMoneySettleService.ziGouSettle(hongBaoOrder.getCommonOrder().getOrderNo(),
                            hongBaoOrder.getCommonOrder().getSourceType(), key);
                } catch (Exception e) {
                }
            }, null);
            }
        } catch (Exception e) {
            LogHelper.mqError(e.getMessage(), msg.getTopic(), msg.getTag(), new Gson().toJson(mqMsg));
        }
@@ -1289,12 +1297,13 @@
        } catch (UserAccountException e) {
        }
        if (resultCode == 1) {// 只发送新增消息
            OrderMQMsg mqMsg = new OrderMQMsg(orderId, sourceType, uid, OrderMQMsg.HANDLE_TYPE_ADD,
                    isCommonOrderValid(coList), 0, new Date());
            Message msg = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.orderStatistic, mqMsg);
            producer.send(msg);
        }
        if (!Constant.IS_TEST)
            if (resultCode == 1) {// 只发送新增消息
                OrderMQMsg mqMsg = new OrderMQMsg(orderId, sourceType, uid, OrderMQMsg.HANDLE_TYPE_ADD,
                        isCommonOrderValid(coList), 0, new Date());
                Message msg = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, OrderTopicTagEnum.orderStatistic, mqMsg);
                producer.send(msg);
            }
    }
    /**
fanli/src/main/java/com/yeshi/fanli/service/impl/order/config/HongBaoManageServiceImpl.java
@@ -12,12 +12,15 @@
import org.springframework.transaction.annotation.Transactional;
import com.yeshi.fanli.dao.mybatis.HongBaoManageMapper;
import com.yeshi.fanli.dto.ConfigParamsDTO;
import com.yeshi.fanli.dto.order.OrderHongBaoRateParams;
import com.yeshi.fanli.entity.bus.user.HongBaoManage;
import com.yeshi.fanli.entity.order.CommonOrder;
import com.yeshi.fanli.exception.order.HongBaoException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.VersionUtil;
@Service
public class HongBaoManageServiceImpl implements HongBaoManageService {
@@ -342,4 +345,17 @@
        throw new HongBaoException(2, "未匹配到比例参数");
    }
    @Override
    public ConfigParamsDTO getShowComputeRate(String platform, String version) {
        BigDecimal fanLiRate = getFanLiRate();
        BigDecimal shareRate = getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
                getVIPFanLiRate());
        if (VersionUtil.greaterThan_2_1(platform, version)) {
            paramsDTO.setMaxRewardRate(null);
        }
        return paramsDTO;
    }
}
fanli/src/main/java/com/yeshi/fanli/service/impl/order/msg/UserOrderMsgNotificationServiceImpl.java
@@ -148,7 +148,7 @@
    public void orderShareFirstLevelStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney,
            BigDecimal money, int goodsCount, int orderState, String sourceUserName) {
        MsgOrderDetail detail = MsgOrderDetailFactory.createInviteOrder(uid, orderId, orderType, goodsCount, orderState,
                payMoney, money, String.format("由一级队员【%s】分享", getShortName(sourceUserName)));
                payMoney, money, String.format("由直接粉丝【%s】分享", getShortName(sourceUserName)));
        try {
            msgOrderDetailService.addMsgOrderDetail(detail,
                    (money == null || money.compareTo(new BigDecimal(0)) <= 0) ? false : true);
fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackWinInviteServiceImpl.java
@@ -196,7 +196,7 @@
        dto.setNickName(userInfo.getNickName());
        dto.setPortrait(userInfo.getPortrait());
        userMoneyMsgNotificationService.teamRedPackRewardMsg(bossId, MsgTypeMoneyTypeEnum.redPackOneStageReward, money,
                "队员(好友)完成第一阶段", new Gson().toJson(dto));
                "粉丝(好友)完成第一阶段", new Gson().toJson(dto));
    }
    @RequestSerializableByKeyService(key = "#uid")
@@ -294,7 +294,7 @@
        dto.setNickName(userInfo.getNickName());
        dto.setPortrait(userInfo.getPortrait());
        userMoneyMsgNotificationService.teamRedPackRewardMsg(bossId, MsgTypeMoneyTypeEnum.redPackTwoStageReward, money,
                "队员(好友)完成第二阶段", new Gson().toJson(dto));
                "粉丝(好友)完成第二阶段", new Gson().toJson(dto));
    }
    /**
@@ -363,7 +363,7 @@
        dto.setNickName(userInfo.getNickName());
        dto.setPortrait(userInfo.getPortrait());
        userMoneyMsgNotificationService.teamRedPackRewardMsg(bossId, MsgTypeMoneyTypeEnum.redPackThreeStageReward,
                money, "队员(好友)完成第三阶段连续[第" + monthSpace + "个月]", new Gson().toJson(dto));
                money, "粉丝(好友)完成第三阶段连续[第" + monthSpace + "个月]", new Gson().toJson(dto));
    }
    
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TLJFreeBuyGoodsServiceImpl.java
@@ -71,7 +71,7 @@
    }
    
    //@Cacheable(value = "commonContentCache", key = "'tljFreeBuy-listByDay'+#day")
    @Cacheable(value = "commonContentCache", key = "'tljFreeBuy-listByDay'+#day")
    @Override
    public List<TLJFreeBuyGoods> listByDay(String day) {
        List<TLJFreeBuyGoods> list = listByDay(day, 10);
fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoShopServiceImpl.java
@@ -22,7 +22,6 @@
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.db.MongoDBManager;
import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory;
@@ -201,22 +200,19 @@
        }
        return list;
    }
    @Override
    @Cacheable(value = "brandCache", key = "'getShopByKeyV2-'+#key")
    public List<TaoBaoShopVO> getShopByKeyV2(String key) {
    @Cacheable(value = "brandCache", key = "'getShopByKeyV2-'+#key+'-'+#platform+'-'+#version")
    public List<TaoBaoShopVO> getShopByKeyV2(String key, String platform, String version) {
        List<TaoBaoShopVO> list = taoBaoShopMapper.getShopByKey(key);
        if (list == null || list.size() == 0) {
            return null;
        }
        BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
        BigDecimal shareRate = hongBaoManageService.getShareRate();
        ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,hongBaoManageService.getVIPFanLiRate());
        ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(platform, version);
        for (TaoBaoShopVO taoBaoShopVO : list) {
            Integer userType = taoBaoShopVO.getUserType();
            if (userType == null || userType == 0) {
                taoBaoShopVO.setUserType(10);
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java
@@ -178,7 +178,7 @@
                state = true;
                UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
                if (userInfoExtra == null || StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) {
                    tips.add("确认领取后,你将成为赠送人的一级队员;");
                    tips.add("确认领取后,你将成为赠送人的直接粉丝;");
                    tips.add("获赠的免单券,需要激活后才能使用,详情参见免单券激活规则;");
                    tips.add("成功领取后,请到“我的-福利中心”查看。");
                } else {
@@ -214,7 +214,7 @@
                state = true;
                UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
                if (userInfoExtra == null || StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) {
                    tips.add("确认领取后,你将成为赠送人的一级队员;");
                    tips.add("确认领取后,你将成为赠送人的直接粉丝;");
                    tips.add("板栗快省奖励券,可用于“已到账”的返利订单,在返利的基础上再获得一定比例的返利;");
                    tips.add("成功领取后,请到“我的-福利中心”中查看。");
                } else {
@@ -249,7 +249,7 @@
                state = true;
                UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
                if (userInfoExtra == null || StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) {
                    tips.add("确认领取后,你将成为赠送人的一级队员;");
                    tips.add("确认领取后,你将成为赠送人的直接粉丝;");
                    tips.add("红包可提现,可购买折扣商品;");
                    tips.add("成功领取后,请到“我的-红包”中查看。");
                } else {
@@ -399,7 +399,7 @@
                    boolean addTeam = addInviteTeam(uid, giveUid, userInfoExtra);
                    String beiZhu = "无";
                    if (addTeam)
                        beiZhu = "领取人已经成为你的一级队员";
                        beiZhu = "领取人已经成为你的直接粉丝";
                    String userName = "无";
                    UserInfo user = userInfoService.selectByPKey(uid);
@@ -493,7 +493,7 @@
                    boolean addTeam = addInviteTeam(uid, giveUid, userInfoExtra);
                    String beiZhu = "无";
                    if (addTeam)
                        beiZhu = "领取人已经成为你的一级队员";
                        beiZhu = "领取人已经成为你的直接粉丝";
                    String userName = "无";
                    UserInfo user = userInfoService.selectByPKey(uid);
@@ -532,8 +532,8 @@
                        String beiZhu = "无";
                        String giveBeiZhu = "无";
                        if (addTeam) {
                            beiZhu = "你已成为赠送人的一级队员";
                            giveBeiZhu = "领取人已成为你的一级队员";
                            beiZhu = "你已成为赠送人的直接粉丝";
                            giveBeiZhu = "领取人已成为你的直接粉丝";
                            // 激活邀请信息
                            addInviteMsg(uid, giveUid, giveRecord.getAmount().setScale(2) + "元红包");
                        }
fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralExchangeServiceImpl.java
@@ -159,9 +159,9 @@
        if (ExchangeTypeEnum.freeCouponBuy == type) {
            exchangeTip.setTip("自购免单券仅能自己使用,且每个用户ID只能兑换一次。\r\n注:兑换成功后请到“我的-福利中心”中查看");
        } else if (ExchangeTypeEnum.freeCouponGive == type) {
            exchangeTip.setTip("赠送免单券兑换次数不限,赠送次数不限,受赠人若无“邀请人”成功领取后将成为你的一级队员。\r\n注:兑换成功后请到“我的-福利中心”中查看");
            exchangeTip.setTip("赠送免单券兑换次数不限,赠送次数不限,受赠人若无“邀请人”成功领取后将成为你的直接粉丝。\r\n注:兑换成功后请到“我的-福利中心”中查看");
        } else if (ExchangeTypeEnum.rebatePercentCoupon == type) {
            exchangeTip.setTip("返利奖励券兑换次数不限,赠送次数不限,受赠人若无“邀请人”成功领取后将成为你的一级队员。\r\n注:兑换成功后请到“我的-福利中心”中查看");
            exchangeTip.setTip("返利奖励券兑换次数不限,赠送次数不限,受赠人若无“邀请人”成功领取后将成为你的直接粉丝。\r\n注:兑换成功后请到“我的-福利中心”中查看");
        } else if (ExchangeTypeEnum.inviteCodePublish == type) {
            if (codePublishRecordService.countValidRecord(uid) > 0)
                throw new IntegralExchangeException(1, "三天之内不可重复兑换");
fanli/src/main/java/com/yeshi/fanli/service/impl/user/integral/IntegralTaskRecordServiceImpl.java
@@ -253,7 +253,7 @@
        return totalGoldCoin + (userInfoExtra.getGoldCoin() == null ? 0 : userInfoExtra.getGoldCoin());
    }
    @Transactional(rollbackFor=Exception.class)
    @Transactional(rollbackFor = Exception.class)
    public boolean addDetail(Long uid, IntegralTaskRecord record) throws IntegralTaskRecordException {
        Long uid2 = record.getUid();
        if (uid2 == null || uid.longValue() != uid2.longValue())
@@ -351,7 +351,7 @@
        return integralTaskRecordMapper.countGetCountByTaskIdAndDay(taskId, uid, minTime, maxTime);
    }
    @Transactional(rollbackFor=Exception.class)
    @Transactional(rollbackFor = Exception.class)
    @Override
    public IntegralTaskRecord addRecord(IntegralTaskRecord record) throws IntegralTaskRecordException {
        if (record == null)
@@ -370,15 +370,6 @@
        // 设置有效期
        record.setEndTime(DateUtil.plusDayDate(Constant.GOLD_COIN_VALID_DAYS, date));
        integralTaskRecordMapper.insertSelective(record);
//        long count = integralTaskRecordMapper.getTotalGoldCoinByUid(record.getUid());
//        if (count >= 200) {// 大于200发送消息
//            IntegralTaskMQMsg msg = new IntegralTaskMQMsg(record.getUid(), count, new Date());
//            Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.integralTaskFinish,
//                    msg);
//            producer.send(message);
//        }
        return record;
    }
@@ -507,8 +498,11 @@
            msgOther.setSource("首笔分享订单,系统奖励金币 ");
            msgOther.setExplain("首笔分享订单得到的奖金不足0.01元时奖励 ");
        } else {
            msgOther.setSource(level + "级队员首次下单,系统奖励金币 ");
            msgOther.setExplain("仅新邀请队员首下单你得到的奖金不足0.01元时奖励 ");
            if (level.equalsIgnoreCase("一") || level.equalsIgnoreCase("1"))
                msgOther.setSource("直接粉丝首次下单,系统奖励金币 ");
            else
                msgOther.setSource("间接粉丝首次下单,系统奖励金币 ");
            msgOther.setExplain("仅新邀请粉丝首下单你得到的奖金不足0.01元时奖励 ");
        }
        userOtherMsgNotificationService.firstOrderRewardMsg(uid, null, msgOther);
    }
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/MsgInviteDetailServiceImpl.java
@@ -45,12 +45,12 @@
            update.setId(oldDetail.getId());
            if (!detail.getInviteUser().getState()) {
                if (detail.getInviteUser().getExpire() == ThreeSale.EXPIRE_NORMAL) {
                    update.setDesc("恭喜你,有新队员加入你的队列,若对方60天内未激活将会与你脱离邀请关系");
                    update.setDesc("恭喜你,有新粉丝加入你的队列,若对方60天内未激活将会与你脱离邀请关系");
                } else {
                    update.setDesc("抱歉,该队员因60天内未激活,已脱离了你的队列,可以试着重新邀请");
                    update.setDesc("抱歉,该粉丝因60天内未激活,已脱离了你的队列,可以试着重新邀请");
                }
            } else {
                update.setDesc("恭喜你,成功邀请一个队员");
                update.setDesc("恭喜你,成功邀请一个粉丝");
            }
            update.setUpdateTime(new Date());
            update.setRead(false);
fanli/src/main/java/com/yeshi/fanli/service/inter/brand/BrandClassShopService.java
@@ -105,7 +105,7 @@
     * @param cid
     * @return
     */
    public JSONObject listEffectiveCacheV2(int page, Long cid);
    public JSONObject listEffectiveCacheV2(int page, Long cid,String platform,String version);
    
    /**
@@ -115,7 +115,7 @@
     * @param cid
     * @return
     */
    public List<TaoBaoShopVO> listEffectiveShop(long start, int count, Long cid);
    public List<TaoBaoShopVO> listEffectiveShop(long start, int count, Long cid,String platform,String version);
    
    
fanli/src/main/java/com/yeshi/fanli/service/inter/brand/BrandInfoService.java
@@ -56,7 +56,7 @@
     * @return
     * @throws BrandInfoException
     */
    public List<BrandInfoVO> listBrandInfoCache(long start, int count, Long cid);
    public List<BrandInfoVO> listBrandInfoCache(long start, int count, Long cid,String platform,String version);
    /**
@@ -89,7 +89,7 @@
     * @param cid
     * @return
     */
    public List<BrandInfoVO> listValidToApp(long start, int count, Long cid);
    public List<BrandInfoVO> listValidToApp(long start, int count, Long cid,String platform,String version);
    
    /**
@@ -120,6 +120,6 @@
     * @param key
     * @return
     */
    public BrandInfoVO listByAlikeName(String key);
    public BrandInfoVO listByAlikeName(String key,String platform,String version);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/lable/QualityGoodsService.java
@@ -224,5 +224,5 @@
     * @param proportion
     * @return
     */
    public JSONArray getRecommendToIndexV2(long start, int count);
    public JSONArray getRecommendToIndexV2(long start, int count,String platform,String version);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/lable/TaoKeGoodsService.java
@@ -109,6 +109,7 @@
    public List<QualityFactory> queryByQuality(long start, int count, String searchKey, Long systemCid, List<Long> listLabId);
    public JSONObject searchWuLiaoV2(SearchFilter sf);
    public JSONObject searchWuLiaoV2(SearchFilter sf,String platform,String version);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/order/config/HongBaoManageService.java
@@ -6,6 +6,7 @@
import org.springframework.cache.annotation.CacheEvict;
import com.yeshi.fanli.dto.ConfigParamsDTO;
import com.yeshi.fanli.dto.order.OrderHongBaoRateParams;
import com.yeshi.fanli.entity.bus.user.HongBaoManage;
import com.yeshi.fanli.exception.order.HongBaoException;
@@ -178,4 +179,13 @@
     */
    public BigDecimal getRate(OrderHongBaoRateParams params) throws HongBaoException;
    /**
     * 获取需要显示计算的比例实体
     *
     * @param platform
     * @param version
     * @return
     */
    public ConfigParamsDTO getShowComputeRate(String platform, String version);
}
fanli/src/main/java/com/yeshi/fanli/service/inter/taobao/TaoBaoShopService.java
@@ -74,5 +74,5 @@
     * @param key
     * @return
     */
    public List<TaoBaoShopVO> getShopByKeyV2(String key);
    public List<TaoBaoShopVO> getShopByKeyV2(String key,String platform,String version);
}
fanli/src/main/java/com/yeshi/fanli/service/manger/HongBaoV2AddManager.java
@@ -213,7 +213,7 @@
        return CommonOrder.STATE_SX;
    }
    @Transactional(rollbackFor=Exception.class)
    @Transactional(rollbackFor = Exception.class)
    private boolean updateHongBao(HongBaoOrder hongBaoOrder, CommonOrder commonOrder, int type,
            Map<Integer, HongBaoOrder> notificationMap) throws HongBaoException, UserAccountException {
        System.out.println(commonOrder.getOrderNo());
@@ -337,7 +337,7 @@
                                        HongBaoV2.TYPE_YIJI, MoneyBigDecimalUtil.mul(hongBao.getMoney(),
                                                firstRate.divide(new BigDecimal(100))));
                                if (firstHongbao != null)
                                    addInviteHongBao(firstHongbao, notificationMap, commonOrder);
                                    addInviteHongBao(firstHongbao, null, notificationMap, commonOrder);
                            }
                            boss = threeSaleSerivce.getBoss(boss.getId());
                            if (boss != null) {
@@ -352,7 +352,7 @@
                                            HongBaoV2.TYPE_ERJI, MoneyBigDecimalUtil.mul(hongBao.getMoney(),
                                                    secondRate.divide(new BigDecimal(100))));
                                    if (secondHongbao != null)
                                        addInviteHongBao(secondHongbao, notificationMap, commonOrder);
                                        addInviteHongBao(secondHongbao, null, notificationMap, commonOrder);
                                }
                            }
                        }
@@ -486,7 +486,7 @@
                HongBaoV2 firstHongbao = createInviteHongBao(boss.getId(), hongBao, commonOrder, HongBaoV2.TYPE_YIJI,
                        MoneyBigDecimalUtil.mul(hongBao.getMoney(), firstRate.divide(new BigDecimal(100))));
                addInviteHongBao(firstHongbao, notificationMap, commonOrder);
                addInviteHongBao(firstHongbao, null, notificationMap, commonOrder);
                // 插入二级子红包
                boss = threeSaleSerivce.getBoss(boss.getId());
@@ -498,7 +498,7 @@
                    HongBaoV2 secondHongbao = createInviteHongBao(boss.getId(), hongBao, commonOrder,
                            HongBaoV2.TYPE_ERJI,
                            MoneyBigDecimalUtil.mul(hongBao.getMoney(), secondRate.divide(new BigDecimal(100))));
                    addInviteHongBao(secondHongbao, notificationMap, commonOrder);
                    addInviteHongBao(secondHongbao, null, notificationMap, commonOrder);
                }
            }
@@ -534,7 +534,7 @@
                            HongBaoV2.TYPE_SHARE_YIJI,
                            MoneyBigDecimalUtil.mul(hongBao.getMoney(), firstLevelRate.divide(new BigDecimal(100))));
                    addInviteHongBao(firstHongbao, notificationMap, commonOrder);
                    addInviteHongBao(firstHongbao, hongBao.getUserInfo().getNickName(), notificationMap, commonOrder);
                    // 二级分享赚
                    boss = threeSaleSerivce.getBoss(boss.getId());
@@ -546,7 +546,7 @@
                        HongBaoV2 secondChild = createInviteHongBao(boss.getId(), hongBao, commonOrder,
                                HongBaoV2.TYPE_SHARE_ERJI, MoneyBigDecimalUtil.mul(hongBao.getMoney(),
                                        secondLevelRate.divide(new BigDecimal(100))));
                        addInviteHongBao(secondChild, notificationMap, commonOrder);
                        addInviteHongBao(secondChild, null, notificationMap, commonOrder);
                    }
                }
            }
@@ -584,8 +584,8 @@
     * @param notificationMap
     * @param commonOrder
     */
    private void addInviteHongBao(HongBaoV2 child, Map<Integer, HongBaoOrder> notificationMap,
            CommonOrder commonOrder) {
    private void addInviteHongBao(HongBaoV2 child, String parentHongBaoUserName,
            Map<Integer, HongBaoOrder> notificationMap, CommonOrder commonOrder) {
        if (child != null) {
            hongBaoV2Mapper.insertSelective(child);
            // 用户通知
@@ -593,6 +593,9 @@
                HongBaoV2 tempHongBao = new HongBaoV2(child.getId());
                tempHongBao.setUserInfo(child.getUserInfo());
                tempHongBao.setMoney(child.getMoney());
                if (child.getType() == HongBaoV2.TYPE_SHARE_YIJI)
                    tempHongBao.setBeizhu(parentHongBaoUserName);
                CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
                tempCommonOrder.setPayment(commonOrder.getPayment());
                notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
fanli/src/main/java/com/yeshi/fanli/util/Constant.java
@@ -85,7 +85,7 @@
    public static final String TAOBAO_SPECIAL_PID_DEFAULT = "mm_124933865_56750082_89555600043";
    // 奖励券最高比例
    public static final BigDecimal MAX_REWARD_RATE = new BigDecimal("0.35");
    public static final BigDecimal MAX_REWARD_RATE = new BigDecimal("0.31");
    // 返回给客户端的账号封禁提示语
    public static final String FORBIDDEN_USER_REASON_DESC = "你的账号或绑定的第三方账号已被封禁,封禁原因可在帮助中心的相关规则中参看,如有疑问或申诉解除封禁请联系客服";
@@ -127,7 +127,7 @@
    public static final int AUTO_EXTRACT_MIN_SURPLUS = 2;
    
    // vip、红包、奖励券倒计时 2.1上线时间
    public static final String VIP_ONLINE_TIME = "2019-12-20";
    public static final String VIP_ONLINE_TIME = "2019-12-22";
    
    // 红包邀请奖励
    public static final String RED_PACK_ONLINE_TIME = "2019-12-14";
fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java
@@ -163,7 +163,13 @@
        BigDecimal commission = CommonGoodsUtil.getCommission(goods, params.getFanLiRate());
        moneyInfoVO.setFanliMoney("¥" + commission);
        moneyInfoVO.setMaxMoney("¥" + CommonGoodsUtil.getCommission(goods, params.getVipFanLiRate()));
        if (params.getMaxRewardRate() != null)
            moneyInfoVO
                    .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
        else
            moneyInfoVO.setMaxMoney("¥" + CommonGoodsUtil.getCommission(goods, params.getVipFanLiRate()));
        moneyInfoVO.setShareMoney(CommonGoodsUtil.getCommissionInfo(goods, params.getShareRate()));
        goodsInfo.setMoneyInfo(moneyInfoVO);
@@ -261,11 +267,19 @@
            TaoBaoHongBaoInfo taoBaoHongBaoInfo = goods.getTaoBaoHongBaoInfo();
            moneyInfoVO.setFanliMoney("¥" + taoBaoHongBaoInfo.getHongbao());
            moneyInfoVO.setShareMoney("¥" + taoBaoHongBaoInfo.getHongbao());
            moneyInfoVO.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getVipFanLiRate()));
            if (params.getMaxRewardRate() != null)
                moneyInfoVO.setMaxMoney("¥" + taoBaoHongBaoInfo.getHongbao()
                        .add(MoneyBigDecimalUtil.mul(taoBaoHongBaoInfo.getHongbao(), params.getMaxRewardRate())));
            else
                moneyInfoVO.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getVipFanLiRate()));
        } else {
            BigDecimal commission = TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getFanLiRate());
            moneyInfoVO.setFanliMoney("¥" + commission);
            moneyInfoVO.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getVipFanLiRate()));
            if (params.getMaxRewardRate() != null)
                moneyInfoVO.setMaxMoney(
                        "¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
            else
                moneyInfoVO.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getVipFanLiRate()));
            moneyInfoVO.setShareMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods, params.getShareRate()));
        }
        goodsInfo.setMoneyInfo(moneyInfoVO);
@@ -389,7 +403,11 @@
        moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6
        BigDecimal commission = TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getFanLiRate());
        moneyInfoVO.setFanliMoney("¥" + commission);
        moneyInfoVO.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getVipFanLiRate()));
        if (params.getMaxRewardRate() != null)
            moneyInfoVO
                    .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
        else
            moneyInfoVO.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getVipFanLiRate()));
        moneyInfoVO.setShareMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods, params.getShareRate()));
        goodsInfo.setMoneyInfo(moneyInfoVO);
@@ -552,7 +570,11 @@
        moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6
        BigDecimal commission = JDUtil.getGoodsFanLiMoney(goods, params.getFanLiRate());
        moneyInfoVO.setFanliMoney("¥" + commission);
        moneyInfoVO.setMaxMoney("¥" + JDUtil.getGoodsFanLiMoney(goods, params.getVipFanLiRate()));
        if (params.getMaxRewardRate() != null)
            moneyInfoVO
                    .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
        else
            moneyInfoVO.setMaxMoney("¥" + JDUtil.getGoodsFanLiMoney(goods, params.getVipFanLiRate()));
        moneyInfoVO.setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(goods, params.getShareRate()));
        goodsInfo.setMoneyInfo(moneyInfoVO);
@@ -693,7 +715,11 @@
        moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6
        BigDecimal commission = PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getFanLiRate());
        moneyInfoVO.setFanliMoney("¥" + commission);
        moneyInfoVO.setMaxMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getVipFanLiRate()));
        if (params.getMaxRewardRate() != null)
            moneyInfoVO
                    .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
        else
            moneyInfoVO.setMaxMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getVipFanLiRate()));
        moneyInfoVO.setShareMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getShareRate()));
        goodsInfo.setMoneyInfo(moneyInfoVO);
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgInviteDetailFactory.java
@@ -29,7 +29,7 @@
        else
            detail.setBeiZhu(beiZhu);
        detail.setCreateTime(new Date());
        detail.setDesc("恭喜你,成功邀请一个队员");
        detail.setDesc("恭喜你,成功邀请一个粉丝");
        detail.setInviteUser(threeSale);
        detail.setMsgType(MsgTypeInviteTypeEnum.invite);
        detail.setRead(false);
@@ -52,7 +52,7 @@
        detail.setUser(new UserInfo(uid));
        detail.setInviteUser(threeSale);
        detail.setMsgType(MsgTypeInviteTypeEnum.inviteSucceed);
        detail.setDesc("队员(好友)熟练使用App可获得红包");
        detail.setDesc("粉丝(好友)熟练使用App可获得红包");
        detail.setBeiZhu("满足获得红包条件后系统将自动下发到“我的-红包”中");
        detail.setCreateTime(new Date());
        detail.setUpdateTime(new Date());
@@ -76,7 +76,7 @@
        else
            detail.setBeiZhu(beiZhu);
        detail.setCreateTime(new Date());
        detail.setDesc("恭喜你,有新队员加入你的队列,若对方60天内未激活将会与你脱离邀请关系");
        detail.setDesc("恭喜你,有新粉丝加入你的队列,若对方60天内未激活将会与你脱离邀请关系");
        detail.setInviteUser(threeSale);
        detail.setMsgType(MsgTypeInviteTypeEnum.invite);
        detail.setRead(false);
@@ -104,7 +104,7 @@
        else
            detail.setBeiZhu(beiZhu);
        detail.setCreateTime(new Date());
        detail.setDesc("抱歉,该队员因60天内未激活,已脱离了你的队列,可以试着重新邀请");
        detail.setDesc("抱歉,该粉丝因60天内未激活,已脱离了你的队列,可以试着重新邀请");
        detail.setInviteUser(threeSale);
        detail.setMsgType(MsgTypeInviteTypeEnum.invite);
        detail.setRead(false);
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -1093,7 +1093,7 @@
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("被邀请人", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO("邀请队员成功", COLOR_CONTENT));
            contentList.add(new ClientTextStyleVO("邀请粉丝成功", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("邀请状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
fanli/src/main/java/com/yeshi/fanli/util/goods/jd/NYouHuiUtil.java
New file
@@ -0,0 +1,38 @@
package com.yeshi.fanli.util.goods.jd;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
/**
 * 京东内优惠商品爬取 https://www.n-youhui.com
 *
 * @author Administrator
 *
 */
public class NYouHuiUtil {
    public static List<String> getClasses() {
        List<String> classList = new ArrayList<>();
        try {
            Document doc = Jsoup.connect("https://www.n-youhui.com").timeout(20000)
                    .userAgent(
                            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36")
                    .get();
            Element classesRoot = doc.getElementsByClass("widget_categories").get(0);
            Elements level0 = classesRoot.getElementsByClass("level-0");
            for (int i = 0; i < level0.size(); i++) {
                String name = level0.get(i).html().replace("&nbsp;", "").replaceAll("\\(([0-9]|,)*\\)", "").trim();
                classList.add(name);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        return classList;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java
@@ -6,11 +6,13 @@
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -27,6 +29,7 @@
import org.jsoup.select.Elements;
import org.yeshi.utils.BigDecimalUtil;
import org.yeshi.utils.HttpUtil;
import org.yeshi.utils.NumberUtil;
import com.yeshi.fanli.dto.GoodsClassDTO;
import com.yeshi.fanli.dto.jd.JDCommissionInfo;
@@ -36,6 +39,7 @@
import com.yeshi.fanli.dto.jd.JDSearchResult;
import com.yeshi.fanli.dto.jd.JDShopInfo;
import com.yeshi.fanli.entity.jd.JDGoods;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
import com.yeshi.fanli.util.StringUtil;
@@ -625,27 +629,27 @@
        return null;
    }
    /**
     * 通过链接id
     *
     * @param url
     * @return
     */
    public static String getJDGoodsIdByWeiXin(String url) {
        if (StringUtil.isNullOrEmpty(url))
        if (StringUtil.isNullOrEmpty(url))
            return null;
        try {
            String id = null;
            int indexOf = url.indexOf("?");
            url = url.substring(indexOf + 1, url.length()-1);
            url = url.substring(indexOf + 1, url.length() - 1);
            String[] temp = url.split("&");
            for (int i =0; i < temp.length; i ++) {
                 String content = temp[i];
            for (int i = 0; i < temp.length; i++) {
                String content = temp[i];
                if (content.startsWith("sku")) {
                    id = content.split("=")[content.split("=").length-1];
                    id = content.split("=")[content.split("=").length - 1];
                    break;
                }
                }
            }
            return id;
        } catch (Exception e) {
@@ -653,16 +657,16 @@
        }
        return null;
    }
    /**
     * 根据 u.jd短连接获取真实的商品id
     *
     * @param url
     * @return
     */
    public static String getJDGoodsIdByUJD(String url) {
        try {
            String body =  HttpUtil.get(url);
            String body = HttpUtil.get(url);
            Document doc = Jsoup.parse(body);
            Elements els = doc.getElementsByTag("script");
            for (int i = 0; i < els.size(); i++) {
@@ -670,35 +674,76 @@
                if (content.indexOf("var hrl") > -1) {
                    ScriptEngineManager manager = new ScriptEngineManager();
                    ScriptEngine engine = manager.getEngineByName("javascript");
                    int indexOf = content.indexOf("var hrl");
                    content = content.substring(indexOf, content.length());
                    int indexOf2 = content.indexOf(";");
                    content = content.substring(0, indexOf2+1);
                    content = content.substring(0, indexOf2 + 1);
                    String js = "function getData(){return  JSON.stringify(hrl);}" + content;
                    engine.eval(js);
                    if (engine instanceof Invocable) {
                        Invocable in = (Invocable) engine;
                        String data = in.invokeFunction("getData").toString();
                        String link = data.substring(1, data.length()-1);
                        String link = data.substring(1, data.length() - 1);
                        // 将链接中未encode的参数encode
                        String param = link.split("\\?")[1];
                        String host = link.split("\\?")[0];
                        String[] params = param.split("&");
                        String paramStr = "";
                        for (String p : params) {
                            String value = p.substring(p.indexOf("=") + 1);
                            String key = p.substring(0, p.indexOf("="));
                            if (URLDecoder.decode(value, "UTF-8").equalsIgnoreCase(value)) {
                                value = URLEncoder.encode(value, "UTF-8");
                            }
                            paramStr += key + "=" + value + "&";
                        }
                        link = host + "?" + paramStr;
                        String realLink = HttpUtil.getLocation(link);
                        realLink = realLink.substring(realLink.indexOf("sku=") + 4, realLink.length());
                        return realLink.substring(0, realLink.indexOf("&"));
                        Map<String, String> paramsMap = new HashMap<>();
                        param = realLink.split("\\?")[1];
                        params = param.split("&");
                        for (String p : params) {
                            String value = p.substring(p.indexOf("=") + 1);
                            String key = p.substring(0, p.indexOf("="));
                            paramsMap.put(key, value);
                        }
                        if (!StringUtil.isNullOrEmpty(paramsMap.get("sku"))) {
                            return paramsMap.get("sku");
                        }
                        if (!StringUtil.isNullOrEmpty(paramsMap.get("wareId"))) {
                            return paramsMap.get("wareId");
                        }
                        // 判断纯数字大于4位的返回
                        for (Iterator<String> its = paramsMap.keySet().iterator(); its.hasNext();) {
                            String key = its.next();
                            String value = paramsMap.get(key);
                            if (NumberUtil.isNumeric(value) && value.length() >= 4) {
                                return value;
                            }
                        }
                        String id = JDUtil.getJDGoodsId(realLink);
                        if (!StringUtil.isNullOrEmpty(id)) {
                            return id;
                        }
                        LogHelper.error("京东短接解析失败:" + url);
                        return null;
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
            LogHelper.errorDetailInfo(e, "京东短链获取商品ID失败:", url);
        }
        return null;
    }
    /**
     * 查询天猫商品图片、标题
     * 
@@ -888,9 +933,5 @@
        }
        return getShowCouponInfo(goods.getCouponInfoList(), price);
    }
}
fanli/src/main/java/com/yeshi/fanli/util/rocketmq/consumer/redpack/RedPackMessageListener.java
@@ -83,7 +83,8 @@
                    try {// 邀请奖励
                        redPackWinInviteService.inviteSucceedReward(orderMQMsg.getUid());
                    } catch (Exception e) {
                        e.printStackTrace();
                        LogHelper.errorDetailInfo(e);
                        return Action.ReconsumeLater;
                    }
                }
                return Action.CommitMessage;
@@ -121,9 +122,10 @@
                        UserInviteMQMsg.class);
                inviteSucceedReward = true;
                uid = userInviteMQMsg.getWorkerId();
                redPackWinInviteService.initCreateRedPackWin(userInviteMQMsg.getBossId(),userInviteMQMsg.getWorkerId());
                redPackWinInviteService.initCreateRedPackWin(userInviteMQMsg.getBossId(),
                        userInviteMQMsg.getWorkerId());
            } else if (tag.equalsIgnoreCase(UserTopicTagEnum.redPackGiftDrawback.name())) {// 红包赠送
                UserRedPackGiftMQMsg userRedPackGiftMQMsg = new Gson().fromJson(new String(message.getBody()),
                        UserRedPackGiftMQMsg.class);
fanli/src/main/java/com/yeshi/fanli/util/taobao/DaTaoKeUtil.java
@@ -381,6 +381,8 @@
        } catch (IOException e1) {
            e1.printStackTrace();
        }
        if (doc == null)
            return new ArrayList<>();
        Elements els = doc.getElementsByTag("script");
        for (int i = 0; i < els.size(); i++) {
            String content = els.get(i).html();
@@ -388,7 +390,8 @@
                ScriptEngineManager manager = new ScriptEngineManager();
                ScriptEngine engine = manager.getEngineByName("javascript");
                try {
                    String js = "function getData(){return  JSON.stringify(dataDef);} var test1='--';function test2(res){};" + content.replace("$(window).load", "test2").replace("window.location.search.", "test1.");
                    String js = "function getData(){return  JSON.stringify(dataDef);} var test1='--';function test2(res){};"
                            + content.replace("$(window).load", "test2").replace("window.location.search.", "test1.");
                    engine.eval(js);
                    if (engine instanceof Invocable) {
                        Invocable in = (Invocable) engine;
@@ -611,33 +614,33 @@
        List<DingDongTime> list = new ArrayList<>();
        //获取当前时间之前的5个数据
        // 获取当前时间之前的5个数据
        for (int i = 5; i >= 0; i--) {
            int p = pos - i < 0 ? (times.length + pos - i) : pos - i;
            DingDongTime itemData = new DingDongTime(times[p].getKey(), times[p].getValue(),-1);
            DingDongTime itemData = new DingDongTime(times[p].getKey(), times[p].getValue(), -1);
            if (pos - i < 0)
                itemData.setTime(
                        preDay + "" + (itemData.getKey().length() < 2 ? ("0" + itemData.getKey()) : itemData.getKey()));
            else
                itemData.setTime(
                        nowDay + "" + (itemData.getKey().length() < 2 ? ("0" + itemData.getKey()) : itemData.getKey()));
            if(pos==p)
            if (pos == p)
                itemData.setState(0);
            list.add(itemData);
        }
        //向后添加剩下的
        // 向后添加剩下的
        if (pos + 1 < times.length)
            for (int i = pos + 1; i < times.length; i++) {
                DingDongTime itemData = new DingDongTime(times[i].getKey(), times[i].getValue(),1);
                DingDongTime itemData = new DingDongTime(times[i].getKey(), times[i].getValue(), 1);
                itemData.setTime(
                        nowDay + "" + (itemData.getKey().length() < 2 ? ("0" + itemData.getKey()) : itemData.getKey()));
                list.add(itemData);
            }
        if (times.length - (pos + 1) < 2) {
            DingDongTime itemData = new DingDongTime(times[0].getKey(), times[0].getValue(),1);
            DingDongTime itemData = new DingDongTime(times[0].getKey(), times[0].getValue(), 1);
            itemData.setTime(
                    nextDay + "" + (itemData.getKey().length() < 2 ? ("0" + itemData.getKey()) : itemData.getKey()));
            list.add(itemData);
fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
@@ -2145,7 +2145,7 @@
        Matcher m = r.matcher(str);
        while (m.find()) {
            String group = m.group(0);
            if (!StringUtil.isNullOrEmpty(group))
            if (!StringUtil.isNullOrEmpty(group) && group.length() >= 10)
                return group;
        }
        return null;
fanli/src/main/resource/env-dev/xxl-job.xml
New file
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context.xsd">
    <!-- 不执行任务 -->
</beans>
fanli/src/main/resource/env-pro-by/xxl-job.xml
New file
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context.xsd">
    <!-- 不执行任务 -->
</beans>
fanli/src/main/resource/env-pro-job/xxl-job.xml
New file
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context.xsd">
    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="fileEncoding" value="utf-8" />
        <property name="locations">
            <list>
                <value>classpath*:xxl-job-executor.properties</value>
            </list>
        </property>
    </bean>
    <!-- ********************************* 基础配置 ********************************* -->
    <!-- 配置01、JobHandler 扫描路径 -->
    <context:component-scan base-package="com.yeshi.fanli.job" />
    <!-- 配置02、执行器 -->
    <bean id="xxlJobSpringExecutor" class="com.xxl.job.core.executor.impl.XxlJobSpringExecutor" >
        <!-- 执行器注册中心地址[选填],为空则关闭自动注册 -->
        <property name="adminAddresses" value="${xxl.job.admin.addresses}" />
        <!-- 执行器AppName[选填],为空则关闭自动注册 -->
        <property name="appName" value="${xxl.job.executor.appname}" />
        <!-- 执行器IP[选填],为空则自动获取 -->
        <property name="ip" value="${xxl.job.executor.ip}" />
        <!-- 执行器端口号[选填],小于等于0则自动获取 -->
        <property name="port" value="${xxl.job.executor.port}" />
        <!-- 访问令牌[选填],非空则进行匹配校验 -->
        <property name="accessToken" value="${xxl.job.accessToken}" />
        <!-- 执行器日志路径[选填],为空则使用默认路径 -->
        <property name="logPath" value="${xxl.job.executor.logpath}" />
        <!-- 日志保存天数[选填],值大于3时生效 -->
        <property name="logRetentionDays" value="${xxl.job.executor.logretentiondays}" />
    </bean>
</beans>
fanli/src/main/resource/env-pro/xxl-job.xml
New file
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context.xsd">
    <!-- 不执行任务 -->
</beans>
fanli/src/main/resource/log4j.properties
@@ -234,6 +234,14 @@
log4j.appender.vipInfoLog.layout=org.apache.log4j.PatternLayout
log4j.appender.vipInfoLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%c]-[%p] %m%n  
log4j.logger.userProtocolListenLog=info,userProtocolListenLog
log4j.appender.userProtocolListenLog=org.apache.log4j.DailyRollingFileAppender
log4j.appender.userProtocolListenLog.File=logs/user/userProtocolListenLog.log
log4j.appender.userProtocolListenLog.MaxFileSize=20MB
log4j.appender.userProtocolListenLog.MaxBackupIndex=100
log4j.appender.userProtocolListenLog.layout=org.apache.log4j.PatternLayout
log4j.appender.userProtocolListenLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} [%c]-[%p] %m%n
log4j.appender.mongodb=org.apache.log4j.ConsoleAppender
log4j.appender.mongodb.Target=System.out
log4j.appender.mongodb.Threshold=DEBUG
fanli/src/main/resource/spring.xml
@@ -46,11 +46,15 @@
                <value>classpath:druid.properties</value>
                <value>classpath:mongo.properties</value>
                <value>classpath:rocketmq.properties</value>
                <value>classpath:xxl-job-executor.properties</value>
            </array>
        </property>
    </bean>
    <import resource="classpath:rocketmq.xml" />
    <import resource="classpath:xxl-job.xml" />
    <!--异步定义推荐方式 <task:executor id="executor" pool-size="15" /> <task:scheduler 
        id="scheduler" pool-size="30" /> <task:annotation-driven executor="executor" 
fanli/src/main/resource/xxl-job-executor.properties
New file
@@ -0,0 +1,14 @@
### 调度中心部署跟地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册;
xxl.job.admin.addresses=http://111.231.250.166:8080/xxl-job-admin
### 执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册
xxl.job.executor.appname=pro-job
### 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
xxl.job.executor.ip=
### 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
xxl.job.executor.port=9999
### 执行器通讯TOKEN [选填]:非空时启用;
xxl.job.accessToken=BLKS-XXL-666666@
### 执行器运行日志文件存储磁盘路径 [选填] :需要对该路径拥有读写权限;为空则使用默认路径;
xxl.job.executor.logpath=
### 执行器日志文件保存天数 [选填] : 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能;
xxl.job.executor.logretentiondays=30
pom.xml
@@ -546,7 +546,7 @@
        <dependency>
            <groupId>com.xuxueli</groupId>
            <artifactId>xxl-job-core</artifactId>
            <version>2.1.0</version>
            <version>2.1.2</version>
        </dependency>
        <dependency>