From b508824cc7dc915e4431f8bdceaaa65c9af4ea1d Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 8 Jan 2021 18:15:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=B6=85=E7=AE=A1?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/daqing/financial/hrauth/dao/UserLoginDao.java | 4 ++++ .../hrauth/service/impl/UserLoginServiceImpl.java | 7 ++++--- .../src/main/resources/mapper/hrauth/UserLoginMapper.xml | 7 +++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java index 943c3b31..b44a3cfa 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java @@ -33,4 +33,8 @@ public interface UserLoginDao extends BaseMapper { Integer countWeChatId(String weChatId); String getNameByUserId(Long userId); + + UserEntity selectByManagerId(); + + int updateManagePassword(String newMD5); } diff --git a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java index b609d259..3b69347c 100644 --- a/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java +++ b/dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java @@ -228,7 +228,8 @@ public class UserLoginServiceImpl extends ServiceImpl } //根据手机号查询相关信息 - UserEntity userEntity = baseMapper.selectByPhoneAccount(user.getPhoneAccount()); + //UserEntity userEntity = baseMapper.selectByPhoneAccount(user.getPhoneAccount()); + UserEntity userEntity=baseMapper.selectByManagerId(); if(userEntity == null){ ExceptionCast.cast(HrmsCode.PHNOE_ACCOUNT_NOT_EXIST); } @@ -249,8 +250,8 @@ public class UserLoginServiceImpl extends ServiceImpl } String newMD5 = Md5Util.md5(user.getNewPwd()+userEntity.getId()); - //根据手机号码修改密码 - int i = userLoginDao.updatePasswordByPhoneAccount(user.getPhoneAccount(),newMD5); + //修改平台超管密码 + int i = userLoginDao.updateManagePassword(newMD5); return i > 0; } diff --git a/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml b/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml index 958a9e0a..911d06f8 100644 --- a/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml +++ b/dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml @@ -66,5 +66,12 @@ + + + + update hrms_user set password = #{password} where id=1 + \ No newline at end of file From 3ea7dda55ec9bf93f6b14d03bb31d00b0fdc503a Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 8 Jan 2021 18:38:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=B6=85=E7=AE=A1?= =?UTF-8?q?=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/domain/hrms/request/UpdatePwdRequest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/UpdatePwdRequest.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/UpdatePwdRequest.java index 7edf7463..35ea677f 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/UpdatePwdRequest.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/UpdatePwdRequest.java @@ -19,8 +19,8 @@ public class UpdatePwdRequest implements Serializable { /** * 手机账号 */ - @Pattern(regexp = "^1(3\\d|4[5-8]|5[0-35-9]|6[567]|7[01345-8]|8\\d|9[025-9])\\d{8}$",message = "手机号格式不正确!") - private String phoneAccount; +/* @Pattern(regexp = "^1(3\\d|4[5-8]|5[0-35-9]|6[567]|7[01345-8]|8\\d|9[025-9])\\d{8}$",message = "手机号格式不正确!") + private String phoneAccount;*/ /** * 新密码