yujian
2019-08-27 d8359ddb48dab5cc797a9d552e11fde571f4920c
Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div
14个文件已修改
1个文件已添加
320 ■■■■■ 已修改文件
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 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/hongbao/ThreeSaleSerivceImpl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/integral/IntegralGetServiceImpl.java 202 ●●●●● 补丁 | 查看 | 原始文档 | 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
@@ -109,7 +109,6 @@
    @Resource
    private JumpDetailV2Service jumpDetailV2Service;
    
    /**
     * 获取任务列表
     * 
@@ -191,11 +190,11 @@
                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))
@@ -421,7 +420,6 @@
        }
    }
    
    /**
     * 兑换金币
     * 
@@ -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();
                            }
                        }
                    });
                }
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;
@@ -71,17 +72,16 @@
    @Resource
    private ThreeSaleExtraInfoSerivce threeSaleExtraInfoSerivce;
    
    @Lazy
    @Resource
    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) {
@@ -495,7 +493,6 @@
        return result;
    }
    
    @Override
    public List<ThreeSale> listByWorkerId(Long workerId) {
        return threeSaleMapper.listByWorkerId(workerId);
@@ -594,12 +591,12 @@
            }
        });
        
    }
    @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, "用户信息为空");
@@ -650,7 +647,6 @@
        // 邀请消息
        userInviteMsgNotificationService.inviteSuccess(threeSale.getBoss().getId(), threeSale);
        
        executor.execute(new Runnable() {
            @Override
            public void run() {
@@ -699,7 +695,6 @@
        return threeSaleMapper.getByWorkerId(workerId);
    }
    
    @Override
    public long countSuccessFirstTeam(Long uid) {
        return threeSaleMapper.countFirstTeam(uid, 1);
@@ -710,12 +705,10 @@
        return threeSaleMapper.selectSuccessByWorkerId(workerId);
    }
    
    @Override
    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) {
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();
    }
    @Override
    public void addShareInvite(Long uid) throws IntegralGetException {
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addShareInvite-'+#uid")
    @Override
    public void addIntoShop(Long uid) throws IntegralGetException {
        // TODO Auto-generated method stub
    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 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();
    }
    @Override
    public void addScanTaoBaoCart(Long uid) {
        // TODO Auto-generated method stub
        return null;
    }
    @Cacheable(value = "integralGetCache", key = "'addScanTaoBaoCart-'+#uid")
    @Override
    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();