init3.2SQLserver

highway
zhaoxiaolin 1 year ago
parent 2b7d87f36d
commit b31faa04df

@ -15,9 +15,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertLogininfor" parameterType="SysLogininfor"> <insert id="insertLogininfor" parameterType="SysLogininfor">
insert into sys_logininfor (user_name, status, ipaddr, msg, access_time) insert into sys_logininfor (user_name, status, ipaddr, msg, access_time)
values (#{userName}, #{status}, #{ipaddr}, #{msg}, sysdate()) values (#{userName}, #{status}, #{ipaddr}, #{msg}, GETDATE())
</insert> </insert>
<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult"> <select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">
select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor select info_id, user_name, ipaddr, status, msg, access_time from sys_logininfor
<where> <where>
@ -39,16 +39,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
order by info_id desc order by info_id desc
</select> </select>
<delete id="deleteLogininforByIds" parameterType="Long"> <delete id="deleteLogininforByIds" parameterType="Long">
delete from sys_logininfor where info_id in delete from sys_logininfor where info_id in
<foreach collection="array" item="infoId" open="(" separator="," close=")"> <foreach collection="array" item="infoId" open="(" separator="," close=")">
#{infoId} #{infoId}
</foreach> </foreach>
</delete> </delete>
<update id="cleanLogininfor"> <update id="cleanLogininfor">
truncate table sys_logininfor truncate table sys_logininfor
</update> </update>
</mapper> </mapper>

Loading…
Cancel
Save