- 新增 Category、Collection、Comment 等实体类 - 实现笔记查询、分类、收藏、评论等功能 - 添加 Markdown 解析工具类 - 新增用户点赞和收藏功能 - 实现问题查询和统计功能
23 lines
955 B
XML
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>
|