This commit is contained in:
rosydev
2022-03-03 19:46:56 +08:00
parent 6c5416f89b
commit 9b9c44fd5d

View File

@@ -1229,6 +1229,11 @@ func UpdateUserLastInfo(ctx *jxcontext.Context, storeID, brandID int) (err error
_, err = dao.UpdateEntity(db, user, "LastStoreID")
}
// 不应该出现这种情况0表示未找到1表示找到其他值为门店ID表示锁定店铺。
if user.LastBrandID > 1 && user.LastBrandID != storeID {
brandID = 0
}
if brandID != user.LastBrandID {
user.LastBrandID = brandID
_, err = dao.UpdateEntity(db, user, "LastBrandID")