yujian
2019-08-27 d8359ddb48dab5cc797a9d552e11fde571f4920c
Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
14个文件已修改
1个文件已添加
434 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/IntegralControllerV2.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java 105 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java 210 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/integral/IntegralGetService.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/integral/IntegralTaskRecordService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/DouYinUtil.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/jd/JDApiUtil.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoUtil.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -943,9 +943,7 @@
            try {
                goodsList = TaoKeApiUtil.getBatchGoodsInfo(ids);
            } catch (TaoKeApiException e1) {
                e1.printStackTrace();
            } catch (TaobaoGoodsDownException e1) {
                e1.printStackTrace();
            }
            if (goodsList != null && goodsList.size() > 0) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/IntegralControllerV2.java
@@ -108,8 +108,7 @@
    @Resource
    private JumpDetailV2Service jumpDetailV2Service;
    /**
     * 获取任务列表
     * 
@@ -118,7 +117,7 @@
     * @param page
     * @param out
     */
//    @RequestSerializableByKey(key="#acceptData.device")
    // @RequestSerializableByKey(key="#acceptData.device")
    @RequestMapping(value = "getTaskList", method = RequestMethod.POST)
    public void getTaskList(AcceptData acceptData, Long uid, Integer page, PrintWriter out) {
        if (uid == null || uid <= 0) {
@@ -186,17 +185,17 @@
            }
            for (IntegralTaskClassVO taskClassVO : list) {
                UniqueKeyEnum uniqueKey = taskClassVO.getUniqueKey();
                UniqueKeyEnum uniqueKey = taskClassVO.getUniqueKey();
                UserInfoExtraVO extraVO = userInfoExtraService.getInfoExtraVOByUid(uid);
                if (extraVO == null || StringUtil.isNullOrEmpty(extraVO.getInviteCode())) {
                    JumpDetailV2 jumpDetailV2 = jumpDetailV2Service.getByTypeCache("invite_activate",
                            Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()));
                            Constant.getPlatformCode(acceptData.getPlatform()),
                            Integer.parseInt(acceptData.getVersion()));
                    taskClassVO.setJumpDetail(jumpDetailV2);
                }
                String progress = taskClassVO.getProgress();
                if (StringUtil.isNullOrEmpty(progress))
                    continue;
@@ -420,7 +419,6 @@
            out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
        }
    }
    /**
     * 兑换金币
@@ -436,7 +434,7 @@
            IntegralExchange exchange = integralExchangeService.exchange(uid, id);
            UserInfoExtra extraVO = userInfoExtraService.getUserInfoExtra(uid);
            GsonBuilder gsonBuilder = new GsonBuilder().excludeFieldsWithoutExposeAnnotation();
            Gson gson = gsonBuilder.create();
@@ -507,7 +505,7 @@
            out.print(JsonUtil.loadFalseResult(1, "页码不正确"));
            return;
        }
        try {
            List<CodePublishRecord> list = codePublishRecordService.listValid((page - 1) * Constant.PAGE_SIZE,
                    Constant.PAGE_SIZE);
@@ -549,7 +547,7 @@
        }
        IntegralTaskRecord record = null;
        try {
            record = integralGetService.addEventStatistic(uid, event, null);
            record = integralGetService.addEventStatistic(uid, event);
        } catch (IntegralGetException e) {
        }
        if (record == null) {
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -35,7 +35,6 @@
import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
import com.yeshi.fanli.entity.taobao.TaoBaoSearchResult;
import com.yeshi.fanli.entity.taobao.dataoke.DaTaoKeDetail;
import com.yeshi.fanli.exception.integral.IntegralGetException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.exception.user.TokenRecordException;
import com.yeshi.fanli.log.LogHelper;
@@ -446,12 +445,8 @@
                    ThreadUtil.run(new Runnable() {
                        @Override
                        public void run() {
                            try {
                                // 增加金币
                                integralGetService.addSearchResultScan(uid, key);
                            } catch (IntegralGetException e) {
                                e.printStackTrace();
                            }
                            // 增加金币
                            integralGetService.addSearchResultScan(uid, key);
                        }
                    });
                }
fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java
@@ -8,6 +8,7 @@
import javax.annotation.Resource;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -58,30 +59,29 @@
    @Resource
    private MsgInviteDetailService msgInviteDetailService;
    @Resource
    private UserTaoLiJinOriginService userTaoLiJinOriginService;
    @Resource
    private UserActiveLogService userActiveLogService;
    @Resource
    private UserInfoExtraService userInfoExtraService;
    @Resource
    private ThreeSaleExtraInfoSerivce threeSaleExtraInfoSerivce;
    
    @Lazy
    @Resource
    private IntegralGetService  integralGetService;
    private IntegralGetService integralGetService;
    @Resource(name = "taskExecutor")
    private TaskExecutor executor;
    public UserInfo getBoss(final long uid) {
        //TODO 有bug
        return threeSaleMapper.selectBoss(uid);
    }
@@ -328,12 +328,10 @@
        return threeSaleMapper.countSuperiorQuery(state, uid);
    }
    @Override
    public long countFirstTeam(Long uid, Integer state) {
        return threeSaleMapper.countFirstTeam(uid, state);
    }
    @Override
    public long countSecondTeam(Long uid, Integer state) {
@@ -354,7 +352,7 @@
    public List<ThreeSale> listbyIdAndBossId(Long id, Long uid, Integer expire) {
        return threeSaleMapper.listbyIdAndBossId(id, uid, expire);
    }
    @Override
    public JSONObject getMyFirstTeam(long start, int count, Long uid, Integer state) {
@@ -494,8 +492,7 @@
        return result;
    }
    @Override
    public List<ThreeSale> listByWorkerId(Long workerId) {
        return threeSaleMapper.listByWorkerId(workerId);
@@ -510,9 +507,9 @@
    @Transactional
    public void bindRelationshipByInviteCode(UserInfo invitee, UserInfo inviter) throws ThreeSaleException {
        if (invitee == null || inviter == null)
        if (invitee == null || inviter == null)
            throw new ThreeSaleException(1, "用户信息为空");
        // 获取有效的邀请关系
        ThreeSale threeSale = threeSaleMapper.getRelationshipByBossIdAndWorkerId(inviter.getId(), invitee.getId());
@@ -553,17 +550,17 @@
        // 邀请消息
        userInviteMsgNotificationService.inviteSuccess(inviter.getId(), threeSale);
        executor.execute(new Runnable() {
            @Override
            public void run() {
                UserActiveLog activeLog  = userActiveLogService.getUserLatestActiveInfo(inviter.getId());
                UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(inviter.getId());
                try {
                    if (activeLog != null  && !StringUtil.isNullOrEmpty(activeLog.getVersionCode()) ) {
                    if (activeLog != null && !StringUtil.isNullOrEmpty(activeLog.getVersionCode())) {
                        String versionCode = activeLog.getVersionCode();
                        String channel = activeLog.getChannel();
                        boolean result = false;
                        // 渠道是appstore 判断为IOS
                        if (!StringUtil.isNullOrEmpty(channel) && "appstore".equalsIgnoreCase(channel)) {
@@ -571,14 +568,14 @@
                        } else {
                            result = VersionUtil.greaterThan_1_5_60("android", versionCode);
                        }
                        if (result) {
                            // 被邀请名称
                            String inviteName= invitee.getNickName();
                            String inviteName = invitee.getNickName();
                            if (StringUtil.isNullOrEmpty(inviteName)) {
                                UserInfo userInfo = userInfoService.selectByPKey(invitee.getId());
                                if (userInfo != null) {
                                    inviteName= userInfo.getNickName();
                                    inviteName = userInfo.getNickName();
                                }
                            }
                            // 奖励邀请红包(淘礼金)
@@ -588,26 +585,26 @@
                } catch (Exception e) {
                    LogHelper.errorDetailInfo(e);
                }
                // 邀请金币
                integralGetService.addInviteLevelOne(inviter.getId(), invitee.getId());
            }
        });
    }
    @Override
    @Transactional
    public void bindRelationshipByWX(UserInfo invitee, Long inviterId, ThreeSale threeSaleOld) throws ThreeSaleException {
    public void bindRelationshipByWX(UserInfo invitee, Long inviterId, ThreeSale threeSaleOld)
            throws ThreeSaleException {
        if (invitee == null || (inviterId == null && threeSaleOld == null))
            throw new ThreeSaleException(1, "用户信息为空");
        ThreeSale threeSale = null;
        if (inviterId != null ) {
        if (inviterId != null) {
            // 新建立确定关系
            threeSale  = new ThreeSale();
            threeSale = new ThreeSale();
            threeSale.setBoss(new UserInfo(inviterId));
            threeSale.setWorker(invitee);
            threeSale.setState(true);
@@ -616,10 +613,10 @@
            threeSale.setCreateTime(java.lang.System.currentTimeMillis());
            threeSale.setUpdateTime(java.lang.System.currentTimeMillis());
            threeSaleMapper.insertSelective(threeSale);
            // 邀请关系失效  1.5.3 之前失效
            // 邀请关系失效 1.5.3 之前失效
            if (threeSaleOld != null) {
                ThreeSale three  = new ThreeSale();
                ThreeSale three = new ThreeSale();
                three.setId(threeSaleOld.getId());
                three.setExpire(ThreeSale.EXPIRE_OUTOFDATE);
                three.setUpdateTime(java.lang.System.currentTimeMillis());
@@ -632,49 +629,48 @@
            threeSaleOld.setSucceedTime(java.lang.System.currentTimeMillis());
            threeSaleOld.setUpdateTime(java.lang.System.currentTimeMillis());
            threeSaleMapper.updateByPrimaryKeySelective(threeSaleOld);
            threeSale = threeSaleOld;
        }
        if (threeSale == null) {
            throw new ThreeSaleException(1, "关系绑定失败");
        }
        UserInfo boss = userInfoService.selectByPKey(threeSale.getBoss().getId());
        threeSale.setBoss(boss);
        threeSale.setWorker(invitee);
        // 添加到队列
        ThreeSaleCMQManager.getInstance().addThreeSaleMsg(threeSale);
        // 邀请消息
        userInviteMsgNotificationService.inviteSuccess(threeSale.getBoss().getId(), threeSale);
        executor.execute(new Runnable() {
            @Override
            public void run() {
                try {
                    UserActiveLog activeLog  = userActiveLogService.getUserLatestActiveInfo(inviterId);
                    if (activeLog != null  && !StringUtil.isNullOrEmpty(activeLog.getVersionCode()) ) {
                    UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(inviterId);
                    if (activeLog != null && !StringUtil.isNullOrEmpty(activeLog.getVersionCode())) {
                        boolean result = false;
                        String versionCode = activeLog.getVersionCode();
                        String channel = activeLog.getChannel();
                        // 渠道是appstore 判断为IOS
                        if (!StringUtil.isNullOrEmpty(channel) && "appstore".equalsIgnoreCase(channel)) {
                            result = VersionUtil.greaterThan_1_5_60("ios", versionCode);
                        } else {
                            result = VersionUtil.greaterThan_1_5_60("android", versionCode);
                        }
                        if (result) {
                            // 被邀请名称
                            String inviteName= invitee.getNickName();
                            String inviteName = invitee.getNickName();
                            if (StringUtil.isNullOrEmpty(inviteName)) {
                                UserInfo userInfo = userInfoService.selectByPKey(invitee.getId());
                                if (userInfo != null) {
                                    inviteName= userInfo.getNickName();
                                    inviteName = userInfo.getNickName();
                                }
                            }
                            // 奖励邀请红包(淘礼金)
@@ -687,7 +683,7 @@
            }
        });
    }
    /**
     * 根据邀请者查询关系
     * 
@@ -698,8 +694,7 @@
    public ThreeSale getByWorkerId(Long workerId) {
        return threeSaleMapper.getByWorkerId(workerId);
    }
    @Override
    public long countSuccessFirstTeam(Long uid) {
        return threeSaleMapper.countFirstTeam(uid, 1);
@@ -709,19 +704,17 @@
    public ThreeSale selectByWorkerId(Long workerId) {
        return threeSaleMapper.selectSuccessByWorkerId(workerId);
    }
    @Override
    public List<ThreeSale> getSuccessByDate(Long bossId, Long minTime, Long maxTime){
    public List<ThreeSale> getSuccessByDate(Long bossId, Long minTime, Long maxTime) {
        return threeSaleMapper.getSuccessByDate(bossId, minTime, maxTime);
    }
    @Override
    public List<ThreeSale> listFirstTeam(long start, int count, Long uid, Integer state) {
        return threeSaleMapper.listFirstTeam(start, count, uid, state);
    }
    @Override
    public List<ThreeSale> listSecondTeam(long start, int count, Long uid, Integer state) {
        return threeSaleMapper.listSecondTeam(start, count, uid, state);
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java
@@ -5,9 +5,11 @@
import javax.annotation.Resource;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import com.yeshi.fanli.dao.mybatis.ThreeSaleMapper;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.integral.IntegralTask;
import com.yeshi.fanli.entity.integral.IntegralTask.FrequencyEnum;
@@ -16,15 +18,13 @@
import com.yeshi.fanli.exception.integral.IntegralGetException;
import com.yeshi.fanli.exception.integral.IntegralTaskRecordException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
import com.yeshi.fanli.service.inter.integral.IntegralGetService;
import com.yeshi.fanli.service.inter.integral.IntegralTaskRecordService;
import com.yeshi.fanli.service.inter.integral.IntegralTaskService;
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.annotation.integral.IntegralGetVersionLimit;
import net.sf.json.JSONObject;
@Lazy
@Service
public class IntegralGetServiceImpl implements IntegralGetService {
@@ -35,20 +35,26 @@
    private IntegralTaskRecordService integralTaskRecordService;
    @Resource
    private ThreeSaleSerivce threeSaleSerivce;
    private ThreeSaleMapper threeSaleMapper;
    @Resource
    private RedisManager redisManager;
    // TODO 有bug
    private UserInfo getBossByUid(Long uid) {
        return threeSaleMapper.selectBoss(uid);
    }
    @IntegralGetVersionLimit(uid="#uid")
    @Override
    public IntegralTaskRecord addEventStatistic(Long uid, String event, JSONObject params) throws IntegralGetException {
    public IntegralTaskRecord addEventStatistic(Long uid, String event) throws IntegralGetException {
        Date nowDate = new Date();
        IntegralTask task = integralTaskService.getByCidAndUniqueKey(null, event);
        if (task == null)
            throw new IntegralGetException(1, "事件类型不存在");
        if (TaskUniqueKeyEnum.inShop == TaskUniqueKeyEnum.valueOf(event)) {
            UserInfo boss = threeSaleSerivce.getBoss(uid);
            UserInfo boss = getBossByUid(uid);
            if (boss != null)
                addInShopLevelOne(boss.getId()); // 下级浏览店铺
        }
@@ -80,58 +86,62 @@
        } catch (IntegralTaskRecordException e) {
            throw new IntegralGetException(3, "添加记录失败");
        }
        // switch (event) {
        // case "recommendSearch":
        // break;
        // case "shareInvite":
        // break;
        // case "inShop":
        // break;
        // case "scanPush":
        // break;
        // case "scanGoods":
        // break;
        // case "scanHomeBanner":
        // break;
        // case "scanSpecial":
        // break;
        // case "scanTBCart":
        // break;
        // }
    }
    @Cacheable(value = "integralGetCache", key = "'addRecommendSearch-'+#uid")
    @Override
    public void addRecommendSearch(Long uid) throws IntegralGetException {
    public IntegralTaskRecord addRecommendSearch(Long uid) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.recommendSearch.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addSearchResultScan-'+#uid+'-'+#kw")
    @Override
    public void addSearchResultScan(Long uid, String kw) throws IntegralGetException {
        System.out.println("搜索");
    public IntegralTaskRecord addSearchResultScan(Long uid, String kw) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.scanSearchResult.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addShareInvite-'+#uid")
    @Override
    public void addShareInvite(Long uid) throws IntegralGetException {
    public IntegralTaskRecord addShareInvite(Long uid) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.shareInvite.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addIntoShop-'+#uid+'-'+#shopUrlMD5")
    @Override
    public void addIntoShop(Long uid) throws IntegralGetException {
        // TODO Auto-generated method stub
    public IntegralTaskRecord addIntoShop(Long uid, String shopUrlMD5) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.inShop.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @IntegralGetVersionLimit(uid = "#uid")
    @Async()
    private void addInShopLevelOne(Long uid) {
        try {
            UserInfo boss = threeSaleSerivce.getBoss(uid);
            UserInfo boss = getBossByUid(uid);
            if (boss != null)
                addInShopLevelTwo(boss.getId()); // 二级队员
            addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelOne.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelOne.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -141,40 +151,66 @@
    @Async()
    private void addInShopLevelTwo(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelTwo.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelTwo.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
    }
    @Cacheable(value = "integralGetCache", key = "'addScanPushHistory-'+#uid")
    @Override
    public void addScanPushHistory(Long uid) throws IntegralGetException {
        // TODO Auto-generated method stub
    public IntegralTaskRecord addScanPushHistory(Long uid) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.scanPush.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addScanGoodsDetail-'+#uid+'-'+#goodsType+'-'+#goodsId")
    @Override
    public void addScanGoodsDetail(Long uid, int goodsType, Long goodsId) {
        // TODO Auto-generated method stub
    public IntegralTaskRecord addScanGoodsDetail(Long uid, int goodsType, Long goodsId) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.scanGoods.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addScanRecommendBanner-'+#uid+'-'+#id")
    @Override
    public void addScanRecommendBanner(Long uid) {
        // TODO Auto-generated method stub
    public IntegralTaskRecord addScanRecommendBanner(Long uid, String id) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.scanHomeBanner.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addScanRecommendSpecial-'+#uid+'-'+#id")
    @Override
    public void addScanRecommendSpecial(Long uid) {
        // TODO Auto-generated method stub
    public IntegralTaskRecord addScanRecommendSpecial(Long uid, String id) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.scanSpecial.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addScanTaoBaoCart-'+#uid")
    @Override
    public void addScanTaoBaoCart(Long uid) {
        // TODO Auto-generated method stub
    public IntegralTaskRecord addScanTaoBaoCart(Long uid) {
        try {
            return addEventStatistic(uid, TaskUniqueKeyEnum.scanTBCart.name());
        } catch (IntegralGetException e) {
            e.printStackTrace();
        }
        return null;
    }
    @IntegralGetVersionLimit(uid = "#uid")
@@ -182,7 +218,7 @@
    @Override
    public void addTaoLiJinBuy(Long uid, Long goodsId) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.taoLiJinBuy.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.taoLiJinBuy.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -193,11 +229,11 @@
    @Override
    public void addInviteLevelOne(Long uid, Long workerId) {
        try {
            UserInfo boss = threeSaleSerivce.getBoss(uid);
            UserInfo boss = getBossByUid(uid);
            if (boss != null)
                addInviteLevelTwo(boss.getId());
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelOne.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelOne.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -212,7 +248,7 @@
    @Async()
    private void addInviteLevelTwo(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelTwo.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelTwo.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -223,7 +259,7 @@
    @Override
    public void addShareSingleGoods(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.shareSingleGoods.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.shareSingleGoods.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -234,7 +270,7 @@
    @Override
    public void addShareMultipleGoods(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.shareMultipleGoods.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.shareMultipleGoods.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -245,7 +281,7 @@
    @Override
    public void addShareTLJGoods(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.shareTLJGoods.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.shareTLJGoods.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -256,7 +292,7 @@
    @Override
    public void addGiveRebateCoupon(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.giveRebateCoupon.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.giveRebateCoupon.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -267,7 +303,7 @@
    @Override
    public void addGiveFreeCoupon(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.giveFreeCoupon.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.giveFreeCoupon.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -278,7 +314,7 @@
    @Override
    public void addGiveTaoLiJin(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.giveTaoLiJin.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.giveTaoLiJin.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -289,7 +325,7 @@
    @Override
    public void addCloseRecommendGoods(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.closeRecommendGoods.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.closeRecommendGoods.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -300,11 +336,11 @@
    @Override
    public void addCouponRebate(Long uid) {
        try {
            UserInfo boss = threeSaleSerivce.getBoss(uid);
            UserInfo boss = getBossByUid(uid);
            if (boss != null)
                addCouponRebateLevelOne(boss.getId());
            addEventStatistic(uid, TaskUniqueKeyEnum.couponRebate.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.couponRebate.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -319,11 +355,11 @@
    @Async()
    private void addCouponRebateLevelOne(Long uid) {
        try {
            UserInfo boss = threeSaleSerivce.getBoss(uid);
            UserInfo boss = getBossByUid(uid);
            if (boss != null)
                addCouponRebateLevelTwo(boss.getId()); // 二级队员
            addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelOne.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelOne.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -338,7 +374,7 @@
    @Async()
    private void addCouponRebateLevelTwo(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelTwo.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelTwo.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -349,11 +385,11 @@
    @Override
    public void addRebateOrder(Long uid) {
        try {
            UserInfo boss = threeSaleSerivce.getBoss(uid);
            UserInfo boss = getBossByUid(uid);
            if (boss != null)
                addInviteOrderLevelOne(boss.getId());
            addEventStatistic(uid, TaskUniqueKeyEnum.rebateOrder.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.rebateOrder.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -368,11 +404,11 @@
    @Async()
    private void addInviteOrderLevelOne(Long uid) {
        try {
            UserInfo boss = threeSaleSerivce.getBoss(uid);
            UserInfo boss = getBossByUid(uid);
            if (boss != null)
                addInviteOrderLevelTwo(boss.getId());
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelOne.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelOne.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -387,7 +423,7 @@
    @Async()
    private void addInviteOrderLevelTwo(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelTwo.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelTwo.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -398,7 +434,7 @@
    @Override
    public void addShareOrder(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.shareOrder.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.shareOrder.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -409,7 +445,7 @@
    @Override
    public void addBindWeiXin(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.bindWeiXin.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.bindWeiXin.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -420,7 +456,7 @@
    @Override
    public void addBindPhone(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.bindPhone.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.bindPhone.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -431,7 +467,7 @@
    @Override
    public void addBindTaoBao(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.bindTaoBao.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.bindTaoBao.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -442,7 +478,7 @@
    @Override
    public void addSetWeiXinNum(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.setWeiXinNum.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.setWeiXinNum.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -453,7 +489,7 @@
    @Override
    public void addSetGender(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.setGender.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.setGender.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -464,7 +500,7 @@
    @Override
    public void addSetPortrait(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.setPortrait.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.setPortrait.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -475,7 +511,7 @@
    @Override
    public void addSetNickname(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.setNickName.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.setNickName.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -486,7 +522,7 @@
    @Override
    public void addBindAlipay(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.bindAlipay.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.bindAlipay.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
@@ -497,7 +533,7 @@
    @Override
    public void addInviteActivate(Long uid) {
        try {
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteActivate.name(), null);
            addEventStatistic(uid, TaskUniqueKeyEnum.inviteActivate.name());
        } catch (Exception e) {
            LogHelper.errorDetailInfo(e);
        }
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralTaskRecordServiceImpl.java
@@ -303,9 +303,9 @@
    }
    @Override
    public Integer countGetCountByTaskIdAndDay(Long taskId, Long uid, Date day) {
    public int countGetCountByTaskIdAndDay(Long taskId, Long uid, Date day) {
        if (day == null)
            return null;
            return 0;
        Date minTime = new Date(
                TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(day.getTime(), "yyyy-MM-dd"), "yyyy-MM-dd"));
        Date maxTime = new Date(minTime.getTime() + 1000 * 60 * 60 * 24L);
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java
@@ -8,6 +8,7 @@
import javax.annotation.Resource;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Service;
@@ -80,6 +81,7 @@
    @Resource
    private UserOtherMsgNotificationService userOtherMsgNotificationService;
    
    @Lazy
    @Resource
    private IntegralGetService  integralGetService;
    
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java
@@ -12,6 +12,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yeshi.utils.JsonUtil;
@@ -112,6 +113,7 @@
    private JedisPool jedisPool;
    
    
    @Lazy
    @Resource
    private UserInfoModifyRecordService userInfoModifyRecordService;
    
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserInfoServiceImpl.java
@@ -20,6 +20,7 @@
import org.hibernate.Query;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.task.TaskExecutor;
import org.springframework.orm.hibernate4.HibernateCallback;
import org.springframework.stereotype.Service;
@@ -40,8 +41,6 @@
import com.yeshi.fanli.dao.mybatis.share.ShareMapper;
import com.yeshi.fanli.dao.user.UserInfoDao;
import com.yeshi.fanli.entity.bus.user.BindingAccount;
import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode;
import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
import com.yeshi.fanli.entity.bus.user.InviteUser;
import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
import com.yeshi.fanli.entity.bus.user.UserInfo;
@@ -49,7 +48,6 @@
import com.yeshi.fanli.entity.bus.user.WeiXinUser;
import com.yeshi.fanli.entity.system.BusinessSystem;
import com.yeshi.fanli.exception.ThreeSaleException;
import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
import com.yeshi.fanli.exception.user.UserInfoException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.service.inter.config.ConfigService;
@@ -135,6 +133,7 @@
    @Resource
    private BindingAccountService bindingAccountService;
    
    @Lazy
    @Resource
    private UserInfoModifyRecordService userInfoModifyRecordService;
    
fanli/src/main/java/com/yeshi/fanli/service/inter/integral/IntegralGetService.java
@@ -3,8 +3,6 @@
import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
import com.yeshi.fanli.exception.integral.IntegralGetException;
import net.sf.json.JSONObject;
/**
 * 金币获取服务
 * 
@@ -23,7 +21,7 @@
     *            事件编码
     * @throws IntegralGetException
     */
    public IntegralTaskRecord addEventStatistic(Long uid, String event, JSONObject params) throws IntegralGetException;
    public IntegralTaskRecord addEventStatistic(Long uid, String event) throws IntegralGetException;
    /**
     * 从粘贴板推荐进入搜索结果
@@ -31,7 +29,7 @@
     * @param uid
     * @throws IntegralGetException
     */
    public void addRecommendSearch(Long uid) throws IntegralGetException;
    public IntegralTaskRecord addRecommendSearch(Long uid);
    /**
     * 搜索结果浏览
@@ -39,7 +37,7 @@
     * @param uid
     * @throws IntegralGetException
     */
    public void addSearchResultScan(Long uid,String kw) throws IntegralGetException;
    public IntegralTaskRecord addSearchResultScan(Long uid,String kw) ;
    /**
     * 分享邀请图
@@ -47,7 +45,7 @@
     * @param uid
     * @throws IntegralGetException
     */
    public void addShareInvite(Long uid) throws IntegralGetException;
    public IntegralTaskRecord addShareInvite(Long uid);
    /**
     * 进入店铺
@@ -55,7 +53,7 @@
     * @param uid
     * @throws IntegralGetException
     */
    public void addIntoShop(Long uid) throws IntegralGetException;
    public IntegralTaskRecord addIntoShop(Long uid, String shopUrlMD5);
    /**
     * 推送记录页浏览
@@ -63,7 +61,7 @@
     * @param uid
     * @throws IntegralGetException
     */
    public void addScanPushHistory(Long uid) throws IntegralGetException;
    public IntegralTaskRecord addScanPushHistory(Long uid) ;
    /**
     * 商品详情页浏览
@@ -72,28 +70,28 @@
     * @param goodsType
     * @param goodsId
     */
    public void addScanGoodsDetail(Long uid, int goodsType, Long goodsId);
    public IntegralTaskRecord addScanGoodsDetail(Long uid, int goodsType, Long goodsId);
    /**
     * 推荐banner浏览
     * 
     * @param uid
     */
    public void addScanRecommendBanner(Long uid);
    public IntegralTaskRecord addScanRecommendBanner(Long uid, String id);
    /**
     * 推荐专题浏览
     * 
     * @param uid
     */
    public void addScanRecommendSpecial(Long uid);
    public IntegralTaskRecord addScanRecommendSpecial(Long uid, String id);
    /**
     * 淘宝购物车浏览
     * 
     * @param uid
     */
    public void addScanTaoBaoCart(Long uid);
    public IntegralTaskRecord addScanTaoBaoCart(Long uid);
    /**
     * 自购立减
fanli/src/main/java/com/yeshi/fanli/service/inter/integral/IntegralTaskRecordService.java
@@ -109,7 +109,7 @@
     * @param day
     * @return
     */
    public Integer countGetCountByTaskIdAndDay(Long taskId, Long uid, Date day);
    public int countGetCountByTaskIdAndDay(Long taskId, Long uid, Date day);
    /**
     * 添加获取记录
fanli/src/main/java/com/yeshi/fanli/util/DouYinUtil.java
New file
@@ -0,0 +1,34 @@
package com.yeshi.fanli.util;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.GetMethod;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.select.Elements;
public class DouYinUtil {
    public static String parseDouYinGoods(String url) {
        HttpClient httpClient = new HttpClient();
        GetMethod gm = new GetMethod(url);
        try {
            httpClient.executeMethod(gm);
            String finalUrl = gm.getURI().toString();
            if (finalUrl.startsWith("https://s.click.taobao.com")) {
                Document doc = Jsoup.parse(gm.getResponseBodyAsString());
                Elements els = doc.getElementsByTag("meta");
                for (int i = 0; i < els.size(); i++) {
                    if (els.get(i).toString().contains("URL=")) {
//                        System.out.println(els.get(i)..toString());
                    }
                    System.out.println(els.get(i).attr("URL"));
                }
            }
        } catch (Exception e) {
        }
        return null;
    }
}
fanli/src/main/java/com/yeshi/fanli/util/jd/JDApiUtil.java
@@ -132,6 +132,7 @@
        JSONObject resultJson = JSONObject.fromObject(result);
        result = resultJson.optJSONObject("jd_union_open_promotion_common_get_response").optString("result");
        System.out.println(result);
        if (result == null) {
            return null;
        }
fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java
@@ -560,9 +560,9 @@
        try {
            if (engine instanceof Invocable) {
                Invocable in = (Invocable) engine;
                String goodsId = in.invokeFunction("getGoodsId", url).toString();
                if (!StringUtil.isNullOrEmpty(goodsId))
                    return goodsId.trim();
                Object goodsId = in.invokeFunction("getGoodsId", url);
                if (goodsId!=null)
                    return goodsId.toString().trim();
            }
        } catch (Exception e) {
            e.printStackTrace();
fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoUtil.java
@@ -516,9 +516,9 @@
        try {
            if (engine instanceof Invocable) {
                Invocable in = (Invocable) engine;
                String goodsId = in.invokeFunction("getGoodsId", url).toString();
                if (!StringUtil.isNullOrEmpty(goodsId))
                    return goodsId.trim();
                Object goodsId = in.invokeFunction("getGoodsId", url);
                if (goodsId!=null)
                    return goodsId.toString().trim();
            }
        } catch (Exception e) {
            e.printStackTrace();