切换店铺统计 √

下单选择会员 √
注册会员 √
完善手机号 √
会员流水信息同步 √
This commit is contained in:
Tankaikai
2025-04-11 11:45:04 +08:00
parent efb833e8f0
commit be61a9dfea
2 changed files with 20 additions and 3 deletions

View File

@@ -303,9 +303,13 @@ public class ProductController {
public CzgResult<Void> sync() {
long shopId = StpKit.USER.getShopId(0L);
long sysUserId = StpKit.USER.getLoginIdAsLong();
long headShopId = StpKit.USER.getVipHeadShopId();
if(shopId == headShopId){
throw new CzgException("不存在主店分店关系,无需同步");
boolean isEnableSync = StpKit.USER.isEnableSync(shopId);
long headShopId = StpKit.USER.getHeadShopId();
if (!isEnableSync) {
throw new CzgException("主店未开启商品资料同步功能");
}
if (shopId == headShopId) {
throw new CzgException("不存在主子店铺关系,无需同步商品信息");
}
ThreadUtil.execAsync(() -> {
shopSyncService.sync(headShopId, shopId, sysUserId);