---bug
This commit is contained in:
@@ -1223,23 +1223,16 @@ 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 {
|
||||
//不带参数进入的店铺,品牌值为0
|
||||
if storeID == 0 || storeID == 102919 {
|
||||
//本次与上次不同时再更新
|
||||
if storeID != user.LastStoreID {
|
||||
user.LastStoreID = storeID
|
||||
if user.LastBrandID > 1 {
|
||||
user.LastBrandID = 0
|
||||
}
|
||||
} else { //带参数进入的店铺
|
||||
user.LastStoreID = storeID
|
||||
if storeID == model.MatterStoreID { //物料店比较特殊
|
||||
user.LastBrandID = 1
|
||||
} else {
|
||||
user.LastBrandID = storeID
|
||||
}
|
||||
|
||||
_, err = dao.UpdateEntity(db, user, "LastStoreID")
|
||||
}
|
||||
|
||||
if brandID != user.LastBrandID {
|
||||
user.LastBrandID = brandID
|
||||
_, err = dao.UpdateEntity(db, user, "LastBrandID")
|
||||
}
|
||||
_, err = dao.UpdateEntity(db, user, "LastStoreID")
|
||||
_, err = dao.UpdateEntity(db, user, "LastBrandID")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user