| | |
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleExtraInfoSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteMsgNotificationService;
|
| | | import com.yeshi.fanli.service.manger.msg.RocketMQManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.rocketmq.MQMsgBodyFactory;
|
| | |
| | | @Resource(name = "taskExecutor")
|
| | | private TaskExecutor executor;
|
| | |
|
| | | @Resource(name = "producer")
|
| | | private Producer producer;
|
| | | @Resource
|
| | | private RocketMQManager rocketMQManager;
|
| | |
|
| | | public UserInfo getBoss(final long uid) {
|
| | | return threeSaleMapper.selectBoss(uid);
|
| | |
| | | */
|
| | | @Transactional
|
| | | private void inviteSuccess(Long workerId, Long bossId) {
|
| | | // 同步粉丝消息
|
| | | teamFansInfoService.addFansInfo(workerId, bossId, new Date());
|
| | | |
| | | if (!Constant.IS_TEST) {
|
| | | UserInviteMQMsg msg = new UserInviteMQMsg(bossId, workerId, null, new Date(),
|
| | | UserInviteMQMsg.STATE_SUCCESS);
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.inviteSuccess, msg);
|
| | | producer.send(message);
|
| | | message.setStartDeliverTime(java.lang.System.currentTimeMillis() + 5000);
|
| | | rocketMQManager.sendNormalMsg(message,5000L, null);
|
| | | }
|
| | |
|
| | | executor.execute(new Runnable() {
|
| | |
| | | public void run() {
|
| | | try { // 邀请金币
|
| | | integralGetService.addInviteLevelOne(bossId, workerId);
|
| | | } catch (Exception e) {
|
| | | LogHelper.error(e);
|
| | | }
|
| | | |
| | | // 同步粉丝消息
|
| | | try {
|
| | | teamFansInfoService.addFansInfo(workerId, bossId, new Date());
|
| | | } catch (Exception e) {
|
| | | LogHelper.error(e);
|
| | | }
|