|
@ -118,7 +118,11 @@ public class UserService extends BaseJpaService<UserDO, UserDao> {
|
|
*/
|
|
*/
|
|
public UserDO registerWithMobile(UserDO userDO) {
|
|
public UserDO registerWithMobile(UserDO userDO) {
|
|
userDO.setSalt(randomString(5));
|
|
userDO.setSalt(randomString(5));
|
|
userDO.setEnabled(1);
|
|
|
|
|
|
if (org.springframework.util.StringUtils.isEmpty(userDO.getEnabled())){
|
|
|
|
userDO.setEnabled(1);
|
|
|
|
}else {
|
|
|
|
userDO.setEnabled(userDO.getEnabled());
|
|
|
|
}
|
|
userDO.setLocked(0);
|
|
userDO.setLocked(0);
|
|
userDO.setLoginFailureCount(0);
|
|
userDO.setLoginFailureCount(0);
|
|
String password = userDO.getPassword();
|
|
String password = userDO.getPassword();
|
|
@ -464,7 +468,7 @@ public class UserService extends BaseJpaService<UserDO, UserDao> {
|
|
userDO = EntityUtils.jsonToEntity(user.toString(),UserDO.class);
|
|
userDO = EntityUtils.jsonToEntity(user.toString(),UserDO.class);
|
|
UserDO oldUser = userDao.findOne(userDO.getId());
|
|
UserDO oldUser = userDao.findOne(userDO.getId());
|
|
userDO.setPassword(oldUser.getPassword());
|
|
userDO.setPassword(oldUser.getPassword());
|
|
userDO.setSalt(randomInt(5));
|
|
|
|
|
|
userDO.setSalt(oldUser.getSalt());
|
|
userDO.setUpdateTime(new Date());
|
|
userDO.setUpdateTime(new Date());
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
result.put("msg", "convert user jsonObject to UserDO failed," + e.getCause());
|
|
result.put("msg", "convert user jsonObject to UserDO failed," + e.getCause());
|