From fd577af7df6fa5f7c4b9bff5501a072d2931234b Mon Sep 17 00:00:00 2001 From: Tankaikai Date: Fri, 11 Apr 2025 17:46:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=BA=97=E9=93=BA=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=20=E2=88=9A=20=E4=B8=8B=E5=8D=95=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=BC=9A=E5=91=98=20=E2=88=9A=20=E6=B3=A8=E5=86=8C=E4=BC=9A?= =?UTF-8?q?=E5=91=98=20=E2=88=9A=20=E5=AE=8C=E5=96=84=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E5=8F=B7=20=E2=88=9A=20=E4=BC=9A=E5=91=98=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=90=8C=E6=AD=A5=20=E2=88=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/czg/sa/MyStpLogic.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 afcc9a12..722672b6 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 @@ -203,13 +203,13 @@ public class MyStpLogic { } /** - * 获取店铺会员查询主店id + * 获取适用的店铺id(主分店模式使用,若全部开启同步返回主店id。若未开启同步则返回分店id) * * @return 主店id */ - public Long getVipHeadShopId() { + public Long getUsableShopId() { Long shopId = getShopId(0L); - Long mainId = DbChain.table("tb_shop_config").select("main_id").where("id = ? and is_enable_vip_sync = ?", shopId, 1).objAs(Long.class); + Long mainId = DbChain.table("tb_shop_config").select("main_id").where("id = ? and is_enable_prod_sync = 1 and is_enable_vip_sync = 1 and is_enable_cons_sync = 1", shopId).objAs(Long.class); if (mainId != null) { return mainId; } @@ -218,6 +218,7 @@ public class MyStpLogic { /** * 获取主店id + * * @return 主店id */ public Long getHeadShopId() { @@ -231,6 +232,7 @@ public class MyStpLogic { /** * 获取主店id + * * @param shopId 店铺id * @return 主店id */ @@ -244,6 +246,7 @@ public class MyStpLogic { /** * 是否启用同步功能 + * * @param shopId 店铺id * @return 主店id */