This commit is contained in:
苏尹岚
2021-01-06 11:36:11 +08:00
parent 3b095fef4f
commit dbe86ab33b
7 changed files with 49 additions and 6 deletions

View File

@@ -1144,3 +1144,15 @@ func RefreshUserMemberStatus(ctx *jxcontext.Context) (err error) {
}
return err
}
func UpdateUserLastInfo(ctx *jxcontext.Context, storeID, brandID int) (err error) {
var (
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")
}
return err
}