admin
2019-11-23 51a4ff5d777028d52a19c314a99f796334cb7b51
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/ThreeSaleSerivceImpl.java
@@ -37,6 +37,7 @@
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.rocketmq.MQMsgBodyFactory;
import com.yeshi.fanli.util.rocketmq.MQTopicName;
import net.sf.json.JSONArray;
@@ -603,13 +604,9 @@
   private void inviteSuccess(Long bossId, Long workerId, ThreeSale threeSale) {
      // 邀请消息
      UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(bossId);
      if (activeLog != null) {
         if (VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
               activeLog.getVersionCode())) { // 2.0.2版本以上
            userInviteMsgNotificationService.inviteSuccess2_0_2(bossId, threeSale);
         } else { // 最初消息
            userInviteMsgNotificationService.inviteSuccess(threeSale.getBoss().getId(), threeSale);
         }
      if (activeLog != null && VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
            activeLog.getVersionCode())) { // 2.1版本以上
         userInviteMsgNotificationService.inviteSuccess2_1(bossId, threeSale);
      } else { // 最初消息
         userInviteMsgNotificationService.inviteSuccess(threeSale.getBoss().getId(), threeSale);
      }
@@ -622,8 +619,8 @@
         }
      });
      UserInviteMQMsg msg = new UserInviteMQMsg(bossId, workerId, null, new Date(), UserInviteMQMsg.STATE_SUCCESS);
      Message message = new Message(MQTopicName.TOPIC_USER.name(), UserTopicTagEnum.inviteSuccess.name(),
            new Gson().toJson(msg).getBytes());
      Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.inviteSuccess,
            msg);
      producer.send(message);
   }