忘记密码
This commit is contained in:
parent
423f0e1aa0
commit
2d37bde3ea
|
|
@ -27,6 +27,8 @@ public interface CustInfoMapper extends BaseMapper<CustInfo> {
|
||||||
CustInfo selectOne(CustInfo custInfo);
|
CustInfo selectOne(CustInfo custInfo);
|
||||||
int updateById(CustInfo custInfo);
|
int updateById(CustInfo custInfo);
|
||||||
|
|
||||||
|
int updateCustPwdByCustId(@Param("pwd") String pwd, @Param("custId") Long custId);
|
||||||
|
|
||||||
CustInfoVo queryCustInfoDetail(@Param("info") CustInfo info);
|
CustInfoVo queryCustInfoDetail(@Param("info") CustInfo info);
|
||||||
|
|
||||||
CustInfoVo queryCustInfo(@Param("info") CustInfoDTO info);
|
CustInfoVo queryCustInfo(@Param("info") CustInfoDTO info);
|
||||||
|
|
|
||||||
|
|
@ -497,8 +497,7 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> i
|
||||||
}
|
}
|
||||||
BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder();
|
BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder();
|
||||||
String password = bCrypt.encode(newPassword);
|
String password = bCrypt.encode(newPassword);
|
||||||
custInfo.setPwd(password);
|
custInfoMapper.updateCustPwdByCustId(password, custInfo.getCustId());
|
||||||
custInfoMapper.updateById(custInfo);
|
|
||||||
ajaxResult.put("msg", "修改成功");
|
ajaxResult.put("msg", "修改成功");
|
||||||
ajaxResult.put("code", "200");
|
ajaxResult.put("code", "200");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,12 @@
|
||||||
where cust_id = #{custId}
|
where cust_id = #{custId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateCustPwdByCustId">
|
||||||
|
update cust_info
|
||||||
|
set pwd = #{pwd}
|
||||||
|
where cust_id = #{custId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<!-- 用户详细信息,返回字段 -->
|
<!-- 用户详细信息,返回字段 -->
|
||||||
<sql id="detailInfo">
|
<sql id="detailInfo">
|
||||||
ci.cust_id,
|
ci.cust_id,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue