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