This repository has been archived on 2025-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
copy-kamanote/src/main/resources/mapper/StatisticMapper.xml
LingandRX 8150192b1b feat(model): 新增实体类和相关功能
- 新增 Category、Collection、Comment 等实体类
- 实现笔记查询、分类、收藏、评论等功能
- 添加 Markdown 解析工具类
- 新增用户点赞和收藏功能
- 实现问题查询和统计功能
2025-03-27 21:20:23 +08:00

23 lines
955 B
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">
<mapper namespace="com.example.copykamanotes.mapper.StatisticMapper">
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
INSERT INTO statistic (login_count, register_count, total_register_count, note_count, submit_note_count,
total_note_count, date)
VALUES (#{loginCount}, #{registerCount}, #{totalRegisterCount}, #{noteCount}, #{submitNoteCount},
#{totalNoteCount}, #{date})
</insert>
<select id="countStatistic" resultType="integer">
SELECT COUNT(*)
FROM statistic
</select>
<select id="findByPage" resultType="com.example.copykamanotes.model.entity.Statistic">
SELECT *
FROM statistic
ORDER BY date DESC
LIMIT #{limit} OFFSET #{offset}
</select>
</mapper>