fix:设置当前logo
This commit is contained in:
parent
7abcfadd93
commit
bf9c6c9386
|
@ -109,11 +109,11 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
var module = "profile"
|
||||
if req.SetLogoSelected == 1 {
|
||||
|
||||
var userInfo = &gmodel.FsUserInfo{}
|
||||
BuilderDB := tx.Model(&gmodel.FsUserInfo{}).Where("module = ?", "profile")
|
||||
BuilderDB := tx.Model(&gmodel.FsUserInfo{}).Where("module = ?", module)
|
||||
if userId > 0 {
|
||||
BuilderDB.Where("user_id=?", userId)
|
||||
} else {
|
||||
|
@ -152,6 +152,7 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
|
|||
userInfo.Utime = &nowTime
|
||||
if userInfo.Id == 0 {
|
||||
// 新增
|
||||
userInfo.Module = &module
|
||||
resCreate := tx.Model(&userInfo).Create(&userInfo)
|
||||
err = resCreate.Error
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user