|
@@ -667,7 +667,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
inertData.setCreateTime(DateUtils.getNowTime());
|
|
|
inertData.setUpdateTime(DateUtils.getNowTime());
|
|
|
// String pwd = ToolsUtils.getSmsCode(); // 随机密码
|
|
|
- String pwd = bo.getIdcard().substring(bo.getIdcard().length() - 6);
|
|
|
+ String pwd = "";
|
|
|
+ if (ObjectUtils.isNotNull(bo.getIdcard())){
|
|
|
+ pwd = bo.getIdcard().substring(bo.getIdcard().length() - 6);
|
|
|
+ }else {
|
|
|
+ pwd = bo.getIdcard().substring(bo.getTel().length() - 6);
|
|
|
+ }
|
|
|
inertData.setPassword(SecurityUtils.encryptPassword(pwd));
|
|
|
if(!save(inertData)){
|
|
|
throw new CustomException("注册失败");
|