|
@ -536,16 +536,16 @@ public class UserService implements IUserService { |
|
|
auth.setIdentifier(identifier); |
|
|
auth.setIdentifier(identifier); |
|
|
auth.setCredential(credential); |
|
|
auth.setCredential(credential); |
|
|
authDao.insertSelective(auth); |
|
|
authDao.insertSelective(auth); |
|
|
// //自动添加账号密码
|
|
|
//自动添加账号密码
|
|
|
// String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR);
|
|
|
String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR); |
|
|
// SysAuth accountAuth = new SysAuth();
|
|
|
SysAuth accountAuth = new SysAuth(); |
|
|
// accountAuth.setId(snowflake.nextId());
|
|
|
accountAuth.setId(snowflake.nextId()); |
|
|
// accountAuth.setUserId(user.getId());
|
|
|
accountAuth.setUserId(user.getId()); |
|
|
// accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value);
|
|
|
accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); |
|
|
// accountAuth.setIdentifier("USER_" + accountName);
|
|
|
accountAuth.setIdentifier("USER_" + accountName); |
|
|
// accountAuth.setSalt(ShiroKit.getRandomSalt(6));
|
|
|
accountAuth.setSalt(ShiroKit.getRandomSalt(6)); |
|
|
// accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt()));
|
|
|
accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt())); |
|
|
// authDao.insertSelective(accountAuth);
|
|
|
authDao.insertSelective(accountAuth); |
|
|
|
|
|
|
|
|
return auth; |
|
|
return auth; |
|
|
} |
|
|
} |
|
@ -763,8 +763,14 @@ public class UserService implements IUserService { |
|
|
//将用户的昵称和头像复制到成员信息内
|
|
|
//将用户的昵称和头像复制到成员信息内
|
|
|
member.setAvatarUrl(user.getAvatarUrl()); |
|
|
member.setAvatarUrl(user.getAvatarUrl()); |
|
|
member.setNickname(user.getNickname()); |
|
|
member.setNickname(user.getNickname()); |
|
|
|
|
|
|
|
|
memberDao.updateByPrimaryKeySelective(member); |
|
|
memberDao.updateByPrimaryKeySelective(member); |
|
|
|
|
|
|
|
|
|
|
|
//用户关注这个项目
|
|
|
|
|
|
UserAttention attention = new UserAttention(); |
|
|
|
|
|
attention.setId(snowflake.nextId()); |
|
|
|
|
|
attention.setUserId(userId); |
|
|
|
|
|
attention.setProjectId(member.getProjectId()); |
|
|
|
|
|
userAttentionDao.insertSelective(attention); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|