添加mongodb使用,添加用户前端配置的上传及获取接口
This commit is contained in:
parent
e983317f5b
commit
60b76e5377
|
|
@ -463,8 +463,6 @@ func GetUserInfoByToken(token string) (dao.User, error) {
|
|||
func GetUserUIConfigInfo(userID int) proto.UserUIConfigInfo {
|
||||
userConfig, err := dao.GetUserUIConfigInfo(userID)
|
||||
if err != nil {
|
||||
log.Println("GetUserUIConfigInfo error:", err)
|
||||
} else {
|
||||
userConfig.UserID = userID
|
||||
//没有则插入
|
||||
id, err2 := dao.CreateUserUIConfigInfo(userConfig)
|
||||
|
|
@ -474,6 +472,7 @@ func GetUserUIConfigInfo(userID int) proto.UserUIConfigInfo {
|
|||
log.Println("InsertUserUIConfigInfo success, id:", id, "config:", userConfig)
|
||||
}
|
||||
}
|
||||
userConfig, err = dao.GetUserUIConfigInfo(userID)
|
||||
return userConfig
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue