URL访问量,用户地址,日志登录,附件上传,下载,配置文件上传
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<resultMap id="BaseResultMap" type="com.lovenav.entity.LoginLogs">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="login_ip" jdbcType="VARCHAR" property="loginIp" />
|
||||
<result column="user_id" jdbcType="TINYINT" property="userId" />
|
||||
<result column="user_id" jdbcType="INTEGER" property="userId" />
|
||||
<result column="login_time" jdbcType="TIMESTAMP" property="loginTime" />
|
||||
<result column="location" jdbcType="VARCHAR" property="location" />
|
||||
</resultMap>
|
||||
@@ -12,11 +12,17 @@
|
||||
id, login_ip, user_id, login_time, `location`
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ln_login_logs
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectAlreadyExist" resultType="com.lovenav.entity.LoginLogs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ln_login_logs
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from ln_login_logs
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
@@ -24,7 +30,7 @@
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.LoginLogs" useGeneratedKeys="true">
|
||||
insert into ln_login_logs (login_ip, user_id, login_time,
|
||||
`location`)
|
||||
values (#{loginIp,jdbcType=VARCHAR}, #{userId,jdbcType=TINYINT}, #{loginTime,jdbcType=TIMESTAMP},
|
||||
values (#{loginIp,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{loginTime,jdbcType=TIMESTAMP},
|
||||
#{location,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.LoginLogs" useGeneratedKeys="true">
|
||||
@@ -48,7 +54,7 @@
|
||||
#{loginIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=TINYINT},
|
||||
#{userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="loginTime != null">
|
||||
#{loginTime,jdbcType=TIMESTAMP},
|
||||
@@ -65,7 +71,7 @@
|
||||
login_ip = #{loginIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=TINYINT},
|
||||
user_id = #{userId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="loginTime != null">
|
||||
login_time = #{loginTime,jdbcType=TIMESTAMP},
|
||||
@@ -79,9 +85,24 @@
|
||||
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.LoginLogs">
|
||||
update ln_login_logs
|
||||
set login_ip = #{loginIp,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=TINYINT},
|
||||
user_id = #{userId,jdbcType=INTEGER},
|
||||
login_time = #{loginTime,jdbcType=TIMESTAMP},
|
||||
`location` = #{location,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByUserId" parameterType="com.lovenav.entity.LoginLogs">
|
||||
update ln_login_logs
|
||||
<set>
|
||||
<if test="loginIp != null">
|
||||
login_ip = #{loginIp,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="loginTime != null">
|
||||
login_time = #{loginTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="location != null">
|
||||
`location` = #{location,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where user_id = #{userId,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Reference in New Issue
Block a user