Merge branch 'prod' into test
This commit is contained in:
@@ -35,7 +35,6 @@ public class MyStpLogic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public enum LoginType {
|
public enum LoginType {
|
||||||
MANAGER, USER, STAFF
|
MANAGER, USER, STAFF
|
||||||
}
|
}
|
||||||
@@ -71,26 +70,29 @@ public class MyStpLogic {
|
|||||||
*/
|
*/
|
||||||
public void switchTo(boolean isMain, Long id, String account, Long shopId, String shopName, LoginType loginType, boolean isAdmin) {
|
public void switchTo(boolean isMain, Long id, String account, Long shopId, String shopName, LoginType loginType, boolean isAdmin) {
|
||||||
StpLogic logic = getLogic();
|
StpLogic logic = getLogic();
|
||||||
long headId = logic.getLoginIdAsLong();
|
|
||||||
// 设置主店id
|
|
||||||
Object mainShopId = logic.getSession().get("mainShopId");
|
|
||||||
SaSession session = logic.getSession();
|
SaSession session = logic.getSession();
|
||||||
Object parentId1 = session.get("headShopId");
|
session.set("shopId", shopId).set("shopName", shopName);
|
||||||
logic.getSaTokenDao().set(splicingKeyTokenValue(logic.getTokenValue()), id.toString(), logic.getTokenTimeout());
|
|
||||||
session = logic.getSession();
|
// long headId = logic.getLoginIdAsLong();
|
||||||
if (session == null) {
|
// // 设置主店id
|
||||||
logic.createLoginSession(id);
|
// Object mainShopId = logic.getSession().get("mainShopId");
|
||||||
session = logic.getSession();
|
//
|
||||||
}
|
// Object parentId1 = session.get("headShopId");
|
||||||
// 主店没有headShopId
|
// logic.getSaTokenDao().set(splicingKeyTokenValue(logic.getTokenValue()), id.toString(), logic.getTokenTimeout());
|
||||||
if (!isMain && parentId1 == null) {
|
// session = logic.getSession();
|
||||||
session.set("headId", headId);
|
// if (session == null) {
|
||||||
}
|
// logic.createLoginSession(id);
|
||||||
|
// session = logic.getSession();
|
||||||
session.set("userId", id).set("isAdmin", isAdmin).set("isManager", loginType.equals(LoginType.MANAGER))
|
// }
|
||||||
.set("loginType", loginType).set("account", account).set("shopId", shopId).set("shopName", shopName)
|
// // 主店没有headShopId
|
||||||
.set("isMainShop", isMain)
|
// if (!isMain && parentId1 == null) {
|
||||||
.set("mainShopId", mainShopId);
|
// session.set("headId", headId);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// session.set("userId", id).set("isAdmin", isAdmin).set("isManager", loginType.equals(LoginType.MANAGER))
|
||||||
|
// .set("loginType", loginType).set("account", account).set("shopId", shopId).set("shopName", shopName)
|
||||||
|
// .set("isMainShop", isMain)
|
||||||
|
// .set("mainShopId", mainShopId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -76,10 +76,6 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
|||||||
return Map.of("code", captcha.toBase64(), "uuid", captchaKey);
|
return Map.of("code", captcha.toBase64(), "uuid", captchaKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
System.out.println(DateUtil.format(DateUtil.date(), "HHmm"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LoginVO login(SysLoginDTO loginDTO, String platType) {
|
public LoginVO login(SysLoginDTO loginDTO, String platType) {
|
||||||
Object code = redisService.get(RedisCst.LOGIN_CODE + loginDTO.uuid());
|
Object code = redisService.get(RedisCst.LOGIN_CODE + loginDTO.uuid());
|
||||||
@@ -224,7 +220,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 主店铺切换子店铺
|
// 主店铺切换子店铺
|
||||||
if (headId != null && !shopInfo.getMainId().equals(shopId)) {
|
if (shopInfo.getMainId() != null && !shopInfo.getMainId().equals(shopId)) {
|
||||||
throw new CzgException("目标店铺非登录账号所有");
|
throw new CzgException("目标店铺非登录账号所有");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class Main {
|
|||||||
//是否生成DTO实体 默认生成
|
//是否生成DTO实体 默认生成
|
||||||
boolean isGenerateDto = true;
|
boolean isGenerateDto = true;
|
||||||
|
|
||||||
initTableEntity(packageName, tableName, author, isGenerateDto);
|
// initTableEntity(packageName, tableName, author, isGenerateDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initTableEntity(String packageName, String tableName, String author, boolean isGenerateDto) {
|
public static void initTableEntity(String packageName, String tableName, String author, boolean isGenerateDto) {
|
||||||
|
|||||||
Reference in New Issue
Block a user