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 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;*/ /** * 新密码