diff --git a/internal/cms_api/router.go b/internal/cms_api/router.go index 2f4273782..60f61650f 100644 --- a/internal/cms_api/router.go +++ b/internal/cms_api/router.go @@ -38,7 +38,6 @@ func NewGinRouter() *gin.Engine { { groupRouterGroup.POST("/get_groups", group.GetGroups) groupRouterGroup.POST("/get_group_members", group.GetGroupMembers) - groupRouterGroup.POST("/get_members_in_group", group.GetGroupMembers) } userRouterGroup := r2.Group("/user") { diff --git a/pkg/cms_api_struct/group.go b/pkg/cms_api_struct/group.go index 416e040b5..3427c8967 100644 --- a/pkg/cms_api_struct/group.go +++ b/pkg/cms_api_struct/group.go @@ -24,7 +24,7 @@ type GroupResponse struct { type GetGroupsRequest struct { RequestPagination - OperationID string `json:"operationID"` + OperationID string `json:"operationID" binding:"required"` } type GetGroupsResponse struct { diff --git a/pkg/common/db/model_struct.go b/pkg/common/db/model_struct.go index ba7afe19f..29486c16d 100644 --- a/pkg/common/db/model_struct.go +++ b/pkg/common/db/model_struct.go @@ -227,17 +227,17 @@ type Black struct { type ChatLog struct { ServerMsgID string `gorm:"column:server_msg_id;primary_key;type:char(64)" json:"serverMsgID"` ClientMsgID string `gorm:"column:client_msg_id;type:char(64)" json:"clientMsgID"` - SendID string `gorm:"column:send_id;type:char(64);index:search" json:"sendID"` - RecvID string `gorm:"column:recv_id;type:char(64);index:search" json:"recvID"` + SendID string `gorm:"column:send_id;type:char(64);index:send_id" json:"sendID"` + RecvID string `gorm:"column:recv_id;type:char(64);index:recv_id" json:"recvID"` SenderPlatformID int32 `gorm:"column:sender_platform_id" json:"senderPlatformID"` SenderNickname string `gorm:"column:sender_nick_name;type:varchar(255)" json:"senderNickname"` SenderFaceURL string `gorm:"column:sender_face_url;type:varchar(255)" json:"senderFaceURL"` - SessionType int32 `gorm:"column:session_type;;index:search" json:"sessionType"` + SessionType int32 `gorm:"column:session_type;;index:session_type" json:"sessionType"` MsgFrom int32 `gorm:"column:msg_from" json:"msgFrom"` - ContentType int32 `gorm:"column:content_type;index:search" json:"contentType"` + ContentType int32 `gorm:"column:content_type;index:content_type" json:"contentType"` Content string `gorm:"column:content;type:varchar(3000);index:search" json:"content"` Status int32 `gorm:"column:status" json:"status"` - SendTime time.Time `gorm:"column:send_time;index:search;priority:1" json:"sendTime"` + SendTime time.Time `gorm:"column:send_time;index:sendTime" json:"sendTime"` CreateTime time.Time `gorm:"column:create_time" json:"createTime"` Ex string `gorm:"column:ex;type:varchar(1024)" json:"ex"` }