feat(count): 新增笔记和用户计数相关数据结构和服务

- 新增笔记收藏表(NoteCollectionDO)及相关Mapper和服务实现
- 新增笔记计数表(NoteCountDO)及相关Mapper和服务实现
- 新增笔记点赞表(NoteLikeDO)及相关Mapper和服务实现
- 新增用户计数表(UserCountDO)及相关Mapper和服务实现
- 配置RedisTemplate以支持JSON格式序列化
- 引入RocketMQ依赖并配置自动装配
- 在count模块中添加Redis和RocketMQ相关配置类
This commit is contained in:
2025-10-15 19:26:18 +08:00
parent 893f52e5aa
commit 3904e8510e
24 changed files with 502 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
<?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.hanserwei.hannote.count.biz.domain.mapper.NoteCountDOMapper">
<resultMap id="BaseResultMap" type="com.hanserwei.hannote.count.biz.domain.dataobject.NoteCountDO">
<!--@mbg.generated-->
<!--@Table t_note_count-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="note_id" jdbcType="BIGINT" property="noteId" />
<result column="like_total" jdbcType="BIGINT" property="likeTotal" />
<result column="collect_total" jdbcType="BIGINT" property="collectTotal" />
<result column="comment_total" jdbcType="BIGINT" property="commentTotal" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, note_id, like_total, collect_total, comment_total
</sql>
</mapper>

View File

@@ -0,0 +1,19 @@
<?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.hanserwei.hannote.count.biz.domain.mapper.UserCountDOMapper">
<resultMap id="BaseResultMap" type="com.hanserwei.hannote.count.biz.domain.dataobject.UserCountDO">
<!--@mbg.generated-->
<!--@Table t_user_count-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="fans_total" jdbcType="BIGINT" property="fansTotal" />
<result column="following_total" jdbcType="BIGINT" property="followingTotal" />
<result column="note_total" jdbcType="BIGINT" property="noteTotal" />
<result column="like_total" jdbcType="BIGINT" property="likeTotal" />
<result column="collect_total" jdbcType="BIGINT" property="collectTotal" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, user_id, fans_total, following_total, note_total, like_total, collect_total
</sql>
</mapper>