Merge remote-tracking branch 'origin/tuoyun' into tuoyun

This commit is contained in:
Gordon
2022-01-19 12:02:55 +08:00
6 changed files with 21 additions and 14 deletions
+8 -4
View File
@@ -1,7 +1,6 @@
package base_info
import (
"Open_IM/pkg/common/db"
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
)
@@ -90,7 +89,7 @@ type CreateGroupReq struct {
}
type CreateGroupResp struct {
CommResp
GroupInfo open_im_sdk.GroupInfo `jason:-`
GroupInfo open_im_sdk.GroupInfo `json:"-"`
Data map[string]interface{} `json:"data"`
}
@@ -143,8 +142,13 @@ type QuitGroupResp struct {
}
type SetGroupInfoReq struct {
db.Group
OperationID string `json:"operationID" binding:"required"`
GroupID string `json:"groupID" binding:"required"`
GroupName string `json:"groupName"`
Notification string `json:"notification"`
Introduction string `json:"introduction"`
FaceURL string `json:"faceURL"`
Ex string `json:"ex"`
OperationID string `json:"operationID" binding:"required"`
}
type SetGroupInfoResp struct {
CommResp
+2 -2
View File
@@ -29,6 +29,6 @@ type GetSelfUserInfoReq struct {
}
type GetSelfUserInfoResp struct {
CommResp
UserInfoList *open_im_sdk.UserInfo `json:"-"`
Data []map[string]interface{} `json:"data"`
UserInfo *open_im_sdk.UserInfo `json:"-"`
Data map[string]interface{} `json:"data"`
}
+1 -1
View File
@@ -44,7 +44,7 @@ func initMysqlDB() {
db.Close()
dsn = fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local",
config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName+"test1")
config.Config.Mysql.DBUserName, config.Config.Mysql.DBPassword, config.Config.Mysql.DBAddress[0], config.Config.Mysql.DBDatabaseName)
db, err = gorm.Open("mysql", dsn)
if err != nil {
log.NewError("0", "Open failed ", err.Error(), dsn)