| | |
| | | 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.IntegralTaskRank;
|
| | | 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;
|
| | |
| | |
|
| | | @Resource
|
| | | private RedisManager redisManager;
|
| | | |
| | |
|
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private IntegralTaskRankService integralTaskRankService;
|
| | |
|
| | |
| | | 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,"等级信息不存在");
|
| | | 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) {
|
| | |
| | |
|
| | | return null;
|
| | | }
|
| | |
|
| | | @IntegralGetFrequencyLimit(key = "'addShareInvite-'+#uid")
|
| | | |
| | | @IntegralGetFrequencyLimit(key = "'addShareInvite-'+#uid", time = 30)
|
| | | @Override
|
| | | public IntegralTaskRecord addShareInvite(Long uid) {
|
| | | try {
|
| | |
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'taoLiJinBuy-'+#uid", time = 30)
|
| | | @Async()
|
| | | @Override
|
| | | public void addTaoLiJinBuy(Long uid, Long goodsId) {
|
| | |
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'shareSingleGoods-'+#uid", time = 45)
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareSingleGoods(Long uid) {
|
| | |
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'shareMultipleGoods-'+#uid", time = 45)
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareMultipleGoods(Long uid) {
|
| | |
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'shareTLJGoods-'+#uid", time = 45)
|
| | | @Async()
|
| | | @Override
|
| | | public void addShareTLJGoods(Long uid) {
|
| | |
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'closeRecommendGoods-'+#uid", time = 30)
|
| | | @Async()
|
| | | @Override
|
| | | public void addCloseRecommendGoods(Long uid) {
|
| | |
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @IntegralGetFrequencyLimit(key = "'couponRebate-'+#uid", time = 30)
|
| | | @Async()
|
| | | @Override
|
| | | public void addCouponRebate(Long uid) {
|
| | |
| | | @Override
|
| | | public void addRebateOrder(Long uid) {
|
| | | try {
|
| | | UserInfo boss = getBossByUid(uid);
|
| | | if (boss != null)
|
| | | addInviteOrderLevelOne(boss.getId());
|
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.rebateOrder.name());
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | | */
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @Async()
|
| | | private void addInviteOrderLevelOne(Long uid) {
|
| | | @Override
|
| | | public void addInviteOrderLevelOne(Long uid) {
|
| | | try {
|
| | | UserInfo boss = getBossByUid(uid);
|
| | | if (boss != null)
|
| | | addInviteOrderLevelTwo(boss.getId());
|
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelOne.name());
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | |
| | | */
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @Async()
|
| | | private void addInviteOrderLevelTwo(Long uid) {
|
| | | @Override
|
| | | public void addInviteOrderLevelTwo(Long uid) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelTwo.name());
|
| | | } catch (Exception e) {
|