添加Prometheus/Grafana/Loki监控配置、Promtail配置、业务与监控服务器docker-compose文件以及Bash/PowerShell服务重启脚本
43 lines
1.7 KiB
XML
43 lines
1.7 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
||
<!-- TMDB定时刮削执行记录 Mapper XML:存放复杂SQL,简单CRUD由MyBatis-Plus BaseMapper自动提供 -->
|
||
<mapper namespace="com.wangpan.common.dal.mapper.TmdbScraperLogMapper">
|
||
|
||
<!-- 插入一条执行记录 -->
|
||
<insert id="insertLog" parameterType="map">
|
||
INSERT INTO wp_tmdb_scraper_log (
|
||
trigger_type, status, total_processed, total_success, total_skipped,
|
||
total_failed, user_count, detail_json, error_message, duration_ms,
|
||
start_time, end_time
|
||
) VALUES (
|
||
#{log.triggerType}, #{log.status}, #{log.totalProcessed}, #{log.totalSuccess}, #{log.totalSkipped},
|
||
#{log.totalFailed}, #{log.userCount}, #{log.detailJson}, #{log.errorMessage}, #{log.durationMs},
|
||
#{log.startTime}, #{log.endTime}
|
||
)
|
||
</insert>
|
||
|
||
<!-- 查询执行记录总数 -->
|
||
<select id="countAll" resultType="long">
|
||
SELECT COUNT(*) FROM wp_tmdb_scraper_log
|
||
</select>
|
||
|
||
<!-- 分页查询最近的执行记录 -->
|
||
<select id="queryRecent" resultType="java.util.Map">
|
||
SELECT * FROM wp_tmdb_scraper_log ORDER BY start_time DESC
|
||
LIMIT #{pageSize} OFFSET #{offset}
|
||
</select>
|
||
|
||
<!-- 查询最近的N条执行记录 -->
|
||
<select id="queryRecentByLimit" resultType="java.util.Map">
|
||
SELECT * FROM wp_tmdb_scraper_log ORDER BY start_time DESC LIMIT #{limit}
|
||
</select>
|
||
|
||
<!-- 根据ID查询单条记录 -->
|
||
<select id="findById" resultType="java.util.Map">
|
||
SELECT * FROM wp_tmdb_scraper_log WHERE id = #{id}
|
||
</select>
|
||
|
||
</mapper>
|