修改密码 提出用户
This commit is contained in:
@@ -15,6 +15,7 @@ import cn.dev33.satoken.stp.SaTokenInfo;
|
||||
import cn.dev33.satoken.stp.StpLogic;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.exception.CzgException;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.List;
|
||||
@@ -43,6 +44,7 @@ public class MyStpLogic {
|
||||
|
||||
/**
|
||||
* 校验员工权限
|
||||
*
|
||||
* @param code 权限码
|
||||
*/
|
||||
public void checkStaffPermission(String code) {
|
||||
@@ -53,7 +55,7 @@ public class MyStpLogic {
|
||||
|
||||
/**
|
||||
* @param id 登录账号id
|
||||
* @param shopName 店铺名称
|
||||
* @param shopName 店铺名称
|
||||
* @param shopId 店铺id
|
||||
* @param loginType 登录类型枚举
|
||||
* @param isAdmin 是否为管理员账号
|
||||
@@ -93,6 +95,7 @@ public class MyStpLogic {
|
||||
|
||||
/**
|
||||
* 获取当前店铺用户名,仅后台可用
|
||||
*
|
||||
* @return 店铺名称
|
||||
*/
|
||||
public String getShopName() {
|
||||
@@ -113,6 +116,10 @@ public class MyStpLogic {
|
||||
Long shopId;
|
||||
int errType;
|
||||
if ("admin".equals(logic.getLoginType())) {
|
||||
if (logic.getSession() == null) {
|
||||
logout();
|
||||
throw new CzgException("请重新登录");
|
||||
}
|
||||
Object info = logic.getSession().get("shopId");
|
||||
shopId = info instanceof Long l ? l : null;
|
||||
errType = 0;
|
||||
|
||||
Reference in New Issue
Block a user