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