|
|
@@ -3,25 +3,21 @@
|
|
|
|
|
|
<mapper namespace="cn.reghao.tnb.account.app.db.mapper.LoginAttemptsMapper">
|
|
|
<insert id="save">
|
|
|
- insert into msg_login_attempts
|
|
|
+ insert into user_login_attempts
|
|
|
(`login_id`,`user_id`,`login_type`,`user_agent`,`login_ip`,`login_at`,`plat`,`remember_me`,`success`)
|
|
|
values
|
|
|
- (#{loginId},#{userId},#{loginType},#{userAgent},#{loginIp},#{loginAt},#{plat},#{rememberMe},`success`)
|
|
|
+ (#{loginId},#{userId},#{loginType},#{userAgent},#{loginIp},#{loginAt},#{plat},#{rememberMe},#{success})
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateSetFailed">
|
|
|
- update msg_login_attempts
|
|
|
+ update user_login_attempts
|
|
|
set update_time=now(),`success`=0
|
|
|
where login_id=#{loginId}
|
|
|
</update>
|
|
|
|
|
|
- <select id="findAll" resultType="cn.reghao.tnb.account.app.model.po.LoginAttempts">
|
|
|
- select *
|
|
|
- from msg_login_attempts
|
|
|
- </select>
|
|
|
<select id="findByLoginIds" resultType="cn.reghao.tnb.account.app.model.po.LoginAttempts">
|
|
|
select *
|
|
|
- from msg_login_attempts
|
|
|
+ from user_login_attempts
|
|
|
where login_id in
|
|
|
<foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
|
|
|
#{id}
|
|
|
@@ -29,7 +25,7 @@
|
|
|
</select>
|
|
|
<select id="findByUserId" resultType="cn.reghao.tnb.account.app.model.po.LoginAttempts">
|
|
|
select *
|
|
|
- from msg_login_attempts
|
|
|
+ from user_login_attempts
|
|
|
where user_id=#{userId}
|
|
|
limit #{pageSize}
|
|
|
</select>
|