|
@@ -13,6 +13,7 @@ import com.github.pagehelper.Page;
|
|
import com.zhongzheng.common.constant.Constants;
|
|
import com.zhongzheng.common.constant.Constants;
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
import com.zhongzheng.common.core.domain.AjaxResult;
|
|
import com.zhongzheng.common.core.domain.entity.SysUser;
|
|
import com.zhongzheng.common.core.domain.entity.SysUser;
|
|
|
|
+import com.zhongzheng.common.core.domain.model.LoginUser;
|
|
import com.zhongzheng.common.core.redis.RedisCache;
|
|
import com.zhongzheng.common.core.redis.RedisCache;
|
|
import com.zhongzheng.common.enums.UserStatus;
|
|
import com.zhongzheng.common.enums.UserStatus;
|
|
import com.zhongzheng.common.exception.BaseException;
|
|
import com.zhongzheng.common.exception.BaseException;
|
|
@@ -109,6 +110,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
@Autowired
|
|
@Autowired
|
|
private ICourseSubjectService iCourseSubjectService;
|
|
private ICourseSubjectService iCourseSubjectService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private TokenService tokenService;
|
|
|
|
+
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public UserVo queryById(Long userId) {
|
|
public UserVo queryById(Long userId) {
|
|
@@ -252,8 +256,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
public Boolean updateByEditBo(UserEditBo bo) throws IllegalAccessException {
|
|
public Boolean updateByEditBo(UserEditBo bo) throws IllegalAccessException {
|
|
User update = BeanUtil.toBean(bo, User.class);
|
|
User update = BeanUtil.toBean(bo, User.class);
|
|
validEntityBeforeUpdate(update);
|
|
validEntityBeforeUpdate(update);
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
UserUpdateAddBo userUpdateAddBo = new UserUpdateAddBo();
|
|
UserUpdateAddBo userUpdateAddBo = new UserUpdateAddBo();
|
|
|
|
+ userUpdateAddBo.setModifierName(loginUser.getUsername());
|
|
UserVo oldUser = queryById(bo.getUserId());
|
|
UserVo oldUser = queryById(bo.getUserId());
|
|
if (!StringUtils.isBlank(update.getRealname())){
|
|
if (!StringUtils.isBlank(update.getRealname())){
|
|
if(!oldUser.getRealname().equals(update.getRealname())){
|
|
if(!oldUser.getRealname().equals(update.getRealname())){
|
|
@@ -793,6 +799,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
userUpdateAddBo.setUserId(bo.getUserId());
|
|
userUpdateAddBo.setUserId(bo.getUserId());
|
|
userUpdateAddBo.setTelphone(update.getTelphone());
|
|
userUpdateAddBo.setTelphone(update.getTelphone());
|
|
if (userUpdateAddBo != null) {
|
|
if (userUpdateAddBo != null) {
|
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
+ userUpdateAddBo.setModifierName(loginUser.getUsername());
|
|
userUpdateService.insertByAddBo(userUpdateAddBo);
|
|
userUpdateService.insertByAddBo(userUpdateAddBo);
|
|
}
|
|
}
|
|
return this.updateById(update);
|
|
return this.updateById(update);
|