| | |
| | | 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.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.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.RequestSerializableByKey;
|
| | | 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
|
| | |
| | |
|
| | | @Resource
|
| | | private IntegralTaskRankService integralTaskRankService;
|
| | |
|
| | | @Resource
|
| | | private UserGetIntegralFromOrderRecordService userGetIntegralFromOrderRecordService;
|
| | |
|
| | | private UserInfo getBossByUid(Long uid) {
|
| | | return threeSaleMapper.selectBoss(uid);
|
| | |
| | |
|
| | | return null;
|
| | | }
|
| | | |
| | |
|
| | | @IntegralGetFrequencyLimit(key = "'addShareInvite-'+#uid", time = 30)
|
| | | @Override
|
| | | public IntegralTaskRecord addShareInvite(Long uid) {
|
| | |
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelOne.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inShopLevelTwo.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.taoLiJinBuy.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelOne.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteLevelTwo.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareSingleGoods.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareMultipleGoods.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareTLJGoods.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveRebateCoupon.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveFreeCoupon.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.giveTaoLiJin.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.closeRecommendGoods.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebate.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelOne.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.couponRebateLevelTwo.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Transactional
|
| | | @Override
|
| | | public void addRebateOrder(Long uid) {
|
| | | public void addRebateOrder(Long uid, String orderNo, int sourceType) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.rebateOrder.name());
|
| | | 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);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Transactional
|
| | | @Override
|
| | | public void addInviteOrderLevelOne(Long uid) {
|
| | | public void addInviteOrderLevelOne(Long uid, String orderNo, int sourceType) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelOne.name());
|
| | | 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);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Transactional
|
| | | @Override
|
| | | public void addInviteOrderLevelTwo(Long uid) {
|
| | | public void addInviteOrderLevelTwo(Long uid, String orderNo, int sourceType) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteOrderLevelTwo.name());
|
| | | 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);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | | @IntegralGetVersionLimit(uid = "#uid")
|
| | | @RequestSerializableByKeyService(key = "#uid")
|
| | | @Async()
|
| | | @Transactional
|
| | | @Override
|
| | | public void addShareOrder(Long uid) {
|
| | | public void addShareOrder(Long uid, String orderNo, int sourceType) {
|
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.shareOrder.name());
|
| | | 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);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindWeiXin.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindPhone.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindTaoBao.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setWeiXinNum.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setGender.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setPortrait.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.setNickName.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.bindAlipay.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | try {
|
| | | addEventStatistic(uid, TaskUniqueKeyEnum.inviteActivate.name());
|
| | | } catch (Exception e) {
|
| | | //LogHelper.errorDetailInfo(e);
|
| | | // LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | }
|
| | |
|