Merge remote-tracking branch 'origin/master'

master
river 4 years ago
commit 54dd50431f
  1. 4
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/dao/UserLoginDao.java
  2. 7
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  3. 7
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml
  4. 4
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/UpdatePwdRequest.java

@ -33,4 +33,8 @@ public interface UserLoginDao extends BaseMapper<UserEntity> {
Integer countWeChatId(String weChatId);
String getNameByUserId(Long userId);
UserEntity selectByManagerId();
int updateManagePassword(String newMD5);
}

@ -228,7 +228,8 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
}
//根据手机号查询相关信息
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<UserLoginDao, UserEntity>
}
String newMD5 = Md5Util.md5(user.getNewPwd()+userEntity.getId());
//根据手机号码修改密码
int i = userLoginDao.updatePasswordByPhoneAccount(user.getPhoneAccount(),newMD5);
//修改平台超管密码
int i = userLoginDao.updateManagePassword(newMD5);
return i > 0;
}

@ -66,5 +66,12 @@
<select id="getNameByUserId" parameterType="long" resultType="string">
SELECT `name` FROM hrms_employee WHERE user_id = #{userId}
</select>
<select id="selectByManagerId" resultType="com.daqing.framework.domain.hrms.UserEntity">
select * from hrms_user where id=1
</select>
<update id="updateManagePassword">
update hrms_user set password = #{password} where id=1
</update>
</mapper>

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

Loading…
Cancel
Save