切换店铺统计 √
下单选择会员 √ 注册会员 √ 完善手机号 √ 会员流水信息同步 √
This commit is contained in:
@@ -16,6 +16,7 @@ import cn.dev33.satoken.stp.StpLogic;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.mybatisflex.core.row.DbChain;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -57,12 +58,13 @@ public class MyStpLogic {
|
||||
|
||||
/**
|
||||
* 身份切换
|
||||
* @param id 用户id
|
||||
* @param account 账户名
|
||||
* @param shopId 店铺id
|
||||
* @param shopName 店铺名称
|
||||
*
|
||||
* @param id 用户id
|
||||
* @param account 账户名
|
||||
* @param shopId 店铺id
|
||||
* @param shopName 店铺名称
|
||||
* @param loginType 登录类型
|
||||
* @param isAdmin 是否管理员
|
||||
* @param isAdmin 是否管理员
|
||||
*/
|
||||
public void switchTo(boolean isMain, Long id, String account, Long shopId, String shopName, LoginType loginType, boolean isAdmin) {
|
||||
StpLogic logic = getLogic();
|
||||
@@ -113,7 +115,6 @@ public class MyStpLogic {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前登录账号名称 管理端为用户账号 客户端为openId
|
||||
*
|
||||
@@ -137,6 +138,7 @@ public class MyStpLogic {
|
||||
|
||||
/**
|
||||
* 获取主店铺id
|
||||
*
|
||||
* @return id
|
||||
*/
|
||||
public Long getHeadId() {
|
||||
@@ -200,6 +202,19 @@ public class MyStpLogic {
|
||||
return shopId == null ? defaultVal : shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主店id
|
||||
* @return 主店id
|
||||
*/
|
||||
public Long getHeadShopId() {
|
||||
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);
|
||||
if (mainId != null) {
|
||||
return mainId;
|
||||
}
|
||||
return shopId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验是否为管理端登录
|
||||
*/
|
||||
@@ -941,9 +956,6 @@ public class MyStpLogic {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void endSwitch() {
|
||||
getLogic().endSwitch();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user