feat: 新增IM联系我们字典配置,优化用户搜索与邀请绑定功能

1. 优化IM用户列表搜索逻辑,支持长数字用户ID精确匹配
2. 修复前端雪花ID精度丢失问题,改用字符串传输用户ID
3. 新增邀请码批量绑定用户功能,支持搜索绑定指定用户
4. 新增字典配置接口,新增联系我们字典SQL脚本
5. 完善字典数据变更事件推送,优化弹窗关闭与页面刷新逻辑
This commit is contained in:
Austin
2026-09-21 13:11:08 +08:00
parent 0381984939
commit b4174a6412
12 changed files with 215 additions and 10 deletions
@@ -76,6 +76,7 @@ type ImInviteBatchCreateInp struct {
ExpiresAt *gtime.Time `json:"expiresAt" v:"required#到期时间不能为空" dc:"到期时间"`
Remark string `json:"remark" dc:"备注"`
IdempotencyKey string `json:"idempotencyKey" dc:"幂等键"`
UserId int64 `json:"userId" dc:"绑定C端用户ID,非必填,>0时为批次内所有邀请码绑定该用户"`
}
func (in *ImInviteBatchCreateInp) Filter(ctx context.Context) (err error) {
@@ -92,6 +93,9 @@ func (in *ImInviteBatchCreateInp) Filter(ctx context.Context) (err error) {
if len(in.IdempotencyKey) == 0 || len(in.IdempotencyKey) > 128 {
return gerror.New("批量生成必须提供不超过128个字符的幂等键")
}
if in.UserId < 0 {
return gerror.New("绑定用户ID不合法")
}
return
}
+1 -1
View File
@@ -18,7 +18,7 @@ import (
type ImUserListInp struct {
form.PageReq
TenantId int64 `json:"tenantId" dc:"租户ID"`
UserId string `json:"userId" dc:"后台展示编号"`
UserId string `json:"userId" dc:"用户ID(长数字)或后台展示编号"`
GroupId int64 `json:"groupId" dc:"用户策略分组ID"`
Keyword string `json:"keyword" dc:"用户名、昵称、手机号或编号"`
Nickname string `json:"nickname" dc:"昵称"`