diff --git a/cash-common/cash-common-sa-token/src/main/java/com/czg/sa/MyStpLogic.java b/cash-common/cash-common-sa-token/src/main/java/com/czg/sa/MyStpLogic.java index 989f0d34..6e35d28e 100644 --- a/cash-common/cash-common-sa-token/src/main/java/com/czg/sa/MyStpLogic.java +++ b/cash-common/cash-common-sa-token/src/main/java/com/czg/sa/MyStpLogic.java @@ -112,10 +112,13 @@ public class MyStpLogic { if (shopId != null) { session.set("shopId", shopId); } - if (!isMainShop) { - session.set("headShopId", headShopId); + + if (headShopId != null) { + if (!isMainShop) { + session.set("headShopId", headShopId); + } + session.set("mainShopId", headShopId); } - session.set("mainShopId", headShopId); if (shopName != null) { session.set("shopName", shopName); }