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 {
|
if req.SetLogoSelected == 1 {
|
||||||
|
|
||||||
var userInfo = &gmodel.FsUserInfo{}
|
var userInfo = &gmodel.FsUserInfo{}
|
||||||
BuilderDB := tx.Model(&gmodel.FsUserInfo{}).Where("module = ?", "profile")
|
BuilderDB := tx.Model(&gmodel.FsUserInfo{}).Where("module = ?", module)
|
||||||
if userId > 0 {
|
if userId > 0 {
|
||||||
BuilderDB.Where("user_id=?", userId)
|
BuilderDB.Where("user_id=?", userId)
|
||||||
} else {
|
} else {
|
||||||
|
@ -152,6 +152,7 @@ func (l *UserLogoSetLogic) UserLogoSet(req *types.UserLogoSetReq, userinfo *auth
|
||||||
userInfo.Utime = &nowTime
|
userInfo.Utime = &nowTime
|
||||||
if userInfo.Id == 0 {
|
if userInfo.Id == 0 {
|
||||||
// 新增
|
// 新增
|
||||||
|
userInfo.Module = &module
|
||||||
resCreate := tx.Model(&userInfo).Create(&userInfo)
|
resCreate := tx.Model(&userInfo).Create(&userInfo)
|
||||||
err = resCreate.Error
|
err = resCreate.Error
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user