|
|
@ -6,7 +6,6 @@ import cn.hutool.core.io.FileUtil;
|
|
|
|
import org.dromara.common.core.domain.R;
|
|
|
|
import org.dromara.common.core.domain.R;
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
import org.dromara.common.core.utils.file.MimeTypeUtils;
|
|
|
|
import org.dromara.common.core.utils.file.MimeTypeUtils;
|
|
|
|
import org.dromara.common.core.validate.auth.PasswordGroup;
|
|
|
|
|
|
|
|
import org.dromara.common.log.annotation.Log;
|
|
|
|
import org.dromara.common.log.annotation.Log;
|
|
|
|
import org.dromara.common.log.enums.BusinessType;
|
|
|
|
import org.dromara.common.log.enums.BusinessType;
|
|
|
|
import org.dromara.common.satoken.utils.LoginHelper;
|
|
|
|
import org.dromara.common.satoken.utils.LoginHelper;
|
|
|
@ -82,7 +81,7 @@ public class SysProfileController extends BaseController {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
|
|
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
|
|
|
@PutMapping("/updatePwd")
|
|
|
|
@PutMapping("/updatePwd")
|
|
|
|
public R<Void> updatePwd(@Validated(PasswordGroup.class) @RequestBody SysUserPasswordBo bo) {
|
|
|
|
public R<Void> updatePwd(@Validated @RequestBody SysUserPasswordBo bo) {
|
|
|
|
SysUserVo user = userService.selectUserById(LoginHelper.getUserId());
|
|
|
|
SysUserVo user = userService.selectUserById(LoginHelper.getUserId());
|
|
|
|
String password = user.getPassword();
|
|
|
|
String password = user.getPassword();
|
|
|
|
if (!BCrypt.checkpw(bo.getOldPassword(), password)) {
|
|
|
|
if (!BCrypt.checkpw(bo.getOldPassword(), password)) {
|
|
|
|