diff --git a/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/dao/institution/IInstitutionDao.java b/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/dao/institution/IInstitutionDao.java
index e5a720e..9701702 100644
--- a/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/dao/institution/IInstitutionDao.java
+++ b/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/dao/institution/IInstitutionDao.java
@@ -23,6 +23,13 @@ import java.util.Map;
@Repository
public interface IInstitutionDao {
+ /**
+ * 建表
+ * @throws UpdateException
+ */
+ void createTable() throws UpdateException;
+
+
/**
* 新增机构管理
*
diff --git a/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/init/InitModule.java b/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/init/InitModule.java
new file mode 100644
index 0000000..f0518a2
--- /dev/null
+++ b/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/init/InitModule.java
@@ -0,0 +1,35 @@
+package cn.com.tenlion.institutionmanagement.init;
+
+
+import cn.com.tenlion.institutionmanagement.dao.institution.IInstitutionDao;
+import ink.wgink.module.dictionary.startup.ModuleDictionaryStartUp;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.stereotype.Component;
+
+/**
+ * 模块初始化函数
+ */
+@Component
+public class InitModule implements ApplicationRunner {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ModuleDictionaryStartUp.class);
+ @Autowired
+ private IInstitutionDao iInstitutionDao;
+
+
+ @Override
+ public void run(ApplicationArguments args) throws Exception {
+ initTable();
+ }
+
+ private void initTable(){
+ LOG.debug("初始化机构信息表");
+ iInstitutionDao.createTable();
+ }
+
+
+}
diff --git a/module-institution-management/src/main/resources/mybatis/mapper/institution/institution-mapper.xml b/module-institution-management/src/main/resources/mybatis/mapper/institution/institution-mapper.xml
index 30238c1..85dba5c 100644
--- a/module-institution-management/src/main/resources/mybatis/mapper/institution/institution-mapper.xml
+++ b/module-institution-management/src/main/resources/mybatis/mapper/institution/institution-mapper.xml
@@ -71,6 +71,42 @@
+
+
+
+
+ CREATE TABLE IF NOT EXISTS `m_institution` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `institution_id` char(36) DEFAULT NULL COMMENT '机构ID',
+ `institution_name` varchar(255) DEFAULT NULL COMMENT '机构名称',
+ `institution_desc` varchar(500) DEFAULT NULL COMMENT '机构描述',
+ `institution_image` varchar(500) DEFAULT NULL COMMENT '机构图片',
+ `institution_address` varchar(255) DEFAULT NULL COMMENT '机构详情地址',
+ `institution_x` varchar(50) DEFAULT NULL COMMENT '机构经度',
+ `institution_y` varchar(50) DEFAULT NULL COMMENT '机构纬度',
+ `institution_founding_time` varchar(50) DEFAULT NULL COMMENT '机构成立时间',
+ `institution_principal` varchar(100) DEFAULT NULL COMMENT '机构负责人',
+ `institution_contact` varchar(200) DEFAULT NULL COMMENT '机构联系方式',
+ `institution_region_province` varchar(255) DEFAULT NULL COMMENT '行政区划-省',
+ `institution_region_city` varchar(255) DEFAULT NULL COMMENT '行政区化-市',
+ `institution_region_area` varchar(255) DEFAULT NULL COMMENT '行政区化-区',
+ `institution_region_village` varchar(255) DEFAULT NULL COMMENT '行政区化-村',
+ `institution_region_street` varchar(255) DEFAULT NULL COMMENT '行政区化-街',
+ `institution_type` varchar(255) DEFAULT NULL COMMENT '机构类型',
+ `creator` char(36) DEFAULT NULL COMMENT '创建人ID',
+ `gmt_create` datetime DEFAULT NULL COMMENT '创建时间',
+ `modifier` char(36) DEFAULT NULL COMMENT '修改人',
+ `gmt_modified` datetime DEFAULT NULL COMMENT '修改时间',
+ `is_delete` int(1) DEFAULT NULL COMMENT '删除状态 0未删除 1以删除',
+ PRIMARY KEY (`id`)
+ ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COMMENT='机构管理';
+
+
+
+
+
+
+
INSERT INTO m_institution(