|
|
@@ -25,6 +25,7 @@ import com.ydtech.modules.esm.service.EsmUserReferrerService;
|
|
|
import com.ydtech.security.utils.PasswordUtils;
|
|
|
import com.ydtech.utils.StringUtils;
|
|
|
import com.ydtech.utils.idgen.IdGenerate;
|
|
|
+import net.sf.jsqlparser.parser.feature.Feature;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -427,15 +428,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
@Transactional
|
|
|
public HttpResult updateUserInfo(String userId, SysUser2Vo sysUserVo) {
|
|
|
SysUser sysUser = sysUserVo.getSysUser();
|
|
|
- //处理密码
|
|
|
- if (StringUtils.isNotEmpty(sysUser.getPassword())) {
|
|
|
+ //修改用户不能修改密码
|
|
|
+ /*if (StringUtils.isNotEmpty(sysUser.getPassword())) {
|
|
|
String salt = PasswordUtils.getSalt();
|
|
|
String pwd = PasswordUtils.encode(sysUser.getPassword(), salt);
|
|
|
sysUser.setPassword(pwd);
|
|
|
sysUser.setSalt(salt);
|
|
|
} else {
|
|
|
return HttpResult.error("密码不能为空");
|
|
|
- }
|
|
|
+ }*/
|
|
|
//删除状态必须有离司时间
|
|
|
if(StringUtils.isNotEmpty(sysUser.getStatus().toString())){
|
|
|
if(sysUser.getStatus()==0&& sysUser.getLogoutTime()==null){
|
|
|
@@ -444,8 +445,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
}else{
|
|
|
return HttpResult.error("状态不能为空");
|
|
|
}
|
|
|
+ SysUser sysUser_org =findByUserId(sysUser.getId());
|
|
|
+ sysUser.setPassword(sysUser_org.getPassword());
|
|
|
+ sysUser.setSalt(sysUser_org.getSalt());
|
|
|
updateById(sysUser);
|
|
|
|
|
|
+
|
|
|
//角色配置
|
|
|
SysUserRole userRole = new SysUserRole();
|
|
|
userRole.setUserId(userId);
|