|
@@ -1,7 +1,10 @@
|
|
|
package com.yonge.cooleshow.auth.service.impl;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.google.common.collect.Lists;
|
|
|
import com.yonge.cooleshow.api.feign.AdminFeignService;
|
|
|
import com.yonge.cooleshow.auth.api.dto.*;
|
|
|
import com.yonge.cooleshow.auth.config.RongCloudConfig;
|
|
@@ -14,6 +17,7 @@ import io.rong.models.user.UserModel;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -47,6 +51,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
|
|
|
private RedissonClient redissonClient;
|
|
|
@Resource
|
|
|
private AdminFeignService adminFeignService;
|
|
|
+ // 新用户注册,默认添加官方客服联系人配置
|
|
|
+ @Value("${app.customer.service:17740683946}")
|
|
|
+ private String customerService;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, SysUser> getDAO() {
|
|
@@ -160,6 +167,13 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
|
|
|
//用户默认昵称
|
|
|
sysUser.setUsername("游客" + sysUser.getId());
|
|
|
sysUserDao.update(sysUser);
|
|
|
+
|
|
|
+ // 自动添加系统默认IM帐号为好友,并自动发送通知消息
|
|
|
+ List<String> mobileInfos = Lists.newArrayList(customerService.split(","));
|
|
|
+
|
|
|
+ //sysUserDao.
|
|
|
+
|
|
|
+
|
|
|
return queryUserInfoByPhone(phone);
|
|
|
}
|
|
|
|
|
@@ -176,6 +190,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<Long, SysUser> implement
|
|
|
//用户默认昵称
|
|
|
sysUser.setUsername("游客" + sysUser.getId());
|
|
|
sysUserDao.update(sysUser);
|
|
|
+
|
|
|
+ // 自动添加系统默认IM帐号为好友,并自动发送通知消息
|
|
|
+
|
|
|
return queryUserInfoByPhone(phone);
|
|
|
}
|
|
|
|