提交 d5b5929e 编写于 作者: W wenxu12345

Refactor code

上级 fea89ad4
...@@ -10,6 +10,11 @@ type CommResp struct { ...@@ -10,6 +10,11 @@ type CommResp struct {
ErrMsg string `json:"errMsg"` ErrMsg string `json:"errMsg"`
} }
type CommDataResp struct {
CommResp
Data []map[string]interface{} `json:"data"`
}
type KickGroupMemberReq struct { type KickGroupMemberReq struct {
GroupID string `json:"groupID" binding:"required"` GroupID string `json:"groupID" binding:"required"`
KickedUserIDList []string `json:"kickedUserIDList" binding:"required"` KickedUserIDList []string `json:"kickedUserIDList" binding:"required"`
......
...@@ -71,7 +71,7 @@ type Group struct { ...@@ -71,7 +71,7 @@ type Group struct {
Introduction string `gorm:"column:introduction;size:255" json:"introduction"` Introduction string `gorm:"column:introduction;size:255" json:"introduction"`
FaceUrl string `gorm:"column:face_url;size:255" json:"faceUrl"` FaceUrl string `gorm:"column:face_url;size:255" json:"faceUrl"`
CreateTime time.Time `gorm:"column:create_time"` CreateTime time.Time `gorm:"column:create_time"`
Ex string `gorm:"column:ex" json:"ex;size:1024"` Ex string `gorm:"column:ex" json:"ex;size:1024" json:"ex"`
Status int32 `gorm:"column:status"` Status int32 `gorm:"column:status"`
CreatorUserID string `gorm:"column:creator_user_id;size:64"` CreatorUserID string `gorm:"column:creator_user_id;size:64"`
GroupType int32 `gorm:"column:group_type"` GroupType int32 `gorm:"column:group_type"`
......
...@@ -35,7 +35,7 @@ func initMysqlDB() { ...@@ -35,7 +35,7 @@ func initMysqlDB() {
} }
//Check the database and table during initialization //Check the database and table during initialization
sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName+"test1") sql := fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s ;", config.Config.Mysql.DBDatabaseName)
err = db.Exec(sql).Error err = db.Exec(sql).Error
if err != nil { if err != nil {
log.NewError("0", "Exec failed ", err.Error(), sql) log.NewError("0", "Exec failed ", err.Error(), sql)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册