|
@@ -1,8 +1,11 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
+import com.dayaedu.cbs.common.enums.EAppKey;
|
|
|
import com.dayaedu.cbs.openfeign.client.MessageFeignClientService;
|
|
|
+import com.dayaedu.cbs.openfeign.wrapper.message.CbsMessageWrapper;
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.microsvc.toolkit.common.response.template.R;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
@@ -151,13 +154,16 @@ public class SysUserServiceImpl implements SysUserService {
|
|
|
|
|
|
@Override
|
|
|
public void imDeviceId(UserInfoWrapper.UpdateUser info) {
|
|
|
-
|
|
|
-
|
|
|
- teacherDao.updateImDeviceId(info.getImDeviceId(), info.getClient().getCode(), info.getUserId());
|
|
|
-
|
|
|
-// messageFeignClientService.
|
|
|
- messageSenderPluginContext.getMessageSenderPlugin(MessageSenderPluginContext.MessageSender.JIGUANG)
|
|
|
- .deviceRemoveAlias(info.getUserId().toString(),Lists.newArrayList(info.getImDeviceId()),info.getClient().getCode());
|
|
|
+ CbsMessageWrapper.UpdateDevice updateDevice = new CbsMessageWrapper.UpdateDevice();
|
|
|
+ updateDevice.setUserId(info.getUserId().longValue());
|
|
|
+ updateDevice.setDeviceIds(Lists.newArrayList(info.getImDeviceId()));
|
|
|
+ updateDevice.setClientType(info.getClient().getCode());
|
|
|
+ updateDevice.setAppKey(EAppKey.GYM);
|
|
|
+ R<Boolean> booleanR = messageFeignClientService.updateDevice(updateDevice);
|
|
|
+ if (booleanR != null && booleanR.feignData()) {
|
|
|
+ teacherDao.updateImDeviceId(info.getImDeviceId(), info.getClient().getCode(), info.getUserId());
|
|
|
+ }
|
|
|
+ log.error("更新用户设备信息失败,userId:{}", info.getUserId());
|
|
|
}
|
|
|
|
|
|
@Nullable
|