From 776cb09e23c5b168aa1a1053a87beec7be351755 Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Fri, 26 Jul 2024 19:51:12 +0800
Subject: [PATCH 1/4] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E5=85=A8=E5=B1=80=E6=8E=A7=E5=88=B6=E7=94=A8=E6=88=B7=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E9=A6=96=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
关联 #[1209375258017792]后端-全局控制用户默认首页 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1209375258017792
---
.../auth/label/HOME_PAGE_MODIFY.java | 42 +++++
.../framework/dao/mapper/HomePageMapper.java | 61 +++++++
.../framework/dao/mapper/HomePageMapper.xml | 162 ++++++++++++++++++
.../neatlogic/framework/dto/HomePageVo.java | 109 ++++++++++++
.../homepage/HomePageNameRepeatException.java | 26 +++
.../homepage/HomePageNotFoundException.java | 31 ++++
6 files changed, 431 insertions(+)
create mode 100644 src/main/java/neatlogic/framework/auth/label/HOME_PAGE_MODIFY.java
create mode 100644 src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.java
create mode 100644 src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.xml
create mode 100644 src/main/java/neatlogic/framework/dto/HomePageVo.java
create mode 100644 src/main/java/neatlogic/framework/exception/homepage/HomePageNameRepeatException.java
create mode 100644 src/main/java/neatlogic/framework/exception/homepage/HomePageNotFoundException.java
diff --git a/src/main/java/neatlogic/framework/auth/label/HOME_PAGE_MODIFY.java b/src/main/java/neatlogic/framework/auth/label/HOME_PAGE_MODIFY.java
new file mode 100644
index 000000000..12ecd5b26
--- /dev/null
+++ b/src/main/java/neatlogic/framework/auth/label/HOME_PAGE_MODIFY.java
@@ -0,0 +1,42 @@
+/*Copyright (C) 2023 深圳极向量科技有限公司 All Rights Reserved.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .*/
+
+package neatlogic.framework.auth.label;
+
+import neatlogic.framework.auth.core.AuthBase;
+
+public class HOME_PAGE_MODIFY extends AuthBase {
+
+ @Override
+ public String getAuthDisplayName() {
+ return "首页设置管理权限";
+ }
+
+ @Override
+ public String getAuthIntroduction() {
+ return "对首页设置添加、修改和删除";
+ }
+
+ @Override
+ public String getAuthGroup() {
+ return "framework";
+ }
+
+ @Override
+ public Integer getSort() {
+ return 100;
+ }
+
+}
diff --git a/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.java b/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.java
new file mode 100644
index 000000000..af53ab959
--- /dev/null
+++ b/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.dao.mapper;
+
+import neatlogic.framework.common.dto.BasePageVo;
+import neatlogic.framework.dto.AuthenticationInfoVo;
+import neatlogic.framework.dto.AuthorityVo;
+import neatlogic.framework.dto.HomePageVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface HomePageMapper {
+
+ int checkHomePageNameIsRepeat(HomePageVo homePage);
+
+ HomePageVo getHomePageById(Long id);
+
+ int getHomePageCount(BasePageVo basePageVo);
+
+ List getHomePageList(BasePageVo basePageVo);
+
+ List getHomePageAuthorityListByHomePageId(Long homePageId);
+
+ Integer getMaxSort();
+
+ List getHomePageIdListByAuthority(AuthenticationInfoVo authenticationInfoVo);
+
+ HomePageVo getMinSortHomePageByIdList(List idList);
+
+ int insertHomePage(HomePageVo homePage);
+
+ int insertHomePageAuthority(@Param("homePageId") Long homePageId, @Param("authorityVo") AuthorityVo authorityVo);
+
+ int updateHomePageSortById(HomePageVo homePageVo);
+
+ void updateHomePageIsActiveById(Long id);
+
+ int updateSortDecrement(@Param("fromSort")Integer fromSort, @Param("toSort")Integer toSort);
+
+ int updateSortIncrement(@Param("fromSort")Integer fromSort, @Param("toSort")Integer toSort);
+
+ int deleteHomePageById(Long id);
+
+ int deleteHomePageAuthorityByHomePageId(Long homePageId);
+}
diff --git a/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.xml b/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.xml
new file mode 100644
index 000000000..21e6ed336
--- /dev/null
+++ b/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.xml
@@ -0,0 +1,162 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ INSERT INTO `home_page` (`id`, `name`, `is_active`, `sort`, `config`)
+ VALUES (#{id}, #{name}, #{isActive}, #{sort}, #{configStr})
+ ON DUPLICATE KEY
+ UPDATE `config` = #{configStr},
+ `is_active` = #{isActive}
+
+
+
+ INSERT INTO `home_page_authority` (`home_page_id`, `type`, `uuid`)
+ VALUES (#{homePageId}, #{authorityVo.type}, #{authorityVo.uuid})
+
+
+
+ UPDATE `home_page` SET `sort` = #{sort} WHERE `id` = #{id}
+
+
+
+ UPDATE `home_page` SET `is_active` = 1 - `is_active` WHERE `id` = #{id}
+
+
+
+ update `home_page` SET `sort` = `sort` + 1
+ WHERE `sort` >= #{fromSort}
+
+ AND `sort` <= #{toSort}
+
+
+
+
+ update `home_page` SET `sort` = `sort` - 1
+ WHERE `sort` >= #{fromSort}
+
+ AND `sort` <= #{toSort}
+
+
+
+
+ DELETE FROM `home_page` WHERE `id` = #{value}
+
+
+
+ DELETE FROM `home_page_authority` WHERE `home_page_id` = #{value}
+
+
\ No newline at end of file
diff --git a/src/main/java/neatlogic/framework/dto/HomePageVo.java b/src/main/java/neatlogic/framework/dto/HomePageVo.java
new file mode 100644
index 000000000..47ec9ba30
--- /dev/null
+++ b/src/main/java/neatlogic/framework/dto/HomePageVo.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.dto;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.annotation.JSONField;
+import neatlogic.framework.util.SnowflakeUtil;
+
+import java.util.List;
+
+public class HomePageVo {
+ private Long id;
+
+ private String name;
+
+ private Integer isActive;
+
+ private Integer sort;
+
+ private JSONObject config;
+
+ @JSONField(serialize = false)
+ private String configStr;
+
+ private List authorityList;
+
+ public Long getId() {
+ if (id == null) {
+ id = SnowflakeUtil.uniqueLong();
+ }
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Integer getIsActive() {
+ return isActive;
+ }
+
+ public void setIsActive(Integer isActive) {
+ this.isActive = isActive;
+ }
+
+ public Integer getSort() {
+ if (sort == null) {
+ sort = 0;
+ }
+ return sort;
+ }
+
+ public void setSort(Integer sort) {
+ this.sort = sort;
+ }
+
+ public JSONObject getConfig() {
+ if (config == null && configStr != null) {
+ config = JSONObject.parseObject(configStr);
+ }
+ return config;
+ }
+
+ public void setConfig(JSONObject config) {
+ this.config = config;
+ }
+
+ public String getConfigStr() {
+ if (configStr == null && config != null) {
+ configStr = config.toJSONString();
+ }
+ return configStr;
+ }
+
+ public void setConfigStr(String configStr) {
+ this.configStr = configStr;
+ }
+
+ public List getAuthorityList() {
+ return authorityList;
+ }
+
+ public void setAuthorityList(List authorityList) {
+ this.authorityList = authorityList;
+ }
+}
diff --git a/src/main/java/neatlogic/framework/exception/homepage/HomePageNameRepeatException.java b/src/main/java/neatlogic/framework/exception/homepage/HomePageNameRepeatException.java
new file mode 100644
index 000000000..5c2d97e4f
--- /dev/null
+++ b/src/main/java/neatlogic/framework/exception/homepage/HomePageNameRepeatException.java
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.exception.homepage;
+
+import neatlogic.framework.exception.core.ApiRuntimeException;
+
+public class HomePageNameRepeatException extends ApiRuntimeException {
+ public HomePageNameRepeatException(String name) {
+ super("首页配置:“{0}”已存在", name);
+ }
+}
diff --git a/src/main/java/neatlogic/framework/exception/homepage/HomePageNotFoundException.java b/src/main/java/neatlogic/framework/exception/homepage/HomePageNotFoundException.java
new file mode 100644
index 000000000..dd6e98f21
--- /dev/null
+++ b/src/main/java/neatlogic/framework/exception/homepage/HomePageNotFoundException.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2024 深圳极向量科技有限公司 All Rights Reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package neatlogic.framework.exception.homepage;
+
+import neatlogic.framework.exception.core.ApiRuntimeException;
+
+public class HomePageNotFoundException extends ApiRuntimeException {
+
+ public HomePageNotFoundException(Long id) {
+ super("首页配置:“{0}”不存在", id);
+ }
+
+ public HomePageNotFoundException(String name) {
+ super("首页配置:“{0}”不存在", name);
+ }
+}
--
Gitee
From 6340c47ebfe294fd0beabdd1216c4210c6dce981 Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Mon, 29 Jul 2024 17:54:21 +0800
Subject: [PATCH 2/4] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E5=85=A8=E5=B1=80=E6=8E=A7=E5=88=B6=E7=94=A8=E6=88=B7=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E9=A6=96=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
关联 #[1209375258017792]后端-全局控制用户默认首页 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1209375258017792
---
.../neatlogic/framework/dao/mapper/HomePageMapper.xml | 3 ++-
src/main/java/neatlogic/framework/dto/HomePageVo.java | 11 +++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.xml b/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.xml
index 21e6ed336..fd04f2dab 100644
--- a/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.xml
+++ b/src/main/java/neatlogic/framework/dao/mapper/HomePageMapper.xml
@@ -107,7 +107,8 @@
`sort`,
`config` AS configStr
FROM `home_page`
- WHERE `id` IN
+ WHERE `is_active` = 1
+ AND `id` IN
#{id}
diff --git a/src/main/java/neatlogic/framework/dto/HomePageVo.java b/src/main/java/neatlogic/framework/dto/HomePageVo.java
index 47ec9ba30..23bf6dddd 100644
--- a/src/main/java/neatlogic/framework/dto/HomePageVo.java
+++ b/src/main/java/neatlogic/framework/dto/HomePageVo.java
@@ -17,6 +17,7 @@
package neatlogic.framework.dto;
+import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import neatlogic.framework.util.SnowflakeUtil;
@@ -39,6 +40,8 @@ public class HomePageVo {
private List authorityList;
+ private JSONArray authorityVoList;
+
public Long getId() {
if (id == null) {
id = SnowflakeUtil.uniqueLong();
@@ -106,4 +109,12 @@ public class HomePageVo {
public void setAuthorityList(List authorityList) {
this.authorityList = authorityList;
}
+
+ public JSONArray getAuthorityVoList() {
+ return authorityVoList;
+ }
+
+ public void setAuthorityVoList(JSONArray authorityVoList) {
+ this.authorityVoList = authorityVoList;
+ }
}
--
Gitee
From c1ea1e4c388d44d282d756fa93eaea59906f657b Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Mon, 29 Jul 2024 18:09:33 +0800
Subject: [PATCH 3/4] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E5=85=A8=E5=B1=80=E6=8E=A7=E5=88=B6=E7=94=A8=E6=88=B7=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E9=A6=96=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
关联 #[1209375258017792]后端-全局控制用户默认首页 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1209375258017792
---
.../framework/auth/label/HOME_PAGE_MODIFY.java | 4 ++--
.../java/neatlogic/framework/dto/HomePageVo.java | 15 +++++++++------
.../homepage/HomePageNameRepeatException.java | 2 +-
.../homepage/HomePageNotFoundException.java | 4 ++--
4 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/main/java/neatlogic/framework/auth/label/HOME_PAGE_MODIFY.java b/src/main/java/neatlogic/framework/auth/label/HOME_PAGE_MODIFY.java
index 12ecd5b26..89a12d68f 100644
--- a/src/main/java/neatlogic/framework/auth/label/HOME_PAGE_MODIFY.java
+++ b/src/main/java/neatlogic/framework/auth/label/HOME_PAGE_MODIFY.java
@@ -21,12 +21,12 @@ public class HOME_PAGE_MODIFY extends AuthBase {
@Override
public String getAuthDisplayName() {
- return "首页设置管理权限";
+ return "nfal.home_page_modify.getauthdisplayname";
}
@Override
public String getAuthIntroduction() {
- return "对首页设置添加、修改和删除";
+ return "nfal.home_page_modify.getauthintroduction";
}
@Override
diff --git a/src/main/java/neatlogic/framework/dto/HomePageVo.java b/src/main/java/neatlogic/framework/dto/HomePageVo.java
index 23bf6dddd..ffc1da5fe 100644
--- a/src/main/java/neatlogic/framework/dto/HomePageVo.java
+++ b/src/main/java/neatlogic/framework/dto/HomePageVo.java
@@ -20,26 +20,29 @@ package neatlogic.framework.dto;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
+import neatlogic.framework.common.constvalue.ApiParamType;
+import neatlogic.framework.restful.annotation.EntityField;
import neatlogic.framework.util.SnowflakeUtil;
import java.util.List;
public class HomePageVo {
+ @EntityField(name = "common.id", type = ApiParamType.LONG)
private Long id;
-
+ @EntityField(name = "common.name", type = ApiParamType.STRING)
private String name;
-
+ @EntityField(name = "common.isactive", type = ApiParamType.INTEGER)
private Integer isActive;
-
+ @EntityField(name = "common.sort", type = ApiParamType.INTEGER)
private Integer sort;
-
+ @EntityField(name = "common.config", type = ApiParamType.STRING)
private JSONObject config;
@JSONField(serialize = false)
private String configStr;
-
+ @EntityField(name = "common.authoritylist", type = ApiParamType.JSONARRAY)
private List authorityList;
-
+ @EntityField(name = "common.authoritylist", type = ApiParamType.JSONARRAY)
private JSONArray authorityVoList;
public Long getId() {
diff --git a/src/main/java/neatlogic/framework/exception/homepage/HomePageNameRepeatException.java b/src/main/java/neatlogic/framework/exception/homepage/HomePageNameRepeatException.java
index 5c2d97e4f..ab887dfa8 100644
--- a/src/main/java/neatlogic/framework/exception/homepage/HomePageNameRepeatException.java
+++ b/src/main/java/neatlogic/framework/exception/homepage/HomePageNameRepeatException.java
@@ -21,6 +21,6 @@ import neatlogic.framework.exception.core.ApiRuntimeException;
public class HomePageNameRepeatException extends ApiRuntimeException {
public HomePageNameRepeatException(String name) {
- super("首页配置:“{0}”已存在", name);
+ super("nfeh.homepagenamerepeatexception.homepagenamerepeatexception", name);
}
}
diff --git a/src/main/java/neatlogic/framework/exception/homepage/HomePageNotFoundException.java b/src/main/java/neatlogic/framework/exception/homepage/HomePageNotFoundException.java
index dd6e98f21..d310aa12b 100644
--- a/src/main/java/neatlogic/framework/exception/homepage/HomePageNotFoundException.java
+++ b/src/main/java/neatlogic/framework/exception/homepage/HomePageNotFoundException.java
@@ -22,10 +22,10 @@ import neatlogic.framework.exception.core.ApiRuntimeException;
public class HomePageNotFoundException extends ApiRuntimeException {
public HomePageNotFoundException(Long id) {
- super("首页配置:“{0}”不存在", id);
+ super("nfeh.homepagenotfoundexception.homepagenotfoundexception", id);
}
public HomePageNotFoundException(String name) {
- super("首页配置:“{0}”不存在", name);
+ super("nfeh.homepagenotfoundexception.homepagenotfoundexception", name);
}
}
--
Gitee
From 7b10797f3a488b33b8799251c0bafcf810c11fbc Mon Sep 17 00:00:00 2001
From: "1437892690@qq.com" <1437892690@qq.com>
Date: Tue, 30 Jul 2024 09:48:41 +0800
Subject: [PATCH 4/4] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=90=8E=E7=AB=AF-?=
=?UTF-8?q?=E5=85=A8=E5=B1=80=E6=8E=A7=E5=88=B6=E7=94=A8=E6=88=B7=E9=BB=98?=
=?UTF-8?q?=E8=AE=A4=E9=A6=96=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
关联 #[1209375258017792]后端-全局控制用户默认首页 http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1209375258017792
---
.../changelog/2024-07-30/neatlogic_tenant.sql | 15 +++++++++++++
.../changelog/2024-07-30/version.json | 10 +++++++++
.../resources/framework/sqlscript/ddl.sql | 22 +++++++++++++++++++
3 files changed, 47 insertions(+)
create mode 100644 src/main/resources/neatlogic/resources/framework/changelog/2024-07-30/neatlogic_tenant.sql
create mode 100644 src/main/resources/neatlogic/resources/framework/changelog/2024-07-30/version.json
diff --git a/src/main/resources/neatlogic/resources/framework/changelog/2024-07-30/neatlogic_tenant.sql b/src/main/resources/neatlogic/resources/framework/changelog/2024-07-30/neatlogic_tenant.sql
new file mode 100644
index 000000000..d93bf40fa
--- /dev/null
+++ b/src/main/resources/neatlogic/resources/framework/changelog/2024-07-30/neatlogic_tenant.sql
@@ -0,0 +1,15 @@
+CREATE TABLE IF NOT EXISTS `home_page` (
+ `id` bigint NOT NULL COMMENT 'ID',
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
+ `is_active` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用',
+ `sort` int NOT NULL COMMENT '排序',
+ `config` longtext COLLATE utf8mb4_general_ci NOT NULL COMMENT '配置',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT = '首页设置表';
+
+CREATE TABLE IF NOT EXISTS `home_page_authority` (
+ `home_page_id` bigint NOT NULL COMMENT '首页ID',
+ `type` enum('common','user','team','role') COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
+ `uuid` char(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID',
+ PRIMARY KEY (`home_page_id`,`type`,`uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='首页设置授权表';
\ No newline at end of file
diff --git a/src/main/resources/neatlogic/resources/framework/changelog/2024-07-30/version.json b/src/main/resources/neatlogic/resources/framework/changelog/2024-07-30/version.json
new file mode 100644
index 000000000..139f297a9
--- /dev/null
+++ b/src/main/resources/neatlogic/resources/framework/changelog/2024-07-30/version.json
@@ -0,0 +1,10 @@
+{
+ "content":[
+ {
+ "type":"新增功能",
+ "detail":[
+ {"msg":"1.全局控制用户默认首页"}
+ ]
+ }
+ ]
+}
diff --git a/src/main/resources/neatlogic/resources/framework/sqlscript/ddl.sql b/src/main/resources/neatlogic/resources/framework/sqlscript/ddl.sql
index d86782841..65db70dcb 100644
--- a/src/main/resources/neatlogic/resources/framework/sqlscript/ddl.sql
+++ b/src/main/resources/neatlogic/resources/framework/sqlscript/ddl.sql
@@ -1318,3 +1318,25 @@ CREATE TABLE IF NOT EXISTS `user_session_content` (
`content` text COLLATE utf8mb4_general_ci COMMENT '信息',
PRIMARY KEY (`hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户会话';
+
+-- ----------------------------
+-- Table structure for home_page
+-- ----------------------------
+CREATE TABLE IF NOT EXISTS `home_page` (
+ `id` bigint NOT NULL COMMENT 'ID',
+ `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
+ `is_active` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否启用',
+ `sort` int NOT NULL COMMENT '排序',
+ `config` longtext COLLATE utf8mb4_general_ci NOT NULL COMMENT '配置',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT = '首页设置表';
+
+-- ----------------------------
+-- Table structure for home_page_authority
+-- ----------------------------
+CREATE TABLE IF NOT EXISTS `home_page_authority` (
+ `home_page_id` bigint NOT NULL COMMENT '首页ID',
+ `type` enum('common','user','team','role') COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
+ `uuid` char(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID',
+ PRIMARY KEY (`home_page_id`,`type`,`uuid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='首页设置授权表';
\ No newline at end of file
--
Gitee