|
|
|
@ -1,8 +1,9 @@
|
|
|
|
|
package com.ibeetl.admin.core.web;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import com.ibeetl.admin.core.conf.PasswordConfig.PasswordEncryptService;
|
|
|
|
|
import com.ibeetl.admin.core.dao.CoreUserDao;
|
|
|
|
|
import com.ibeetl.admin.core.dao.CoreUserRoleDao;
|
|
|
|
|
import com.ibeetl.admin.core.entity.CoreOrg;
|
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
@ -41,6 +42,8 @@ public class CoreUserController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
CoreUserService userService;
|
|
|
|
|
@Autowired
|
|
|
|
|
CoreUserDao coreUserDao;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
HttpRequestLocal httpRequestLocal;
|
|
|
|
@ -151,9 +154,12 @@ public class CoreUserController {
|
|
|
|
|
coreUser.setJobType1(null);
|
|
|
|
|
coreUser.setId(null);
|
|
|
|
|
|
|
|
|
|
// 包含用户密码拷贝
|
|
|
|
|
BeanUtil.copyProperties(coreUser, user);
|
|
|
|
|
userService.update(user);
|
|
|
|
|
coreUser.setId(user.getId());
|
|
|
|
|
String password = coreUser.getPassword();
|
|
|
|
|
if (ObjectUtil.isNotEmpty(password)) {
|
|
|
|
|
coreUser.setPassword(passwordEncryptService.password(password));
|
|
|
|
|
}
|
|
|
|
|
coreUserDao.updateTemplateById(coreUser);
|
|
|
|
|
return JsonResult.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|