租户库共库分表实现

This commit is contained in:
richjohnrambo
2026-09-23 09:36:17 +08:00
parent 137d6fb6da
commit 7c1fab5065
4 changed files with 131 additions and 27 deletions
+9 -8
View File
@@ -196,7 +196,7 @@ func (a *audit) run() {
a.testHTTP("5", "5.qr-resolve", "二维码解析", "POST", "/v1/im/qrcodes/resolve", map[string]any{"token": a.meQR, "purpose": a.meQRPurpose}, a.tokenB, true, []int{200}, nil)
}
a.testHTTP("6", "6.create", "创建群", "POST", "/v1/im/groups", map[string]any{"name": "联调群" + suffix, "description": "自动化测试群", "member_user_ids": []string{a.userB}, "avatar_file_id": ""}, a.tokenA, true, []int{200}, func(r imResp) string {
a.testHTTP("6", "6.create", "创建群", "POST", "/v1/im/groups", map[string]any{"name": "auditgroup" + suffix, "description": "audit group", "member_user_ids": []string{a.userB}, "avatar_file_id": ""}, a.tokenA, true, []int{200}, func(r imResp) string {
a.groupTopic = asString(r.Data["topic"])
a.groupVer = asInt(r.Data["version"])
return fmt.Sprintf("topic=%s version=%d", a.groupTopic, a.groupVer)
@@ -446,13 +446,14 @@ func (a *audit) wsRegister(username, phone, password, challenge, verification st
accID := "acc-" + username
secret := base64.StdEncoding.EncodeToString([]byte(username + ":" + password))
err = conn.WriteJSON(map[string]any{"acc": map[string]any{
"id": accID,
"user": "new",
"scheme": "basic",
"username": username,
"phone": phone,
"secret": secret,
"login": true,
"id": accID,
"user": "new",
"scheme": "basic",
"username": username,
"phone": phone,
"registration_type": 1,
"secret": secret,
"login": true,
"cred": []map[string]any{{
"meth": "tel",
"val": phone,