Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'update' #177

Open
wants to merge 2 commits into
base: self
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/mallchat.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CREATE TABLE `item_config` (
INDEX `idx_update_time`(`update_time`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '功能物品配置表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Records of item_config
-- ----------------------------
Expand All @@ -26,6 +27,7 @@ INSERT INTO `item_config` VALUES (3, 2, 'https://cdn-icons-png.flaticon.com/512/
INSERT INTO `item_config` VALUES (4, 2, 'https://cdn-icons-png.flaticon.com/512/10232/10232583.png', '抹茶聊天前100名注册的用户才能获得的专属徽章', '2023-05-07 17:50:31.109', '2023-05-07 17:56:36.059');
INSERT INTO `item_config` VALUES (5, 2, 'https://cdn-icons-png.flaticon.com/128/2909/2909937.png', '抹茶知识星球成员的专属徽章', '2023-05-07 17:50:31.109', '2023-05-07 17:56:36.059');


-- ----------------------------
-- Table structure for message
-- ----------------------------
Expand All @@ -34,10 +36,8 @@ CREATE TABLE `message` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
`room_id` bigint(20) NOT NULL COMMENT '会话表id',
`from_uid` bigint(20) NOT NULL COMMENT '消息发送者uid',
`content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '消息内容',
`reply_msg_id` bigint(20) NULL DEFAULT NULL COMMENT '回复的消息内容',
`status` int(11) NOT NULL COMMENT '消息状态 0正常 1删除',
`gap_count` int(11) NULL DEFAULT NULL COMMENT '与回复的消息间隔多少条',


`type` int(11) NULL DEFAULT 1 COMMENT '消息类型 1正常文本 2.撤回消息',
`extra` json DEFAULT NULL COMMENT '扩展信息',
`create_time` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
Expand All @@ -49,6 +49,7 @@ CREATE TABLE `message` (
INDEX `idx_update_time`(`update_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5709 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '消息表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for message_mark
-- ----------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
@Api(tags = "聊天室相关接口")
@Slf4j
public class ChatController {

@Autowired
private ChatService chatService;
@Autowired
Expand All @@ -52,13 +53,15 @@ public class ChatController {
@ApiOperation("会话列表")
public ApiResult<CursorPageBaseResp<ChatRoomResp>> getRoomPage(@Valid CursorPageBaseReq request) {
return ApiResult.success(chatService.getRoomPage(request, RequestHolder.get().getUid()));

}

@GetMapping("/public/member/page")
@ApiOperation("群成员列表")
@FrequencyControl(time = 120, count = 10, target = FrequencyControl.Target.IP)
public ApiResult<CursorPageBaseResp<ChatMemberResp>> getMemberPage(@Valid CursorPageBaseReq request) {
black(request);

CursorPageBaseResp<ChatMemberResp> memberPage = chatService.getMemberPage(request);
filterBlackMember(memberPage);
return ApiResult.success(memberPage);
Expand Down