From 27cd042df9aca0383a49f3514bc21958dd890912 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 29 六月 2026 15:42:23 +0800
Subject: [PATCH] 银川 1.联调产品维护页面 2.添加IM即时通讯模块

---
 src/api/im/group/request/index.ts |   90 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 0 deletions(-)

diff --git a/src/api/im/group/request/index.ts b/src/api/im/group/request/index.ts
new file mode 100644
index 0000000..09eaf24
--- /dev/null
+++ b/src/api/im/group/request/index.ts
@@ -0,0 +1,90 @@
+import { requestClient } from '#/api/request';
+
+export namespace ImGroupRequestApi {
+  /** IM 鍔犵兢鐢宠 Response VO */
+  export interface GroupRequestRespVO {
+    id: number; // 鐢宠缂栧彿
+    groupId: number; // 缇ょ紪鍙�
+    userId: number; // 鐢宠浜� / 琚個璇蜂汉鐢ㄦ埛缂栧彿
+    inviterUserId?: number; // 閭�璇蜂汉锛汵ULL 琛ㄧず鐢ㄦ埛涓诲姩鐢宠
+    handleResult: number; // 澶勭悊缁撴灉锛�0=鏈鐞嗭紱1=鍚屾剰锛�2=鎷掔粷
+    applyContent?: string; // 鐢宠鐞嗙敱
+    handleContent?: string; // 澶勭悊鐞嗙敱锛堟嫆缁濇椂鍙�夊~锛�
+    handleUserId?: number; // 澶勭悊浜虹敤鎴风紪鍙�
+    addSource?: number; // 鍔犲叆鏉ユ簮锛涘弬瑙� ImGroupAddSourceEnum
+    handleTime?: string; // 澶勭悊鏃堕棿
+    createTime: string; // 鐢宠鍒涘缓鏃堕棿
+    updateTime?: number; // 鏈�杩戞洿鏂版椂闂达紙姣鏃堕棿鎴筹紝澧為噺鎷夊彇娓告爣鐢級
+    userNickname?: string; // 鐢宠浜� / 琚個璇蜂汉鏄电О
+    userAvatar?: string; // 鐢宠浜� / 琚個璇蜂汉澶村儚
+    inviterNickname?: string; // 閭�璇蜂汉鏄电О
+    inviterAvatar?: string; // 閭�璇蜂汉澶村儚
+    groupName?: string; // 缇ゅ悕绉�
+    groupAvatar?: string; // 缇ゅご鍍�
+  }
+
+  /** IM 鍔犵兢鐢宠鍙戣捣 Request VO */
+  export interface GroupRequestApplyReqVO {
+    groupId: number; // 缇ょ紪鍙�
+    applyContent?: string; // 鐢宠鐞嗙敱
+    addSource?: number; // 鍔犲叆鏉ユ簮
+  }
+}
+
+
+/** 鐢宠鍔犵兢 */
+export function applyJoinGroup(data: ImGroupRequestApi.GroupRequestApplyReqVO) {
+  return requestClient.post<null | number>('/im/group-request/apply', data);
+}
+
+/** 鍚屾剰鍔犵兢鐢宠锛堢兢涓绘垨绠$悊鍛橈級 */
+export function agreeGroupRequest(id: number | string) {
+  return requestClient.put<boolean>('/im/group-request/agree', undefined, {
+    params: { id },
+  });
+}
+
+/** 鎷掔粷鍔犵兢鐢宠锛堢兢涓绘垨绠$悊鍛橈級 */
+export function refuseGroupRequest(
+  id: number | string,
+  handleContent?: string,
+) {
+  return requestClient.put<boolean>('/im/group-request/refuse', undefined, {
+    params: { id, handleContent },
+  });
+}
+
+/** 鏌ヨ銆屾垜绠$悊鐨勬墍鏈夌兢銆嶄笅鐨勬湭澶勭悊鍔犵兢鐢宠鍒楄〃锛堜笉鍒嗛〉锛夛紱鍓嶇 store 鎹娲剧敓妯箙绾㈢偣 + Drawer 鍒楄〃 */
+export function getUnhandledRequestList() {
+  return requestClient.get<ImGroupRequestApi.GroupRequestRespVO[]>(
+    '/im/group-request/unhandled-list',
+  );
+}
+
+/** 鏌ヨ鎸囧畾缇や笅鐨勫叏閮ㄥ姞缇ょ敵璇凤紙鍚凡澶勭悊锛夛紱浠呯兢涓� / 绠$悊鍛樺彲鏌� */
+export function getGroupRequestListByGroupId(groupId: number) {
+  return requestClient.get<ImGroupRequestApi.GroupRequestRespVO[]>(
+    '/im/group-request/list-by-group',
+    { params: { groupId } },
+  );
+}
+
+/** 鎸� id 鍗曟煡鐢宠璁板綍锛堝甫瓒婃潈杩囨护锛沇ebSocket 閫氱煡鍒拌揪鍚庣敤锛� */
+export function getMyGroupRequest(id: number) {
+  return requestClient.get<ImGroupRequestApi.GroupRequestRespVO | null>(
+    '/im/group-request/get',
+    { params: { id } },
+  );
+}
+
+/** 澧為噺鎷夊彇鎴戠鐞嗙殑鎵�鏈夌兢涓嬪姞缇ょ敵璇峰彉鏇达紙閲嶈繛 / 绂荤嚎琛ュ伩锛� */
+export function pullMyGroupRequestList(params: {
+  lastId?: number;
+  lastUpdateTime?: number;
+  limit: number;
+}) {
+  return requestClient.get<ImGroupRequestApi.GroupRequestRespVO[]>(
+    '/im/group-request/pull',
+    { params },
+  );
+}

--
Gitblit v1.9.3