进出日志后台查询;小程序端进门;导出表格时日期转换
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cxyxiaomo.epp.access.dao.AccessLogDao">
|
||||
<insert id="addAccessLog" parameterType="com.cxyxiaomo.epp.common.pojo.AccessLog">
|
||||
INSERT INTO access_log (id, time, user_id, user_real_name, gate_id, type)
|
||||
VALUES (#{id}, #{time}, #{userId}, #{userRealName}, #{gateId}, #{type})
|
||||
</insert>
|
||||
|
||||
<update id="updateAccessLog" parameterType="com.cxyxiaomo.epp.common.pojo.AccessLog">
|
||||
UPDATE access_log
|
||||
<set>
|
||||
<if test="time != null">time = #{time},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userRealName != null and userRealName != ''">user_real_name = #{userRealName},</if>
|
||||
<if test="gateId != null">gate_id = #{gateId},</if>
|
||||
<if test="type != null and type != ''">type = #{type}</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getAccessLogList" resultType="com.cxyxiaomo.epp.common.pojo.AccessLog">
|
||||
SELECT * FROM access_log
|
||||
<where>
|
||||
1 = 1
|
||||
<if test="id != null">
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
AND time BETWEEN from_unixtime(#{startTime}/1000) AND from_unixtime(#{endTime}/1000)
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
AND user_id = #{userId}
|
||||
</if>
|
||||
<if test="userRealName != null and userRealName != ''">
|
||||
AND user_real_name LIKE concat('%',#{userRealName},'%')
|
||||
</if>
|
||||
<if test="gateId != null">
|
||||
AND gate_id = #{gateId}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND type = #{type}
|
||||
</if>
|
||||
</where>
|
||||
order by time desc
|
||||
</select>
|
||||
|
||||
<delete id="deleteAccessLogById">
|
||||
DELETE
|
||||
FROM access_log
|
||||
WHERE id = #{id}
|
||||
</delete>
|
||||
</mapper>
|
@@ -29,7 +29,7 @@
|
||||
AND id = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND name = #{name}
|
||||
AND name LIKE concat('%',#{name,jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="open != null">
|
||||
AND open = #{open}
|
||||
|
@@ -68,7 +68,7 @@ function updateQRCode() {
|
||||
|
||||
if (i % refreshTime == 0) {
|
||||
// scene 最长支支持 32 位,所以这里不传入时间戳
|
||||
let scene = encodeURIComponent(`guard&${window.currentGate.id}`); // &${Date.now()}
|
||||
let scene = encodeURIComponent(`guard;${window.currentGate.id}`); // &${Date.now()}
|
||||
image.src = `${url}?page=${page}&scene=${scene}&envVersion=${envVersion}&width=${width}&autoColor=${autoColor}&isHyaline=${isHyaline}`
|
||||
console.log(image.src)
|
||||
refreshTimeCountDown.innerHTML = ` `
|
||||
|
Reference in New Issue
Block a user