|
|
@@ -204,7 +204,7 @@ public class StorePlatformUserRoleServiceImpl extends ServiceImpl<StorePlatformU
|
|
|
|
|
|
if (storeUser != null) {
|
|
|
// 如果用户有 storeId 字段值,说明是主账号,不应删除
|
|
|
- if (storeUser.getStoreId() != null && storeUser.getStoreId() > 0) {
|
|
|
+ if (storeUser.getStoreId() != null && storeUser.getStoreId() > 0 || storeUser.getAccountType()==1) {
|
|
|
log.info("用户是主账号,不删除 store_user 记录: userId={}, storeId={}", userId, storeUser.getStoreId());
|
|
|
} else {
|
|
|
// 不是主账号,可以安全删除
|