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 9701702..5273e7f 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 @@ -8,6 +8,7 @@ import ink.wgink.exceptions.SaveException; import ink.wgink.exceptions.SearchException; import ink.wgink.exceptions.UpdateException; +import ink.wgink.interfaces.init.IInitBaseTable; import org.springframework.stereotype.Repository; import java.util.List; @@ -21,13 +22,9 @@ import java.util.Map; * @Version: 3.0 **/ @Repository -public interface IInstitutionDao { +public interface IInstitutionDao extends IInitBaseTable { + - /** - * 建表 - * @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 deleted file mode 100644 index f119e50..0000000 --- a/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/init/InitModule.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.com.tenlion.institutionmanagement.init; - - -import cn.com.tenlion.institutionmanagement.dao.institution.IInstitutionDao; -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(InitModule.class); - @Autowired - private IInstitutionDao iInstitutionDao; - - - @Override - public void run(ApplicationArguments args) throws Exception { - initTable(); - } - - private void initTable(){ - LOG.debug("初始化机构信息表"); - iInstitutionDao.createTable(); - } - - -}