| | |
| | | package com.yeshi.fanli.service.impl.user.integral;
|
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | 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.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTask;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTask.FrequencyEnum;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTask.TaskUniqueKeyEnum;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRank;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
|
| | | import com.yeshi.fanli.exception.integral.IntegralGetException;
|
| | | import com.yeshi.fanli.exception.integral.IntegralTaskRecordException;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralGetService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskRankService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskService;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService;
|
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetFrequencyLimit;
|
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetVersionLimit;
|
| | |
|
| | | @Lazy
|
| | | @Service
|
| | | public class IntegralGetServiceImpl implements IntegralGetService {
|
| | |
|
| | | @Resource
|
| | | private IntegralTaskService integralTaskService;
|
| | |
|
| | | @Resource
|
| | | private IntegralTaskRecordService integralTaskRecordService;
|
| | |
|
| | | @Resource
|
| | | private ThreeSaleMapper threeSaleMapper;
|
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private IntegralTaskRankService integralTaskRankService;
|
| | |
|
| | | private UserInfo getBossByUid(Long uid) {
|
| | | return threeSaleMapper.selectBoss(uid);
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid + '-' + #event")
|
| | | @Override
|
| | | 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 = getBossByUid(uid);
|
| | | if (boss != null)
|
| | | addInShopLevelOne(boss.getId()); // 下级浏览店铺
|
| | | }
|
| | |
|
| | | if (task.getFrequency() == FrequencyEnum.everyday) {
|
| | | int count = integralTaskRecordService.countGetCountByTaskIdAndDay(task.getId(), uid, nowDate);
|
| | | if (count >= task.getUpperLimit())
|
| | | throw new IntegralGetException(2, "事件触发达到上限");
|
| | | } else if (task.getFrequency() == FrequencyEnum.onlyOne) {
|
| | | int count = integralTaskRecordService.countGetCountByTaskIdAndDay(task.getId(), uid, null);
|
| | | if (count > 0)
|
| | | throw new IntegralGetException(2, "事件触发达到上限");
|
| | | }
|
| | |
|
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
|
| | | if (userInfoExtra == null)
|
| | | throw new IntegralGetException(2, "额外信息不存在");
|
| | |
|
| | | UserRank userRank = userInfoExtra.getUserRank();
|
| | | if (userRank == null)
|
| | | throw new IntegralGetException(2, "等级信息不存在");
|
| | |
|
| | | int goldCoin = task.getGoldCoin();
|
| | | if (task.getDoubleNum() != null && task.getDoubleNum() > 0)
|
| | | goldCoin = task.getDoubleNum() * goldCoin;
|
| | |
|
| | | Long taskId = task.getId();
|
| | | IntegralTaskRank traskRank = integralTaskRankService.getByTsakIdAndRankId(taskId, userRank.getId());
|
| | | if (traskRank != null) {
|
| | | Integer addCoin = traskRank.getAddCoin();
|
| | | if (addCoin != null && addCoin > 0)
|
| | | goldCoin += addCoin;
|
| | |
|
| | | Integer doubleNum = traskRank.getDoubleNum();
|
| | | if (doubleNum != null && doubleNum > 0) {
|
| | | goldCoin = goldCoin * doubleNum;
|
| | | }
|
| | | }
|
| | |
|
| | | IntegralTaskRecord record = new IntegralTaskRecord();
|
| | | record.setCid(task.getTaskClass().getId());
|
| | | record.setGoldCoin(goldCoin);
|
| | | record.setState(IntegralTaskRecord.STATE_WAITING_RECIEVE);
|
| | | record.setTaskId(task.getId());
|
| | | record.setUid(uid);
|
| | |
|
| | | try {
|
| | | IntegralTaskRecord addRecord = integralTaskRecordService.addRecord(record);
|
| | | return addRecord;
|
| | | } catch (IntegralTaskRecordException e) {
|
| | | throw new IntegralGetException(3, "添加记录失败");
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(key = "'addRecommendSearch-'+#uid", time = 60)
|
| | | @Override
|
| | | public IntegralTaskRecord addRecommendSearch(Long uid) {
|
| | | try {
|
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.recommendSearch.name());
|
| | | } catch (IntegralGetException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(key = "'addSearchResultScan-'+#uid+'-'+#kw")
|
| | | @Override
|
| | | public IntegralTaskRecord addSearchResultScan(Long uid, String kw) {
|
| | | try {
|
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanSearchResult.name());
|
| | | } catch (IntegralGetException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addShareInvite-'+#uid", time = 30)
|
| | | @Override
|
| | | public IntegralTaskRecord addShareInvite(Long uid) {
|
| | | try {
|
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.shareInvite.name());
|
| | | } catch (IntegralGetException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(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 = getBossByUid(uid);
|
| | | if (boss != null)
|
| | | addInShopLevelTwo(boss.getId()); // 二级队员
|
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelOne.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @Async()
|
| | | private void addInShopLevelTwo(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelTwo.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(key = "'addScanPushHistory-'+#uid")
|
| | | @Override
|
| | | public IntegralTaskRecord addScanPushHistory(Long uid) {
|
| | | try {
|
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanPush.name());
|
| | | } catch (IntegralGetException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(key = "'addScanGoodsDetail-'+#uid+'-'+#goodsType+'-'+#goodsId")
|
| | | @Override
|
| | | public IntegralTaskRecord addScanGoodsDetail(Long uid, int goodsType, Long goodsId) {
|
| | | try {
|
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanGoods.name());
|
| | | } catch (IntegralGetException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(key = "'addScanRecommendBanner-'+#uid+'-'+#id")
|
| | | @Override
|
| | | public IntegralTaskRecord addScanRecommendBanner(Long uid, String id) {
|
| | | try {
|
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanHomeBanner.name());
|
| | | } catch (IntegralGetException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(key = "'addScanRecommendSpecial-'+#uid+'-'+#id")
|
| | | @Override
|
| | | public IntegralTaskRecord addScanRecommendSpecial(Long uid, String id) {
|
| | | try {
|
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanSpecial.name());
|
| | | } catch (IntegralGetException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(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")
|
| | | @IntegralGetFrequencyLimit(key = "'taoLiJinBuy-'+#uid", time = 30)
|
| | | @Async()
|
| | | @Override
|
| | | public void addTaoLiJinBuy(Long uid, Long goodsId) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.taoLiJinBuy.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addInviteLevelOne(Long uid, Long workerId) {
|
| | | try {
|
| | | UserInfo boss = getBossByUid(uid);
|
| | | if (boss != null)
|
| | | addInviteLevelTwo(boss.getId());
|
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelOne.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 间接邀请
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | private void addInviteLevelTwo(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelTwo.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'shareSingleGoods-'+#uid", time = 45)
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareSingleGoods(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareSingleGoods.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'shareMultipleGoods-'+#uid", time = 45)
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareMultipleGoods(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareMultipleGoods.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'shareTLJGoods-'+#uid", time = 45)
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareTLJGoods(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareTLJGoods.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addGiveRebateCoupon(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveRebateCoupon.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addGiveFreeCoupon(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveFreeCoupon.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addGiveTaoLiJin(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveTaoLiJin.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'closeRecommendGoods-'+#uid", time = 30)
|
| | | @Async()
|
| | | @Override
|
| | | public void addCloseRecommendGoods(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.closeRecommendGoods.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'couponRebate-'+#uid", time = 30)
|
| | | @Async()
|
| | | @Override
|
| | | public void addCouponRebate(Long uid) {
|
| | | try {
|
| | | UserInfo boss = getBossByUid(uid);
|
| | | if (boss != null)
|
| | | addCouponRebateLevelOne(boss.getId());
|
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebate.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 一级队员领券返利
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | private void addCouponRebateLevelOne(Long uid) {
|
| | | try {
|
| | | UserInfo boss = getBossByUid(uid);
|
| | | if (boss != null)
|
| | | addCouponRebateLevelTwo(boss.getId()); // 二级队员
|
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelOne.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 二级队员领券返利
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | private void addCouponRebateLevelTwo(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelTwo.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addRebateOrder(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.rebateOrder.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 一级队员邀请订单
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addInviteOrderLevelOne(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelOne.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 二级队员邀请订单
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addInviteOrderLevelTwo(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelTwo.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareOrder(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareOrder.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addBindWeiXin(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindWeiXin.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addBindPhone(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindPhone.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addBindTaoBao(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindTaoBao.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addSetWeiXinNum(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setWeiXinNum.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addSetGender(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setGender.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addSetPortrait(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setPortrait.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addSetNickname(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setNickName.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addBindAlipay(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindAlipay.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Override
|
| | | public void addInviteActivate(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteActivate.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.service.impl.user.integral; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.yeshi.fanli.dao.mybatis.ThreeSaleMapper; |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo; |
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra; |
| | | import com.yeshi.fanli.entity.bus.user.UserRank; |
| | | import com.yeshi.fanli.entity.integral.IntegralTask; |
| | | import com.yeshi.fanli.entity.integral.IntegralTask.FrequencyEnum; |
| | | import com.yeshi.fanli.entity.integral.IntegralTask.TaskUniqueKeyEnum; |
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRank; |
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRecord; |
| | | import com.yeshi.fanli.entity.integral.UserGetIntegralFromOrderRecord; |
| | | import com.yeshi.fanli.exception.integral.IntegralGetException; |
| | | import com.yeshi.fanli.exception.integral.IntegralTaskRecordException; |
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService; |
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralGetService; |
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskRankService; |
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskRecordService; |
| | | import com.yeshi.fanli.service.inter.user.integral.IntegralTaskService; |
| | | import com.yeshi.fanli.service.inter.user.integral.UserGetIntegralFromOrderRecordService; |
| | | import com.yeshi.fanli.util.RedisManager; |
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService; |
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetFrequencyLimit; |
| | | import com.yeshi.fanli.util.annotation.integral.IntegralGetVersionLimit; |
| | | import com.yeshi.fanli.util.factory.integral.UserGetIntegralFromOrderRecordFactory; |
| | | |
| | | @Lazy |
| | | @Service |
| | | public class IntegralGetServiceImpl implements IntegralGetService { |
| | | |
| | | @Resource |
| | | private IntegralTaskService integralTaskService; |
| | | |
| | | @Resource |
| | | private IntegralTaskRecordService integralTaskRecordService; |
| | | |
| | | @Resource |
| | | private ThreeSaleMapper threeSaleMapper; |
| | | |
| | | @Resource |
| | | private RedisManager redisManager; |
| | | |
| | | @Resource |
| | | private UserInfoExtraService userInfoExtraService; |
| | | |
| | | @Resource |
| | | private IntegralTaskRankService integralTaskRankService; |
| | | |
| | | @Resource |
| | | private UserGetIntegralFromOrderRecordService userGetIntegralFromOrderRecordService; |
| | | |
| | | private UserInfo getBossByUid(Long uid) { |
| | | return threeSaleMapper.selectBoss(uid); |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid + '-' + #event") |
| | | @Override |
| | | 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 = getBossByUid(uid); |
| | | // if (boss != null) |
| | | // addInShopLevelOne(boss.getId()); // 下级浏览店铺 |
| | | // } |
| | | |
| | | if (task.getFrequency() == FrequencyEnum.everyday) { |
| | | int count = integralTaskRecordService.countGetCountByTaskIdAndDay(task.getId(), uid, nowDate); |
| | | if (count >= task.getUpperLimit()) |
| | | throw new IntegralGetException(2, "事件触发达到上限"); |
| | | } else if (task.getFrequency() == FrequencyEnum.onlyOne) { |
| | | int count = integralTaskRecordService.countGetCountByTaskIdAndDay(task.getId(), uid, null); |
| | | if (count > 0) |
| | | throw new IntegralGetException(2, "事件触发达到上限"); |
| | | } |
| | | |
| | | UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid); |
| | | if (userInfoExtra == null) |
| | | throw new IntegralGetException(2, "额外信息不存在"); |
| | | |
| | | UserRank userRank = userInfoExtra.getUserRank(); |
| | | if (userRank == null) |
| | | throw new IntegralGetException(2, "等级信息不存在"); |
| | | |
| | | int goldCoin = task.getGoldCoin(); |
| | | if (task.getDoubleNum() != null && task.getDoubleNum() > 0) |
| | | goldCoin = task.getDoubleNum() * goldCoin; |
| | | |
| | | Long taskId = task.getId(); |
| | | IntegralTaskRank traskRank = integralTaskRankService.getByTsakIdAndRankId(taskId, userRank.getId()); |
| | | if (traskRank != null) { |
| | | Integer addCoin = traskRank.getAddCoin(); |
| | | if (addCoin != null && addCoin > 0) |
| | | goldCoin += addCoin; |
| | | |
| | | Integer doubleNum = traskRank.getDoubleNum(); |
| | | if (doubleNum != null && doubleNum > 0) { |
| | | goldCoin = goldCoin * doubleNum; |
| | | } |
| | | } |
| | | |
| | | IntegralTaskRecord record = new IntegralTaskRecord(); |
| | | record.setCid(task.getTaskClass().getId()); |
| | | record.setGoldCoin(goldCoin); |
| | | record.setState(IntegralTaskRecord.STATE_WAITING_RECIEVE); |
| | | record.setTaskId(task.getId()); |
| | | record.setUid(uid); |
| | | |
| | | try { |
| | | IntegralTaskRecord addRecord = integralTaskRecordService.addRecord(record); |
| | | return addRecord; |
| | | } catch (IntegralTaskRecordException e) { |
| | | throw new IntegralGetException(3, "添加记录失败"); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addRecommendSearch-'+#uid", time = 60) |
| | | @Override |
| | | public IntegralTaskRecord addRecommendSearch(Long uid) { |
| | | try { |
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.recommendSearch.name()); |
| | | } catch (IntegralGetException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addSearchResultScan-'+#uid+'-'+#kw") |
| | | @Override |
| | | public IntegralTaskRecord addSearchResultScan(Long uid, String kw) { |
| | | try { |
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanSearchResult.name()); |
| | | } catch (IntegralGetException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addShareInvite-'+#uid", time = 30) |
| | | @Override |
| | | public IntegralTaskRecord addShareInvite(Long uid) { |
| | | try { |
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.shareInvite.name()); |
| | | } catch (IntegralGetException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(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; |
| | | } |
| | | |
| | | |
| | | private void addInShopLevelOne(Long uid) { |
| | | try { |
| | | UserInfo boss = getBossByUid(uid); |
| | | if (boss != null) |
| | | addInShopLevelTwo(boss.getId()); // 二级队员 |
| | | |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelOne.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | private void addInShopLevelTwo(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelTwo.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addScanPushHistory-'+#uid") |
| | | @Override |
| | | public IntegralTaskRecord addScanPushHistory(Long uid) { |
| | | try { |
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanPush.name()); |
| | | } catch (IntegralGetException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addScanGoodsDetail-'+#uid+'-'+#goodsType+'-'+#goodsId") |
| | | @Override |
| | | public IntegralTaskRecord addScanGoodsDetail(Long uid, int goodsType, String goodsId) { |
| | | try { |
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanGoods.name()); |
| | | } catch (IntegralGetException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addScanRecommendBanner-'+#uid+'-'+#id") |
| | | @Override |
| | | public IntegralTaskRecord addScanRecommendBanner(Long uid, String id) { |
| | | try { |
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanHomeBanner.name()); |
| | | } catch (IntegralGetException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addScanRecommendSpecial-'+#uid+'-'+#id") |
| | | @Override |
| | | public IntegralTaskRecord addScanRecommendSpecial(Long uid, String id) { |
| | | try { |
| | | return addEventStatistic(uid, TaskUniqueKeyEnum.scanSpecial.name()); |
| | | } catch (IntegralGetException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @IntegralGetFrequencyLimit(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") |
| | | @IntegralGetFrequencyLimit(key = "'taoLiJinBuy-'+#uid", time = 30) |
| | | @Async() |
| | | @Override |
| | | public void addTaoLiJinBuy(Long uid, String goodsId) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.taoLiJinBuy.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addInviteLevelOne(Long uid, Long workerId) { |
| | | try { |
| | | UserInfo boss = getBossByUid(uid); |
| | | if (boss != null) |
| | | addInviteLevelTwo(boss.getId()); |
| | | |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelOne.name()); |
| | | } catch (Exception e) { |
| | | //LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 间接邀请 |
| | | * |
| | | * @param uid |
| | | */ |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | private void addInviteLevelTwo(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelTwo.name()); |
| | | } catch (Exception e) { |
| | | //LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @IntegralGetFrequencyLimit(key = "'shareSingleGoods-'+#uid", time = 45) |
| | | @Async() |
| | | @Override |
| | | public void addShareSingleGoods(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareSingleGoods.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @IntegralGetFrequencyLimit(key = "'shareMultipleGoods-'+#uid", time = 45) |
| | | @Async() |
| | | @Override |
| | | public void addShareMultipleGoods(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareMultipleGoods.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @IntegralGetFrequencyLimit(key = "'shareTLJGoods-'+#uid", time = 45) |
| | | @Async() |
| | | @Override |
| | | public void addShareTLJGoods(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareTLJGoods.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addGiveRebateCoupon(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveRebateCoupon.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addGiveFreeCoupon(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveFreeCoupon.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addGiveTaoLiJin(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveTaoLiJin.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @IntegralGetFrequencyLimit(key = "'closeRecommendGoods-'+#uid", time = 30) |
| | | @Async() |
| | | @Override |
| | | public void addCloseRecommendGoods(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.closeRecommendGoods.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @IntegralGetFrequencyLimit(key = "'couponRebate-'+#uid", time = 30) |
| | | @Async() |
| | | @Override |
| | | public void addCouponRebate(Long uid) { |
| | | try { |
| | | // UserInfo boss = getBossByUid(uid); |
| | | // if (boss != null) |
| | | // addCouponRebateLevelOne(boss.getId()); |
| | | |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebate.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 一级队员领券返利 |
| | | * |
| | | * @param uid |
| | | */ |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | private void addCouponRebateLevelOne(Long uid) { |
| | | try { |
| | | UserInfo boss = getBossByUid(uid); |
| | | if (boss != null) |
| | | addCouponRebateLevelTwo(boss.getId()); // 二级队员 |
| | | |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelOne.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 二级队员领券返利 |
| | | * |
| | | * @param uid |
| | | */ |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | private void addCouponRebateLevelTwo(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelTwo.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Transactional |
| | | @Override |
| | | public void addRebateOrder(Long uid, String orderNo, int sourceType) { |
| | | try { |
| | | IntegralTaskRecord record = addEventStatistic(uid, TaskUniqueKeyEnum.rebateOrder.name()); |
| | | if (record != null) { |
| | | userGetIntegralFromOrderRecordService.addRecord( |
| | | UserGetIntegralFromOrderRecordFactory.create(UserGetIntegralFromOrderRecord.TYPE_RECIEVE_MONEY, |
| | | uid, orderNo, sourceType, record.getGoldCoin())); |
| | | } |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 一级队员邀请订单 |
| | | * |
| | | * @param uid |
| | | */ |
| | | //@IntegralGetVersionLimit(uid = "#uid") |
| | | //@RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Transactional |
| | | @Override |
| | | public void addInviteOrderLevelOne(Long uid, String orderNo, int sourceType) { |
| | | try { |
| | | // IntegralTaskRecord record = addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelOne.name()); |
| | | // if (record != null) { |
| | | // userGetIntegralFromOrderRecordService.addRecord( |
| | | // UserGetIntegralFromOrderRecordFactory.create(UserGetIntegralFromOrderRecord.TYPE_RECIEVE_MONEY, |
| | | // uid, orderNo, sourceType, record.getGoldCoin())); |
| | | // } |
| | | |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 二级队员邀请订单 |
| | | * |
| | | * @param uid |
| | | */ |
| | | //@IntegralGetVersionLimit(uid = "#uid") |
| | | //@RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Transactional |
| | | @Override |
| | | public void addInviteOrderLevelTwo(Long uid, String orderNo, int sourceType) { |
| | | try { |
| | | // IntegralTaskRecord record = addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelTwo.name()); |
| | | // if (record != null) { |
| | | // userGetIntegralFromOrderRecordService.addRecord( |
| | | // UserGetIntegralFromOrderRecordFactory.create(UserGetIntegralFromOrderRecord.TYPE_RECIEVE_MONEY, |
| | | // uid, orderNo, sourceType, record.getGoldCoin())); |
| | | // } |
| | | |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Transactional |
| | | @Override |
| | | public void addShareOrder(Long uid, String orderNo, int sourceType) { |
| | | try { |
| | | IntegralTaskRecord record = addEventStatistic(uid, TaskUniqueKeyEnum.shareOrder.name()); |
| | | if (record != null) { |
| | | userGetIntegralFromOrderRecordService.addRecord( |
| | | UserGetIntegralFromOrderRecordFactory.create(UserGetIntegralFromOrderRecord.TYPE_RECIEVE_MONEY, |
| | | uid, orderNo, sourceType, record.getGoldCoin())); |
| | | } |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addBindWeiXin(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindWeiXin.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addBindPhone(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindPhone.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addBindTaoBao(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindTaoBao.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addSetWeiXinNum(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setWeiXinNum.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addSetGender(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setGender.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addSetPortrait(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setPortrait.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addSetNickname(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setNickName.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addBindAlipay(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindAlipay.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | @IntegralGetVersionLimit(uid = "#uid") |
| | | @RequestSerializableByKeyService(key = "#uid") |
| | | @Async() |
| | | @Override |
| | | public void addInviteActivate(Long uid) { |
| | | try { |
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteActivate.name()); |
| | | } catch (Exception e) { |
| | | // LogHelper.errorDetailInfo(e); |
| | | } |
| | | } |
| | | |
| | | } |