소스 검색

新增系统自定义模块功能

zhouhao 7 년 전
부모
커밋
11d3e907f2
19개의 변경된 파일685개의 추가작업 그리고 0개의 파일을 삭제
  1. 32 0
      hsweb-system/hsweb-system-module/hsweb-system-module-controller/pom.xml
  2. 35 0
      hsweb-system/hsweb-system-module/hsweb-system-module-controller/src/main/java/org/hswebframework/web/controller/module/ModuleController.java
  3. 27 0
      hsweb-system/hsweb-system-module/hsweb-system-module-dao/hsweb-system-module-dao-api/pom.xml
  4. 11 0
      hsweb-system/hsweb-system-module/hsweb-system-module-dao/hsweb-system-module-dao-api/src/main/java/org/hswebframework/web/dao/module/ModuleDao.java
  5. 26 0
      hsweb-system/hsweb-system-module/hsweb-system-module-dao/hsweb-system-module-dao-mybatis/pom.xml
  6. 50 0
      hsweb-system/hsweb-system-module/hsweb-system-module-dao/hsweb-system-module-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/module/ModuleMapper.xml
  7. 18 0
      hsweb-system/hsweb-system-module/hsweb-system-module-dao/pom.xml
  8. 22 0
      hsweb-system/hsweb-system-module/hsweb-system-module-entity/pom.xml
  9. 99 0
      hsweb-system/hsweb-system-module/hsweb-system-module-entity/src/main/java/org/hswebframework/web/entity/module/ModuleEntity.java
  10. 100 0
      hsweb-system/hsweb-system-module/hsweb-system-module-entity/src/main/java/org/hswebframework/web/entity/module/SimpleModuleEntity.java
  11. 26 0
      hsweb-system/hsweb-system-module/hsweb-system-module-service/hsweb-system-module-service-api/pom.xml
  12. 13 0
      hsweb-system/hsweb-system-module/hsweb-system-module-service/hsweb-system-module-service-api/src/main/java/org/hswebframework/web/service/module/ModuleService.java
  13. 26 0
      hsweb-system/hsweb-system-module/hsweb-system-module-service/hsweb-system-module-service-simple/pom.xml
  14. 35 0
      hsweb-system/hsweb-system-module/hsweb-system-module-service/hsweb-system-module-service-simple/src/main/java/org/hswebframework/web/service/module/simple/SimpleModuleService.java
  15. 18 0
      hsweb-system/hsweb-system-module/hsweb-system-module-service/pom.xml
  16. 78 0
      hsweb-system/hsweb-system-module/hsweb-system-module-starter/pom.xml
  17. 46 0
      hsweb-system/hsweb-system-module/hsweb-system-module-starter/src/main/resources/hsweb-starter.js
  18. 22 0
      hsweb-system/hsweb-system-module/pom.xml
  19. 1 0
      hsweb-system/pom.xml

+ 32 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-controller/pom.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-controller</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-module-service-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-controller</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 35 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-controller/src/main/java/org/hswebframework/web/controller/module/ModuleController.java

@@ -0,0 +1,35 @@
+package org.hswebframework.web.controller.module;
+
+import io.swagger.annotations.Api;
+import org.hswebframework.web.authorization.annotation.Authorize;
+import org.hswebframework.web.commons.entity.param.QueryParamEntity;
+import org.hswebframework.web.controller.SimpleGenericEntityController;
+import org.hswebframework.web.entity.module.ModuleEntity;
+import org.hswebframework.web.service.module.ModuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 系统自定义模块
+ *
+ * @author hsweb-generator-online
+ */
+@RestController
+@RequestMapping("${hsweb.web.mappings.module:module}")
+@Authorize(permission = "module", description = "自定义模块")
+@Api(tags = "自定义模块", value = "自定义模块")
+public class ModuleController implements SimpleGenericEntityController<ModuleEntity, String, QueryParamEntity> {
+
+    private ModuleService moduleService;
+
+    @Autowired
+    public void setModuleService(ModuleService moduleService) {
+        this.moduleService = moduleService;
+    }
+
+    @Override
+    public ModuleService getService() {
+        return moduleService;
+    }
+}

+ 27 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-dao/hsweb-system-module-dao-api/pom.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module-dao</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-dao-api</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-module-entity</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-dao-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 11 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-dao/hsweb-system-module-dao-api/src/main/java/org/hswebframework/web/dao/module/ModuleDao.java

@@ -0,0 +1,11 @@
+package org.hswebframework.web.dao.module;
+
+import org.hswebframework.web.dao.CrudDao;
+import org.hswebframework.web.entity.module.ModuleEntity;
+
+/**
+*  系统自定义模块 DAO接口
+*  @author hsweb-generator-online
+ */
+public interface ModuleDao extends CrudDao<ModuleEntity,String> {
+}

+ 26 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-dao/hsweb-system-module-dao-mybatis/pom.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module-dao</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-dao-mybatis</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-module-dao-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-dao-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 50 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-dao/hsweb-system-module-dao-mybatis/src/main/resources/org/hswebframework/web/dao/mybatis/mappers/module/ModuleMapper.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://www.mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.hswebframework.web.dao.module.ModuleDao">
+    <resultMap id="ModuleResultMap" type="org.hswebframework.web.entity.module.SimpleModuleEntity">
+              <id property="id" column="u_id" javaType="string" jdbcType="VARCHAR"/>
+            <result property="name" column="name" javaType="String" jdbcType="VARCHAR"/>
+            <result property="permissionId" column="permission_id" javaType="String" jdbcType="VARCHAR"/>
+            <result property="remark" column="remark" javaType="String" jdbcType="VARCHAR"/>
+            <result property="listMeta" column="list_meta" javaType="String" jdbcType="CLOB"/>
+            <result property="saveMeta" column="save_meta" javaType="String" jdbcType="CLOB"/>
+            <result property="status" column="status" javaType="Long" jdbcType="DECIMAL"/>
+    </resultMap>
+
+    <!--用于动态生成sql所需的配置-->
+    <sql id="config">
+        <bind name="resultMapId" value="'ModuleResultMap'"/>
+        <bind name="tableName" value="'S_MODULE_META'"/>
+    </sql>
+  
+    <insert id="insert" parameterType="org.hswebframework.web.entity.module.SimpleModuleEntity" >
+        <include refid="config"/>
+        <include refid="BasicMapper.buildInsertSql"/>
+    </insert>
+
+    <delete id="deleteByPk" parameterType="String">
+        delete from S_MODULE_META where u_id =#{id}
+    </delete>
+
+    <delete id="delete" parameterType="org.hswebframework.web.commons.entity.Entity">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildDeleteSql"/>
+    </delete>
+
+    <update id="update" parameterType="org.hswebframework.web.commons.entity.Entity">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildUpdateSql"/>
+    </update>
+
+    <select id="query" parameterType="org.hswebframework.web.commons.entity.Entity" resultMap="ModuleResultMap">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildSelectSql"/>
+    </select>
+
+    <select id="count" parameterType="org.hswebframework.web.commons.entity.Entity" resultType="int">
+        <include refid="config"/>
+        <include refid="BasicMapper.buildTotalSql"/>
+    </select>
+</mapper>

+ 18 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-dao/pom.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-dao</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>hsweb-system-module-dao-api</module>
+        <module>hsweb-system-module-dao-mybatis</module>
+    </modules>
+</project>

+ 22 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-entity/pom.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-entity</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-entity</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 99 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-entity/src/main/java/org/hswebframework/web/entity/module/ModuleEntity.java

@@ -0,0 +1,99 @@
+package org.hswebframework.web.entity.module;
+
+import org.hswebframework.web.commons.entity.GenericEntity;
+
+/**
+ * 系统自定义模块 实体
+ *
+ * @author hsweb-generator-online
+ */
+public interface ModuleEntity extends GenericEntity<String> {
+ /*-------------------------------------------
+    |               属性名常量               |
+    ===========================================*/
+    /**
+     * 名称
+     */
+    String name         = "name";
+    /**
+     * 权限id
+     */
+    String permissionId = "permissionId";
+    /**
+     * 备注
+     */
+    String remark       = "remark";
+    /**
+     * 列表配置
+     */
+    String listMeta     = "listMeta";
+    /**
+     * 保存页配置
+     */
+    String saveMeta     = "saveMeta";
+    /**
+     * 状态
+     */
+    String status       = "status";
+
+    /**
+     * @return 名称
+     */
+    String getName();
+
+    /**
+     * @param name 名称
+     */
+    void setName(String name);
+
+    /**
+     * @return 权限id
+     */
+    String getPermissionId();
+
+    /**
+     * @param permissionId 权限id
+     */
+    void setPermissionId(String permissionId);
+
+    /**
+     * @return 备注
+     */
+    String getRemark();
+
+    /**
+     * @param remark 备注
+     */
+    void setRemark(String remark);
+
+    /**
+     * @return 列表配置
+     */
+    String getListMeta();
+
+    /**
+     * @param listMeta 列表配置
+     */
+    void setListMeta(String listMeta);
+
+    /**
+     * @return 保存页配置
+     */
+    String getSaveMeta();
+
+    /**
+     * @param saveMeta 保存页配置
+     */
+    void setSaveMeta(String saveMeta);
+
+    /**
+     * @return 状态
+     */
+    Long getStatus();
+
+    /**
+     * @param status 状态
+     */
+    void setStatus(Long status);
+
+}

+ 100 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-entity/src/main/java/org/hswebframework/web/entity/module/SimpleModuleEntity.java

@@ -0,0 +1,100 @@
+package org.hswebframework.web.entity.module;
+import org.hswebframework.web.commons.entity.SimpleGenericEntity;
+
+/**
+* 系统自定义模块
+* @author hsweb-generator-online
+*/
+public class SimpleModuleEntity extends SimpleGenericEntity<String> implements ModuleEntity{
+  		//名称
+        private String name;
+  		//权限id
+        private String permissionId;
+  		//备注
+        private String remark;
+  		//列表配置
+        private String listMeta;
+  		//保存页配置
+        private String saveMeta;
+  		//状态
+        private Long status;
+
+        /**
+        * @return  名称
+        */
+        public String getName(){
+			return this.name;
+        }
+
+        /**
+        * @param  name  名称
+        */
+        public void setName(String name){
+        	this.name=name;
+        }
+        /**
+        * @return  权限id
+        */
+        public String getPermissionId(){
+			return this.permissionId;
+        }
+
+        /**
+        * @param  permissionId  权限id
+        */
+        public void setPermissionId(String permissionId){
+        	this.permissionId=permissionId;
+        }
+        /**
+        * @return  备注
+        */
+        public String getRemark(){
+			return this.remark;
+        }
+
+        /**
+        * @param  remark  备注
+        */
+        public void setRemark(String remark){
+        	this.remark=remark;
+        }
+        /**
+        * @return  列表配置
+        */
+        public String getListMeta(){
+			return this.listMeta;
+        }
+
+        /**
+        * @param  listMeta  列表配置
+        */
+        public void setListMeta(String listMeta){
+        	this.listMeta=listMeta;
+        }
+        /**
+        * @return  保存页配置
+        */
+        public String getSaveMeta(){
+			return this.saveMeta;
+        }
+
+        /**
+        * @param  saveMeta  保存页配置
+        */
+        public void setSaveMeta(String saveMeta){
+        	this.saveMeta=saveMeta;
+        }
+        /**
+        * @return  状态
+        */
+        public Long getStatus(){
+			return this.status;
+        }
+
+        /**
+        * @param  status  状态
+        */
+        public void setStatus(Long status){
+        	this.status=status;
+        }
+}

+ 26 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-service/hsweb-system-module-service-api/pom.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module-service</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-service-api</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-service-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-module-dao-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 13 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-service/hsweb-system-module-service-api/src/main/java/org/hswebframework/web/service/module/ModuleService.java

@@ -0,0 +1,13 @@
+package org.hswebframework.web.service.module;
+
+import org.hswebframework.web.entity.module.ModuleEntity;
+import org.hswebframework.web.service.CrudService;
+
+/**
+ *  系统自定义模块 服务类
+ *
+ * @author hsweb-generator-online
+ */
+public interface ModuleService extends CrudService<ModuleEntity, String> {
+
+}

+ 26 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-service/hsweb-system-module-service-simple/pom.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module-service</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-service-simple</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-commons-service-simple</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-module-service-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

+ 35 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-service/hsweb-system-module-service-simple/src/main/java/org/hswebframework/web/service/module/simple/SimpleModuleService.java

@@ -0,0 +1,35 @@
+package org.hswebframework.web.service.module.simple;
+
+import org.hswebframework.web.dao.module.ModuleDao;
+import org.hswebframework.web.entity.module.ModuleEntity;
+import org.hswebframework.web.service.EnableCacheGenericEntityService;
+import org.hswebframework.web.service.GenericEntityService;
+import org.hswebframework.web.id.IDGenerator;
+import org.hswebframework.web.service.module.ModuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheConfig;
+import org.springframework.stereotype.Service;
+
+/**
+ * 默认的服务实现
+ *
+ * @author hsweb-generator-online
+ */
+@Service("moduleService")
+@CacheConfig(cacheNames = "system-module")
+public class SimpleModuleService extends EnableCacheGenericEntityService<ModuleEntity, String>
+        implements ModuleService {
+    @Autowired
+    private ModuleDao moduleDao;
+
+    @Override
+    protected IDGenerator<String> getIDGenerator() {
+        return IDGenerator.MD5;
+    }
+
+    @Override
+    public ModuleDao getDao() {
+        return moduleDao;
+    }
+
+}

+ 18 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-service/pom.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-service</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>hsweb-system-module-service-api</module>
+        <module>hsweb-system-module-service-simple</module>
+    </modules>
+</project>

+ 78 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-starter/pom.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system-module</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module-starter</artifactId>
+
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-module-service-simple</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+      
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-module-dao-mybatis</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+      
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-system-module-controller</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>test</scope>
+        </dependency>
+      
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>1.0.26</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-spring-boot-starter</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hswebframework.web</groupId>
+            <artifactId>hsweb-tests</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>test</scope>
+        </dependency>
+      
+    </dependencies>
+</project>

+ 46 - 0
hsweb-system/hsweb-system-module/hsweb-system-module-starter/src/main/resources/hsweb-starter.js

@@ -0,0 +1,46 @@
+
+//组件信息
+var info = {
+    groupId: "${project.groupId}",
+    artifactId: "${project.artifactId}",
+    version: "${project.version}",
+    website: "https://github.com/hs-web/hsweb-framework",
+    author: "admin@hsweb.me",
+    comment: "系统自定义模块"
+};
+
+//版本更新信息
+var versions = [
+    // {
+    //     version: "3.0.2",
+    //     upgrade: function (context) {
+    //         java.lang.System.out.println("更新到3.0.2了");
+    //     }
+    // }
+];
+var JDBCType = java.sql.JDBCType;
+function install(context) {
+    var database = context.database;
+    database.createOrAlter("s_module_meta")
+        .addColumn().name("u_id").alias("id").comment("ID").jdbcType(java.sql.JDBCType.VARCHAR).length(32).primaryKey().commit()
+        .addColumn().name("name").alias("name").comment("名称").jdbcType(java.sql.JDBCType.VARCHAR).length(256).commit()
+        .addColumn().name("permission_id").alias("permissionId").comment("权限id").jdbcType(java.sql.JDBCType.VARCHAR).length(32).commit()
+        .addColumn().name("remark").alias("remark").comment("备注").jdbcType(java.sql.JDBCType.VARCHAR).length(1024).commit()
+        .addColumn().name("list_meta").alias("listMeta").comment("列表配置").jdbcType(java.sql.JDBCType.CLOB).commit()
+        .addColumn().name("save_meta").alias("saveMeta").comment("保存页配置").jdbcType(java.sql.JDBCType.CLOB).commit()
+        .addColumn().name("status").alias("status").comment("状态").jdbcType(java.sql.JDBCType.DECIMAL).length(4,0).commit()
+        .comment("系统自定义模块").commit();
+}
+//设置依赖
+dependency.setup(info)
+    .onInstall(install)
+    .onUpgrade(function (context) { //更新时执行
+        var upgrader = context.upgrader;
+        upgrader.filter(versions)
+            .upgrade(function (newVer) {
+                newVer.upgrade(context);
+            });
+    })
+    .onUninstall(function (context) { //卸载时执行
+
+    });

+ 22 - 0
hsweb-system/hsweb-system-module/pom.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>hsweb-system</artifactId>
+        <groupId>org.hswebframework.web</groupId>
+        <version>3.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>hsweb-system-module</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>hsweb-system-module-controller</module>
+        <module>hsweb-system-module-dao</module>
+        <module>hsweb-system-module-entity</module>
+        <module>hsweb-system-module-service</module>
+        <module>hsweb-system-module-starter</module>
+    </modules>
+
+</project>

+ 1 - 0
hsweb-system/pom.xml

@@ -29,6 +29,7 @@
         <module>hsweb-system-dictionary</module>
         <module>hsweb-system-oauth2-server</module>
         <module>hsweb-system-oauth2-client</module>
+        <module>hsweb-system-module</module>
     </modules>
     <artifactId>hsweb-system</artifactId>