| | |
| | | import com.yeshi.fanli.entity.integral.IntegralTaskClass;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskClass.UniqueKeyEnum;
|
| | | import com.yeshi.fanli.entity.integral.IntegralTaskRecord;
|
| | | import com.yeshi.fanli.entity.system.ConfigKeyEnum;
|
| | | import com.yeshi.fanli.exception.integral.IntegralTaskRecordException;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
| | | return totalGoldCoin + (userInfoExtra.getGoldCoin() == null ? 0 : userInfoExtra.getGoldCoin());
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public boolean addDetail(Long uid, IntegralTaskRecord record) throws IntegralTaskRecordException {
|
| | | Long uid2 = record.getUid();
|
| | | if (uid2 == null || uid.longValue() != uid2.longValue())
|
| | |
| | | return integralTaskRecordMapper.countGetCountByTaskIdAndDay(taskId, uid, minTime, maxTime);
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor=Exception.class)
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public IntegralTaskRecord addRecord(IntegralTaskRecord record) throws IntegralTaskRecordException {
|
| | | if (record == null)
|
| | |
| | | // 设置有效期
|
| | | record.setEndTime(DateUtil.plusDayDate(Constant.GOLD_COIN_VALID_DAYS, date));
|
| | | integralTaskRecordMapper.insertSelective(record);
|
| | | |
| | | // long count = integralTaskRecordMapper.getTotalGoldCoinByUid(record.getUid());
|
| | | // if (count >= 200) {// 大于200发送消息
|
| | | // IntegralTaskMQMsg msg = new IntegralTaskMQMsg(record.getUid(), count, new Date());
|
| | | // Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.integralTaskFinish,
|
| | | // msg);
|
| | | // producer.send(message);
|
| | | // }
|
| | |
|
| | | return record;
|
| | | }
|
| | |
|
| | |
| | | if (uid == null || originUid == null)
|
| | | return;
|
| | |
|
| | | String reward = configService.get("first_order_reward_boss");
|
| | | String reward = configService.get(ConfigKeyEnum.firstOrderRewardBoss.getKey());
|
| | | if (StringUtil.isNullOrEmpty(reward))
|
| | | return;
|
| | | firstOrderReward(uid, originUid, Integer.parseInt(reward), "一", beizu);
|
| | |
| | | if (uid == null || originUid == null)
|
| | | return;
|
| | |
|
| | | String reward = configService.get("first_order_reward_boss_super");
|
| | | String reward = configService.get(ConfigKeyEnum.firstOrderRewardBossSuper.getKey());
|
| | | if (StringUtil.isNullOrEmpty(reward))
|
| | | return;
|
| | | firstOrderReward(uid, originUid, Integer.parseInt(reward), "二", beizu);
|
| | |
| | | if (uid == null)
|
| | | return;
|
| | |
|
| | | String reward = configService.get("first_share_order_reward");
|
| | | String reward = configService.get(ConfigKeyEnum.firstShareOrderReward.getKey());
|
| | | if (StringUtil.isNullOrEmpty(reward))
|
| | | return;
|
| | | firstOrderReward(uid, null, Integer.parseInt(reward), null, beizu);
|
| | |
| | | if (uid == null || originUid == null)
|
| | | return;
|
| | |
|
| | | String reward = configService.get("first_share_order_reward_boss");
|
| | | String reward = configService.get(ConfigKeyEnum.firstShareOrderRewardBoss.getKey());
|
| | | if (StringUtil.isNullOrEmpty(reward))
|
| | | return;
|
| | | firstOrderReward(uid, originUid, Integer.parseInt(reward), "一", beizu);
|
| | |
| | | msgOther.setSource("首笔分享订单,系统奖励金币 ");
|
| | | msgOther.setExplain("首笔分享订单得到的奖金不足0.01元时奖励 ");
|
| | | } else {
|
| | | msgOther.setSource(level + "级队员首次下单,系统奖励金币 ");
|
| | | msgOther.setExplain("仅新邀请队员首下单你得到的奖金不足0.01元时奖励 ");
|
| | | if (level.equalsIgnoreCase("一") || level.equalsIgnoreCase("1"))
|
| | | msgOther.setSource("直接粉丝首次下单,系统奖励金币 ");
|
| | | else
|
| | | msgOther.setSource("间接粉丝首次下单,系统奖励金币 ");
|
| | | msgOther.setExplain("仅新邀请粉丝首下单你得到的奖金不足0.01元时奖励 ");
|
| | | }
|
| | | userOtherMsgNotificationService.firstOrderRewardMsg(uid, null, msgOther);
|
| | | }
|