|
@@ -1,5 +1,14 @@
|
|
|
package com.ym.mec.auth.service.impl;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
import com.ym.mec.auth.api.dto.SysUserInfo;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.auth.api.enums.SysUserType;
|
|
@@ -14,14 +23,7 @@ import com.ym.mec.common.entity.ImUserModel;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.im.ImFeignService;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
+import com.ym.mec.user.UserFeignService;
|
|
|
|
|
|
@Service
|
|
|
public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implements SysUserService {
|
|
@@ -37,6 +39,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem
|
|
|
|
|
|
@Autowired
|
|
|
private ImFeignService imFeignService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private UserFeignService userFeignService;
|
|
|
|
|
|
@Value("${message.autoRegister}")
|
|
|
private boolean autoRegister;
|
|
@@ -166,7 +171,9 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem
|
|
|
sysUser.setPhone(phone);
|
|
|
sysUser.setUserType(SysUserType.STUDENT);
|
|
|
sysUserDao.insert(sysUser);
|
|
|
+ //添加用户现金账户
|
|
|
imFeignService.register(new ImUserModel(sysUser.getId().toString(),phone,null));
|
|
|
+ userFeignService.createCashAccount(sysUser.getId());
|
|
|
return queryUserInfoByPhone(phone);
|
|
|
}
|
|
|
throw new UsernameNotFoundException("404.9");
|