aa
This commit is contained in:
@@ -1150,9 +1150,14 @@ func UpdateUserLastInfo(ctx *jxcontext.Context, storeID, brandID int) (err error
|
||||
db = dao.GetDB()
|
||||
)
|
||||
if user, err := dao.GetUserByID(db, "user_id", ctx.GetUserID()); err == nil {
|
||||
user.LastStoreID = storeID
|
||||
user.LastBrandID = brandID
|
||||
_, err = dao.UpdateEntity(db, user, "LastStoreID", "LastBrandID")
|
||||
if storeID != 0 {
|
||||
user.LastStoreID = storeID
|
||||
_, err = dao.UpdateEntity(db, user, "LastStoreID")
|
||||
}
|
||||
if brandID != 0 {
|
||||
user.LastBrandID = brandID
|
||||
_, err = dao.UpdateEntity(db, user, "LastBrandID")
|
||||
}
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user