Browse Source

加入atomikos数据源支持,但分布式事务未测试OK

NorthLan 7 years ago
parent
commit
a9b355008b
48 changed files with 1116 additions and 84 deletions
  1. BIN
      transaction-logs/192.168.1.204.tm0.epoch
  2. 0 0
      transaction-logs/tmlog.lck
  3. 3 3
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesClassificationMapper.kt
  4. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesDocumentMapper.kt
  5. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesElectronicRecordMapper.kt
  6. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesFileMapper.kt
  7. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesFileNoteMapper.kt
  8. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesRelationMapper.kt
  9. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesTypeMapper.kt
  10. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrFondsMapper.kt
  11. 33 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesClassification.kt
  12. 218 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesDocument.kt
  13. 29 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesElectronicRecord.kt
  14. 125 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesFile.kt
  15. 37 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesFileNote.kt
  16. 29 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesRelation.kt
  17. 9 9
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesType.kt
  18. 25 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrFonds.kt
  19. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesClassificationService.kt
  20. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesDocumentService.kt
  21. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesElectronicRecordService.kt
  22. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesFileNoteService.kt
  23. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesFileService.kt
  24. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesRelationService.kt
  25. 13 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesTypeService.kt
  26. 3 3
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrFondsService.kt
  27. 20 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesClassificationServiceImpl.kt
  28. 20 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesDocumentServiceImpl.kt
  29. 20 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesElectronicRecordServiceImpl.kt
  30. 20 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesFileNoteServiceImpl.kt
  31. 20 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesFileServiceImpl.kt
  32. 20 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesRelationServiceImpl.kt
  33. 20 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesTypeServiceImpl.kt
  34. 20 0
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrFondsServiceImpl.kt
  35. 0 20
      zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/SysDicServiceImpl.kt
  36. 7 17
      zen-api/src/main/kotlin/com/gxzc/zen/api/sys/service/impl/SysDeptServiceImpl.kt
  37. 20 0
      zen-api/src/main/resources/mapping/bus/MgrArchivesClassificationMapper.xml
  38. 66 0
      zen-api/src/main/resources/mapping/bus/MgrArchivesDocumentMapper.xml
  39. 19 0
      zen-api/src/main/resources/mapping/bus/MgrArchivesElectronicRecordMapper.xml
  40. 43 0
      zen-api/src/main/resources/mapping/bus/MgrArchivesFileMapper.xml
  41. 21 0
      zen-api/src/main/resources/mapping/bus/MgrArchivesFileNoteMapper.xml
  42. 19 0
      zen-api/src/main/resources/mapping/bus/MgrArchivesRelationMapper.xml
  43. 19 0
      zen-api/src/main/resources/mapping/bus/MgrArchivesTypeMapper.xml
  44. 4 5
      zen-api/src/main/resources/mapping/bus/MgrFondsMapper.xml
  45. 4 3
      zen-orm/src/main/kotlin/com/gxzc/zen/Generator.kt
  46. 39 22
      zen-orm/src/main/kotlin/com/gxzc/zen/orm/config/MultipleDataSourceConfig.kt
  47. 1 1
      zen-orm/src/main/resources/application-orm.yml
  48. 1 1
      zen-web/src/main/resources/application.yml

BIN
transaction-logs/192.168.1.204.tm0.epoch


+ 0 - 0
transaction-logs/tmlog.lck


+ 3 - 3
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/SysDicMapper.kt → zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesClassificationMapper.kt

@@ -1,16 +1,16 @@
 package com.gxzc.zen.api.bus.mapper
 
-import com.gxzc.zen.api.bus.model.SysDic
+import com.gxzc.zen.api.bus.model.MgrArchivesClassification
 import com.gxzc.zen.common.base.BaseMapper
 import org.springframework.stereotype.Repository
 
 /**
  * <p>
- * 字典表 Mapper 接口
+ * 分类表 Mapper 接口
  * </p>
  *
  * @author NorthLan123
  * @since 2018-02-02
  */
 @Repository
-interface SysDicMapper : BaseMapper<SysDic>
+interface MgrArchivesClassificationMapper : BaseMapper<MgrArchivesClassification>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesDocumentMapper.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.mapper
+
+import com.gxzc.zen.api.bus.model.MgrArchivesDocument
+import com.gxzc.zen.common.base.BaseMapper
+/**
+ * <p>
+ * 文书档案文件 Mapper 接口
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface MgrArchivesDocumentMapper : BaseMapper<MgrArchivesDocument>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesElectronicRecordMapper.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.mapper
+
+import com.gxzc.zen.api.bus.model.MgrArchivesElectronicRecord
+import com.gxzc.zen.common.base.BaseMapper
+/**
+ * <p>
+ * 电子档案文件 Mapper 接口
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface MgrArchivesElectronicRecordMapper : BaseMapper<MgrArchivesElectronicRecord>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesFileMapper.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.mapper
+
+import com.gxzc.zen.api.bus.model.MgrArchivesFile
+import com.gxzc.zen.common.base.BaseMapper
+/**
+ * <p>
+ * 文书档案案卷 Mapper 接口
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface MgrArchivesFileMapper : BaseMapper<MgrArchivesFile>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesFileNoteMapper.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.mapper
+
+import com.gxzc.zen.api.bus.model.MgrArchivesFileNote
+import com.gxzc.zen.common.base.BaseMapper
+/**
+ * <p>
+ * 文书档案备考表 Mapper 接口
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface MgrArchivesFileNoteMapper : BaseMapper<MgrArchivesFileNote>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesRelationMapper.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.mapper
+
+import com.gxzc.zen.api.bus.model.MgrArchivesRelation
+import com.gxzc.zen.common.base.BaseMapper
+/**
+ * <p>
+ * 目录树关系表 Mapper 接口
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface MgrArchivesRelationMapper : BaseMapper<MgrArchivesRelation>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrArchivesTypeMapper.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.mapper
+
+import com.gxzc.zen.api.bus.model.MgrArchivesType
+import com.gxzc.zen.common.base.BaseMapper
+/**
+ * <p>
+ * 档案类型表 Mapper 接口
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface MgrArchivesTypeMapper : BaseMapper<MgrArchivesType>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/mapper/MgrFondsMapper.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.mapper
+
+import com.gxzc.zen.api.bus.model.MgrFonds
+import com.gxzc.zen.common.base.BaseMapper
+/**
+ * <p>
+ * 全宗表 Mapper 接口
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface MgrFondsMapper : BaseMapper<MgrFonds>

+ 33 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesClassification.kt

@@ -0,0 +1,33 @@
+package com.gxzc.zen.api.bus.model
+
+import com.baomidou.mybatisplus.annotations.TableName
+import com.gxzc.zen.common.base.BaseModel
+
+/**
+ * <p>
+ * 分类表
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@TableName("mgr_archives_classification")
+data class MgrArchivesClassification(
+        /**
+         * 分类代码
+         */
+        var classificationCode: String? = null,
+        /**
+         * 分类名称
+         */
+        var name: String? = null,
+        /**
+         * 父ID
+         */
+        var parentId: Long? = null,
+        /**
+         * 连接符
+         */
+        var connectionCode: String? = null
+) : BaseModel() {
+}

+ 218 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesDocument.kt

@@ -0,0 +1,218 @@
+package com.gxzc.zen.api.bus.model
+
+import com.baomidou.mybatisplus.annotations.TableName
+import java.util.Date
+import com.gxzc.zen.common.base.BaseModel
+
+/**
+ * <p>
+ * 文书档案文件
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@TableName("mgr_archives_document")
+data class MgrArchivesDocument(
+        /**
+         * 归档人
+         */
+        var filingBy: String? = null,
+        /**
+         * 归档日期
+         */
+        var filingTime: Date? = null,
+        /**
+         * 全宗号
+         */
+        var fondsNo: String? = null,
+        /**
+         * 案卷目录号
+         */
+        var catalogueCode: Int? = null,
+        /**
+         * 案卷号
+         */
+        var fileCode: String? = null,
+        /**
+         * 档号
+         */
+        var archivalCode: String? = null,
+        /**
+         * 页号
+         */
+        var pageCode: String? = null,
+        /**
+         * 件号
+         */
+        var partNo: String? = null,
+        /**
+         * 责任者
+         */
+        var responsiblePerson: String? = null,
+        /**
+         * 文件编号
+         */
+        var documentCode: String? = null,
+        /**
+         * 文件题名
+         */
+        var documentTitle: String? = null,
+        /**
+         * 页数
+         */
+        var pagesCount: Int? = null,
+        /**
+         * 成文时间
+         */
+        var writtenTime: Date? = null,
+        /**
+         * 年度
+         */
+        var year: String? = null,
+        /**
+         * 盒号
+         */
+        var boxCode: String? = null,
+        /**
+         * 密级。(0无密;1秘密;2机密;3绝密;)
+         */
+        var securityClassification: Int? = null,
+        /**
+         * 分类号
+         */
+        var archivesTypeCode: Int? = null,
+        /**
+         * 电子档案名称
+         */
+        var electronicRecordTitle: String? = null,
+        /**
+         * 主题词
+         */
+        var descriptor: String? = null,
+        /**
+         * 机构(问题)
+         */
+        var organizationProblem: String? = null,
+        /**
+         * 人物
+         */
+        var personage: String? = null,
+        /**
+         * 档案馆名称
+         */
+        var archivesName: String? = null,
+        /**
+         * 附件题名
+         */
+        var attachmentTitle: String? = null,
+        /**
+         * 控制标识
+         */
+        var controlSign: String? = null,
+        /**
+         * 档案馆代码
+         */
+        var archivesCode: String? = null,
+        /**
+         * 电子档案生成方式
+         */
+        var produceWay: String? = null,
+        /**
+         * 保密期限
+         */
+        var secrecyPeriod: Int? = null,
+        /**
+         * 保管期限
+         */
+        var retentionPeriod: Int? = null,
+        /**
+         * 档案归档状态(0未归档;1归档)
+         */
+        var filingStatus: Int? = null,
+        /**
+         * 删除标识(0未删除;1删除)
+         */
+        var delFlag: Int? = null,
+        /**
+         * 数字化时间
+         */
+        var digitizationTime: Date? = null,
+        /**
+         * 数字化对象描述
+         */
+        var digitizationObjDescribe: String? = null,
+        /**
+         * 数字化授权描述
+         */
+        var digitizationAuthorizeDescribe: String? = null,
+        /**
+         * 格式名称
+         */
+        var formatName: String? = null,
+        /**
+         * 格式版本
+         */
+        var formatVersion: String? = null,
+        /**
+         * 色彩空间
+         */
+        var colorSpace: String? = null,
+        /**
+         * 压缩方案
+         */
+        var compressScheme: String? = null,
+        /**
+         * 压缩率
+         */
+        var compressionRatio: String? = null,
+        /**
+         * 水平分辨率
+         */
+        var horizontalResolution: String? = null,
+        /**
+         * 垂直分辨率
+         */
+        var verticalResolution: String? = null,
+        /**
+         * 图像宽度
+         */
+        var imageWidth: String? = null,
+        /**
+         * 图像高度
+         */
+        var imageHeight: String? = null,
+        /**
+         * 设备类型
+         */
+        var equipmentType: String? = null,
+        /**
+         * 设备制造商
+         */
+        var equipmentManufacturer: String? = null,
+        /**
+         * 设备型号
+         */
+        var equipmentModel: String? = null,
+        /**
+         * 设备系列号
+         */
+        var equipmentSeriesNumber: String? = null,
+        /**
+         * 设备感光器
+         */
+        var equipmentPhotoreceptor: String? = null,
+        /**
+         * 数字化软件名称
+         */
+        var digitalSoftwareName: String? = null,
+        /**
+         * 数字化软件版本
+         */
+        var digitalSoftwareVersion: String? = null,
+        /**
+         * 数字化软件生产商
+         */
+        var digitalSoftwareManufacturer: String? = null
+) : BaseModel() {
+}

+ 29 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesElectronicRecord.kt

@@ -0,0 +1,29 @@
+package com.gxzc.zen.api.bus.model
+
+import com.baomidou.mybatisplus.annotations.TableName
+import com.gxzc.zen.common.base.BaseModel
+
+/**
+ * <p>
+ * 电子档案文件
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@TableName("mgr_archives_electronic_record")
+data class MgrArchivesElectronicRecord(
+        /**
+         * 文件id(mgr_archives_document表的id)
+         */
+        var documentId: Long? = null,
+        /**
+         * 电子文件标题
+         */
+        var electronicRecordTitle: String? = null,
+        /**
+         * 挂接配置名
+         */
+        var connectConfigureName: String? = null
+) : BaseModel() {
+}

+ 125 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesFile.kt

@@ -0,0 +1,125 @@
+package com.gxzc.zen.api.bus.model
+
+import com.baomidou.mybatisplus.annotations.TableName
+import java.util.Date
+import com.baomidou.mybatisplus.annotations.TableField
+import com.gxzc.zen.common.base.BaseModel
+
+/**
+ * <p>
+ * 文书档案案卷
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@TableName("mgr_archives_file")
+data class MgrArchivesFile(
+        /**
+         * 归档人
+         */
+        var filingBy: String? = null,
+        /**
+         * 归档日期
+         */
+        var filingTime: Date? = null,
+        /**
+         * 案卷级档号
+         */
+        var archivalCode: String? = null,
+        /**
+         * 全宗号
+         */
+        var fondsNo: String? = null,
+        var fondsName: String? = null,
+        /**
+         * 目录号
+         */
+        var catalogueCode: Int? = null,
+        /**
+         * 案卷号
+         */
+        var fileCode: Int? = null,
+        /**
+         * 年度
+         */
+        var year: String? = null,
+        /**
+         * 保管期限
+         */
+        var retentionPeriod: Int? = null,
+        /**
+         * 保管期限代码
+         */
+        var retentionPeriodCode: String? = null,
+        /**
+         * 案卷题名
+         */
+        var fileTitle: String? = null,
+        /**
+         * 起时间
+         */
+        var startTime: Date? = null,
+        /**
+         * 止时间
+         */
+        var endTime: Date? = null,
+        /**
+         * 责任者
+         */
+        var responsiblePerson: String? = null,
+        /**
+         * 成文时间
+         */
+        var writtenTime: Date? = null,
+        /**
+         * 页数
+         */
+        var pagesCount: Int? = null,
+        /**
+         * 文件件数
+         */
+        var documentCount: Int? = null,
+        /**
+         * 人物
+         */
+        var personage: String? = null,
+        /**
+         * 盒号
+         */
+        var boxCode: String? = null,
+        /**
+         * 保密期限
+         */
+        var secrecyPeriod: Int? = null,
+        /**
+         * 密级(0无密;1秘密;2机密;3绝密;)
+         */
+        var securityClassification: String? = null,
+        /**
+         * 档案馆名称
+         */
+        var archivesName: String? = null,
+        /**
+         * 主题词
+         */
+        var descriptor: String? = null,
+        /**
+         * 档案馆代码
+         */
+        var archivesCode: String? = null,
+        /**
+         * 附件题名
+         */
+        var attachmentTitle: String? = null,
+        /**
+         * RFID
+         */
+        @TableField("RFID")
+        var rfid: String? = null,
+        /**
+         * 归档状态(0:未归档,1归档)
+         */
+        var filingStatus: Int? = null
+) : BaseModel() {
+}

+ 37 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesFileNote.kt

@@ -0,0 +1,37 @@
+package com.gxzc.zen.api.bus.model
+
+import com.baomidou.mybatisplus.annotations.TableName
+import com.gxzc.zen.common.base.BaseModel
+
+/**
+ * <p>
+ * 文书档案备考表
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@TableName("mgr_archives_file_note")
+data class MgrArchivesFileNote(
+        /**
+         * 全宗名称
+         */
+        var fondsName: String? = null,
+        /**
+         * 全宗号
+         */
+        var fondsNo: String? = null,
+        /**
+         * 档案说明
+         */
+        var detail: String? = null,
+        /**
+         * 整理人
+         */
+        var collator: String? = null,
+        /**
+         * 检查人
+         */
+        var inspector: String? = null
+) : BaseModel() {
+}

+ 29 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesRelation.kt

@@ -0,0 +1,29 @@
+package com.gxzc.zen.api.bus.model
+
+import com.baomidou.mybatisplus.annotations.TableName
+import com.gxzc.zen.common.base.BaseModel
+
+/**
+ * <p>
+ * 目录树关系表
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@TableName("mgr_archives_relation")
+data class MgrArchivesRelation(
+        /**
+         * 分类id
+         */
+        var classificationId: Long? = null,
+        /**
+         * 全宗ID
+         */
+        var fondsId: Long? = null,
+        /**
+         * 档案类型ID
+         */
+        var typeId: Long? = null
+) : BaseModel() {
+}

+ 9 - 9
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/SysDic.kt → zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrArchivesType.kt

@@ -5,25 +5,25 @@ import com.gxzc.zen.common.base.BaseModel
 
 /**
  * <p>
- * 字典
+ * 档案类型
  * </p>
  *
  * @author NorthLan123
  * @since 2018-02-02
  */
-@TableName("sys_dic")
-data class SysDic(
+@TableName("mgr_archives_type")
+data class MgrArchivesType(
         /**
-         * 字典代码
+         * 档案类型代码
          */
-        var key: String? = null,
+        var typeCode: String? = null,
         /**
-         * 字典值
+         * 类型名
          */
-        var value: String? = null,
+        var name: String? = null,
         /**
-         * 排序号
+         * 父ID
          */
-        var sort: Int? = null
+        var parentId: Long? = null
 ) : BaseModel() {
 }

+ 25 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/model/MgrFonds.kt

@@ -0,0 +1,25 @@
+package com.gxzc.zen.api.bus.model
+
+import com.baomidou.mybatisplus.annotations.TableName
+import com.gxzc.zen.common.base.BaseModel
+
+/**
+ * <p>
+ * 全宗表
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@TableName("mgr_fonds")
+data class MgrFonds(
+        /**
+         * 全宗号
+         */
+        var fondsNo: String? = null,
+        /**
+         * 全宗名
+         */
+        var fondsName: String? = null
+) : BaseModel() {
+}

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesClassificationService.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.service
+
+import com.gxzc.zen.api.bus.model.MgrArchivesClassification
+import com.gxzc.zen.common.base.BaseService
+/**
+ * <p>
+ * 分类表 服务类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface IMgrArchivesClassificationService : BaseService<MgrArchivesClassification>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesDocumentService.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.service
+
+import com.gxzc.zen.api.bus.model.MgrArchivesDocument
+import com.gxzc.zen.common.base.BaseService
+/**
+ * <p>
+ * 文书档案文件 服务类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface IMgrArchivesDocumentService : BaseService<MgrArchivesDocument>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesElectronicRecordService.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.service
+
+import com.gxzc.zen.api.bus.model.MgrArchivesElectronicRecord
+import com.gxzc.zen.common.base.BaseService
+/**
+ * <p>
+ * 电子档案文件 服务类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface IMgrArchivesElectronicRecordService : BaseService<MgrArchivesElectronicRecord>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesFileNoteService.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.service
+
+import com.gxzc.zen.api.bus.model.MgrArchivesFileNote
+import com.gxzc.zen.common.base.BaseService
+/**
+ * <p>
+ * 文书档案备考表 服务类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface IMgrArchivesFileNoteService : BaseService<MgrArchivesFileNote>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesFileService.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.service
+
+import com.gxzc.zen.api.bus.model.MgrArchivesFile
+import com.gxzc.zen.common.base.BaseService
+/**
+ * <p>
+ * 文书档案案卷 服务类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface IMgrArchivesFileService : BaseService<MgrArchivesFile>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesRelationService.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.service
+
+import com.gxzc.zen.api.bus.model.MgrArchivesRelation
+import com.gxzc.zen.common.base.BaseService
+/**
+ * <p>
+ * 目录树关系表 服务类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface IMgrArchivesRelationService : BaseService<MgrArchivesRelation>

+ 13 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrArchivesTypeService.kt

@@ -0,0 +1,13 @@
+package com.gxzc.zen.api.bus.service
+
+import com.gxzc.zen.api.bus.model.MgrArchivesType
+import com.gxzc.zen.common.base.BaseService
+/**
+ * <p>
+ * 档案类型表 服务类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+interface IMgrArchivesTypeService : BaseService<MgrArchivesType>

+ 3 - 3
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/ISysDicService.kt → zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/IMgrFondsService.kt

@@ -1,13 +1,13 @@
 package com.gxzc.zen.api.bus.service
 
-import com.gxzc.zen.api.bus.model.SysDic
+import com.gxzc.zen.api.bus.model.MgrFonds
 import com.gxzc.zen.common.base.BaseService
 /**
  * <p>
- * 字典表 服务类
+ * 全宗表 服务类
  * </p>
  *
  * @author NorthLan123
  * @since 2018-02-02
  */
-interface ISysDicService : BaseService<SysDic>
+interface IMgrFondsService : BaseService<MgrFonds>

+ 20 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesClassificationServiceImpl.kt

@@ -0,0 +1,20 @@
+package com.gxzc.zen.api.bus.service.impl
+
+import com.gxzc.zen.api.bus.model.MgrArchivesClassification
+import com.gxzc.zen.api.bus.mapper.MgrArchivesClassificationMapper
+import com.gxzc.zen.api.bus.service.IMgrArchivesClassificationService
+import com.baomidou.mybatisplus.service.impl.ServiceImpl
+import org.springframework.stereotype.Service
+
+/**
+ * <p>
+ * 分类表 服务实现类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@Service
+open class MgrArchivesClassificationServiceImpl : ServiceImpl<MgrArchivesClassificationMapper, MgrArchivesClassification>(), IMgrArchivesClassificationService {
+
+}

+ 20 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesDocumentServiceImpl.kt

@@ -0,0 +1,20 @@
+package com.gxzc.zen.api.bus.service.impl
+
+import com.gxzc.zen.api.bus.model.MgrArchivesDocument
+import com.gxzc.zen.api.bus.mapper.MgrArchivesDocumentMapper
+import com.gxzc.zen.api.bus.service.IMgrArchivesDocumentService
+import com.baomidou.mybatisplus.service.impl.ServiceImpl
+import org.springframework.stereotype.Service
+
+/**
+ * <p>
+ * 文书档案文件 服务实现类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@Service
+open class MgrArchivesDocumentServiceImpl : ServiceImpl<MgrArchivesDocumentMapper, MgrArchivesDocument>(), IMgrArchivesDocumentService {
+
+}

+ 20 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesElectronicRecordServiceImpl.kt

@@ -0,0 +1,20 @@
+package com.gxzc.zen.api.bus.service.impl
+
+import com.gxzc.zen.api.bus.model.MgrArchivesElectronicRecord
+import com.gxzc.zen.api.bus.mapper.MgrArchivesElectronicRecordMapper
+import com.gxzc.zen.api.bus.service.IMgrArchivesElectronicRecordService
+import com.baomidou.mybatisplus.service.impl.ServiceImpl
+import org.springframework.stereotype.Service
+
+/**
+ * <p>
+ * 电子档案文件 服务实现类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@Service
+open class MgrArchivesElectronicRecordServiceImpl : ServiceImpl<MgrArchivesElectronicRecordMapper, MgrArchivesElectronicRecord>(), IMgrArchivesElectronicRecordService {
+
+}

+ 20 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesFileNoteServiceImpl.kt

@@ -0,0 +1,20 @@
+package com.gxzc.zen.api.bus.service.impl
+
+import com.gxzc.zen.api.bus.model.MgrArchivesFileNote
+import com.gxzc.zen.api.bus.mapper.MgrArchivesFileNoteMapper
+import com.gxzc.zen.api.bus.service.IMgrArchivesFileNoteService
+import com.baomidou.mybatisplus.service.impl.ServiceImpl
+import org.springframework.stereotype.Service
+
+/**
+ * <p>
+ * 文书档案备考表 服务实现类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@Service
+open class MgrArchivesFileNoteServiceImpl : ServiceImpl<MgrArchivesFileNoteMapper, MgrArchivesFileNote>(), IMgrArchivesFileNoteService {
+
+}

+ 20 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesFileServiceImpl.kt

@@ -0,0 +1,20 @@
+package com.gxzc.zen.api.bus.service.impl
+
+import com.gxzc.zen.api.bus.model.MgrArchivesFile
+import com.gxzc.zen.api.bus.mapper.MgrArchivesFileMapper
+import com.gxzc.zen.api.bus.service.IMgrArchivesFileService
+import com.baomidou.mybatisplus.service.impl.ServiceImpl
+import org.springframework.stereotype.Service
+
+/**
+ * <p>
+ * 文书档案案卷 服务实现类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@Service
+open class MgrArchivesFileServiceImpl : ServiceImpl<MgrArchivesFileMapper, MgrArchivesFile>(), IMgrArchivesFileService {
+
+}

+ 20 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesRelationServiceImpl.kt

@@ -0,0 +1,20 @@
+package com.gxzc.zen.api.bus.service.impl
+
+import com.gxzc.zen.api.bus.model.MgrArchivesRelation
+import com.gxzc.zen.api.bus.mapper.MgrArchivesRelationMapper
+import com.gxzc.zen.api.bus.service.IMgrArchivesRelationService
+import com.baomidou.mybatisplus.service.impl.ServiceImpl
+import org.springframework.stereotype.Service
+
+/**
+ * <p>
+ * 目录树关系表 服务实现类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@Service
+open class MgrArchivesRelationServiceImpl : ServiceImpl<MgrArchivesRelationMapper, MgrArchivesRelation>(), IMgrArchivesRelationService {
+
+}

+ 20 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrArchivesTypeServiceImpl.kt

@@ -0,0 +1,20 @@
+package com.gxzc.zen.api.bus.service.impl
+
+import com.gxzc.zen.api.bus.model.MgrArchivesType
+import com.gxzc.zen.api.bus.mapper.MgrArchivesTypeMapper
+import com.gxzc.zen.api.bus.service.IMgrArchivesTypeService
+import com.baomidou.mybatisplus.service.impl.ServiceImpl
+import org.springframework.stereotype.Service
+
+/**
+ * <p>
+ * 档案类型表 服务实现类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@Service
+open class MgrArchivesTypeServiceImpl : ServiceImpl<MgrArchivesTypeMapper, MgrArchivesType>(), IMgrArchivesTypeService {
+
+}

+ 20 - 0
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/MgrFondsServiceImpl.kt

@@ -0,0 +1,20 @@
+package com.gxzc.zen.api.bus.service.impl
+
+import com.gxzc.zen.api.bus.model.MgrFonds
+import com.gxzc.zen.api.bus.mapper.MgrFondsMapper
+import com.gxzc.zen.api.bus.service.IMgrFondsService
+import com.baomidou.mybatisplus.service.impl.ServiceImpl
+import org.springframework.stereotype.Service
+
+/**
+ * <p>
+ * 全宗表 服务实现类
+ * </p>
+ *
+ * @author NorthLan123
+ * @since 2018-02-02
+ */
+@Service
+open class MgrFondsServiceImpl : ServiceImpl<MgrFondsMapper, MgrFonds>(), IMgrFondsService {
+
+}

+ 0 - 20
zen-api/src/main/kotlin/com/gxzc/zen/api/bus/service/impl/SysDicServiceImpl.kt

@@ -1,20 +0,0 @@
-package com.gxzc.zen.api.bus.service.impl
-
-import com.gxzc.zen.api.bus.model.SysDic
-import com.gxzc.zen.api.bus.mapper.SysDicMapper
-import com.gxzc.zen.api.bus.service.ISysDicService
-import com.baomidou.mybatisplus.service.impl.ServiceImpl
-import org.springframework.stereotype.Service
-
-/**
- * <p>
- * 字典表 服务实现类
- * </p>
- *
- * @author NorthLan123
- * @since 2018-02-02
- */
-@Service
-open class SysDicServiceImpl : ServiceImpl<SysDicMapper, SysDic>(), ISysDicService {
-
-}

+ 7 - 17
zen-api/src/main/kotlin/com/gxzc/zen/api/sys/service/impl/SysDeptServiceImpl.kt

@@ -1,10 +1,9 @@
 package com.gxzc.zen.api.sys.service.impl
 
 import com.baomidou.mybatisplus.service.impl.ServiceImpl
-import com.gxzc.zen.api.bus.mapper.SysDicMapper
-import com.gxzc.zen.api.bus.model.SysDic
+import com.gxzc.zen.api.bus.model.MgrFonds
+import com.gxzc.zen.api.bus.service.IMgrFondsService
 import com.gxzc.zen.api.sys.mapper.SysDeptMapper
-import com.gxzc.zen.api.sys.mapper.SysParamMapper
 import com.gxzc.zen.api.sys.model.SysDept
 import com.gxzc.zen.api.sys.service.ISysDeptService
 import org.springframework.beans.factory.annotation.Autowired
@@ -23,10 +22,7 @@ import org.springframework.transaction.annotation.Transactional
 open class SysDeptServiceImpl : ServiceImpl<SysDeptMapper, SysDept>(), ISysDeptService {
 
     @Autowired
-    lateinit var sysParamMapper: SysParamMapper
-
-    @Autowired
-    lateinit var sysDicMapper: SysDicMapper
+    lateinit var mgrFondsService: IMgrFondsService
 
     @Transactional
     override fun testTransaction() {
@@ -36,17 +32,11 @@ open class SysDeptServiceImpl : ServiceImpl<SysDeptMapper, SysDept>(), ISysDeptS
             it.sort = 1
         })
 
-        sysDicMapper.insert(SysDic().also {
-            it.key = "haha"
-            it.sort = 1
-            it.value = "hehehehehehe"
+        mgrFondsService.insert(MgrFonds().also {
+            it.fondsNo = "1"
+            it.fondsName = "name"
         })
-
-//        sysParamMapper.insert(SysParam().also {
-//            it.key = "tesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesettesetteset"
-//            it.value = "haode"
-//            it.sort = 1
-//        })
+//        throw RuntimeException("test")
     }
 
 }

+ 20 - 0
zen-api/src/main/resources/mapping/bus/MgrArchivesClassificationMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gxzc.zen.api.bus.mapper.MgrArchivesClassificationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.MgrArchivesClassification">
+    <result column="id" property="id" />
+    <result column="enable" property="enable" />
+    <result column="remark" property="remark" />
+    <result column="create_time" property="createTime" />
+    <result column="create_by" property="createBy" />
+    <result column="update_time" property="updateTime" />
+    <result column="update_by" property="updateBy" />
+        <result column="classification_code" property="classificationCode" />
+        <result column="name" property="name" />
+        <result column="parent_id" property="parentId" />
+        <result column="connection_code" property="connectionCode" />
+    </resultMap>
+
+</mapper>

+ 66 - 0
zen-api/src/main/resources/mapping/bus/MgrArchivesDocumentMapper.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gxzc.zen.api.bus.mapper.MgrArchivesDocumentMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.MgrArchivesDocument">
+    <result column="id" property="id" />
+    <result column="enable" property="enable" />
+    <result column="remark" property="remark" />
+    <result column="create_by" property="createBy" />
+    <result column="create_time" property="createTime" />
+    <result column="update_by" property="updateBy" />
+    <result column="update_time" property="updateTime" />
+        <result column="filing_by" property="filingBy" />
+        <result column="filing_time" property="filingTime" />
+        <result column="fonds_no" property="fondsNo" />
+        <result column="catalogue_code" property="catalogueCode" />
+        <result column="file_code" property="fileCode" />
+        <result column="archival_code" property="archivalCode" />
+        <result column="page_code" property="pageCode" />
+        <result column="part_no" property="partNo" />
+        <result column="responsible_person" property="responsiblePerson" />
+        <result column="document_code" property="documentCode" />
+        <result column="document_title" property="documentTitle" />
+        <result column="pages_count" property="pagesCount" />
+        <result column="written_time" property="writtenTime" />
+        <result column="year" property="year" />
+        <result column="box_code" property="boxCode" />
+        <result column="security_classification" property="securityClassification" />
+        <result column="archives_type_code" property="archivesTypeCode" />
+        <result column="electronic_record_title" property="electronicRecordTitle" />
+        <result column="descriptor" property="descriptor" />
+        <result column="organization_problem" property="organizationProblem" />
+        <result column="personage" property="personage" />
+        <result column="archives_name" property="archivesName" />
+        <result column="attachment_title" property="attachmentTitle" />
+        <result column="control_sign" property="controlSign" />
+        <result column="archives_code" property="archivesCode" />
+        <result column="produce_way" property="produceWay" />
+        <result column="secrecy_period" property="secrecyPeriod" />
+        <result column="retention_period" property="retentionPeriod" />
+        <result column="filing_status" property="filingStatus" />
+        <result column="del_flag" property="delFlag" />
+        <result column="digitization_time" property="digitizationTime" />
+        <result column="digitization_obj_describe" property="digitizationObjDescribe" />
+        <result column="digitization_authorize_describe" property="digitizationAuthorizeDescribe" />
+        <result column="format_name" property="formatName" />
+        <result column="format_version" property="formatVersion" />
+        <result column="color_space" property="colorSpace" />
+        <result column="compress_scheme" property="compressScheme" />
+        <result column="compression_ratio" property="compressionRatio" />
+        <result column="horizontal_resolution" property="horizontalResolution" />
+        <result column="vertical_resolution" property="verticalResolution" />
+        <result column="image_width" property="imageWidth" />
+        <result column="image_height" property="imageHeight" />
+        <result column="equipment_type" property="equipmentType" />
+        <result column="equipment_manufacturer" property="equipmentManufacturer" />
+        <result column="equipment_model" property="equipmentModel" />
+        <result column="equipment_series_number" property="equipmentSeriesNumber" />
+        <result column="equipment_photoreceptor" property="equipmentPhotoreceptor" />
+        <result column="digital_software_name" property="digitalSoftwareName" />
+        <result column="digital_software_version" property="digitalSoftwareVersion" />
+        <result column="digital_software_manufacturer" property="digitalSoftwareManufacturer" />
+    </resultMap>
+
+</mapper>

+ 19 - 0
zen-api/src/main/resources/mapping/bus/MgrArchivesElectronicRecordMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gxzc.zen.api.bus.mapper.MgrArchivesElectronicRecordMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.MgrArchivesElectronicRecord">
+    <result column="id" property="id" />
+    <result column="enable" property="enable" />
+    <result column="remark" property="remark" />
+    <result column="create_by" property="createBy" />
+    <result column="create_time" property="createTime" />
+    <result column="update_by" property="updateBy" />
+    <result column="update_time" property="updateTime" />
+        <result column="document_id" property="documentId" />
+        <result column="electronic_record_title" property="electronicRecordTitle" />
+        <result column="connect_configure_name" property="connectConfigureName" />
+    </resultMap>
+
+</mapper>

+ 43 - 0
zen-api/src/main/resources/mapping/bus/MgrArchivesFileMapper.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gxzc.zen.api.bus.mapper.MgrArchivesFileMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.MgrArchivesFile">
+    <result column="id" property="id" />
+    <result column="enable" property="enable" />
+    <result column="remark" property="remark" />
+    <result column="create_by" property="createBy" />
+    <result column="create_time" property="createTime" />
+    <result column="update_by" property="updateBy" />
+    <result column="update_time" property="updateTime" />
+        <result column="filing_by" property="filingBy" />
+        <result column="filing_time" property="filingTime" />
+        <result column="archival_code" property="archivalCode" />
+        <result column="fonds_no" property="fondsNo" />
+        <result column="fonds_name" property="fondsName" />
+        <result column="catalogue_code" property="catalogueCode" />
+        <result column="file_code" property="fileCode" />
+        <result column="year" property="year" />
+        <result column="retention_period" property="retentionPeriod" />
+        <result column="retention_period_code" property="retentionPeriodCode" />
+        <result column="file_title" property="fileTitle" />
+        <result column="start_time" property="startTime" />
+        <result column="end_time" property="endTime" />
+        <result column="responsible_person" property="responsiblePerson" />
+        <result column="written_time" property="writtenTime" />
+        <result column="pages_count" property="pagesCount" />
+        <result column="document_count" property="documentCount" />
+        <result column="personage" property="personage" />
+        <result column="box_code" property="boxCode" />
+        <result column="secrecy_period" property="secrecyPeriod" />
+        <result column="security_classification" property="securityClassification" />
+        <result column="archives_name" property="archivesName" />
+        <result column="descriptor" property="descriptor" />
+        <result column="archives_code" property="archivesCode" />
+        <result column="attachment_title" property="attachmentTitle" />
+        <result column="RFID" property="rfid" />
+        <result column="filing_status" property="filingStatus" />
+    </resultMap>
+
+</mapper>

+ 21 - 0
zen-api/src/main/resources/mapping/bus/MgrArchivesFileNoteMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gxzc.zen.api.bus.mapper.MgrArchivesFileNoteMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.MgrArchivesFileNote">
+    <result column="id" property="id" />
+    <result column="enable" property="enable" />
+    <result column="remark" property="remark" />
+    <result column="create_by" property="createBy" />
+    <result column="create_time" property="createTime" />
+    <result column="update_by" property="updateBy" />
+    <result column="update_time" property="updateTime" />
+        <result column="fonds_name" property="fondsName" />
+        <result column="fonds_no" property="fondsNo" />
+        <result column="detail" property="detail" />
+        <result column="collator" property="collator" />
+        <result column="inspector" property="inspector" />
+    </resultMap>
+
+</mapper>

+ 19 - 0
zen-api/src/main/resources/mapping/bus/MgrArchivesRelationMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gxzc.zen.api.bus.mapper.MgrArchivesRelationMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.MgrArchivesRelation">
+    <result column="id" property="id" />
+    <result column="enable" property="enable" />
+    <result column="remark" property="remark" />
+    <result column="create_time" property="createTime" />
+    <result column="create_by" property="createBy" />
+    <result column="update_time" property="updateTime" />
+    <result column="update_by" property="updateBy" />
+        <result column="classification_id" property="classificationId" />
+        <result column="fonds_id" property="fondsId" />
+        <result column="type_id" property="typeId" />
+    </resultMap>
+
+</mapper>

+ 19 - 0
zen-api/src/main/resources/mapping/bus/MgrArchivesTypeMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gxzc.zen.api.bus.mapper.MgrArchivesTypeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.MgrArchivesType">
+    <result column="id" property="id" />
+    <result column="enable" property="enable" />
+    <result column="remark" property="remark" />
+    <result column="create_time" property="createTime" />
+    <result column="create_by" property="createBy" />
+    <result column="update_time" property="updateTime" />
+    <result column="update_by" property="updateBy" />
+        <result column="type_code" property="typeCode" />
+        <result column="name" property="name" />
+        <result column="parent_id" property="parentId" />
+    </resultMap>
+
+</mapper>

+ 4 - 5
zen-api/src/main/resources/mapping/bus/SysDicMapper.xml → zen-api/src/main/resources/mapping/bus/MgrFondsMapper.xml

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.gxzc.zen.api.bus.mapper.SysDicMapper">
+<mapper namespace="com.gxzc.zen.api.bus.mapper.MgrFondsMapper">
 
     <!-- 通用查询映射结果 -->
-    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.SysDic">
+    <resultMap id="BaseResultMap" type="com.gxzc.zen.api.bus.model.MgrFonds">
     <result column="id" property="id" />
     <result column="enable" property="enable" />
     <result column="remark" property="remark" />
@@ -11,9 +11,8 @@
     <result column="create_by" property="createBy" />
     <result column="update_time" property="updateTime" />
     <result column="update_by" property="updateBy" />
-        <result column="key" property="key" />
-        <result column="value" property="value" />
-        <result column="sort" property="sort" />
+        <result column="fonds_no" property="fondsNo" />
+        <result column="fonds_name" property="fondsName" />
     </resultMap>
 
 </mapper>

+ 4 - 3
zen-orm/src/main/kotlin/com/gxzc/zen/Generator.kt

@@ -25,9 +25,10 @@ fun main(args: Array<String>) {
             }
         }
         it.driverName = "com.mysql.jdbc.Driver"
-        it.username = "root"// "archives"
-        it.password = "root"// "archives"
-        it.url = "jdbc:mysql://127.0.0.1:3306/archives_rec?characterEncoding=utf8" // "jdbc:mysql://192.168.1.124:3307/archives_mgr?characterEncoding=utf8"
+        it.username = "archives"
+        it.password = "archives"
+        it.url = "jdbc:mysql://192.168.1.124:3307/archives_mgr?characterEncoding=utf8"
+        // "jdbc:mysql://127.0.0.1:3306/archives_mgr?characterEncoding=utf8"
     })
 }
 

+ 39 - 22
zen-orm/src/main/kotlin/com/gxzc/zen/orm/config/MultipleDataSourceConfig.kt

@@ -1,22 +1,25 @@
 package com.gxzc.zen.orm.config
 
-import com.alibaba.druid.pool.DruidDataSource
+import com.alibaba.druid.pool.xa.DruidXADataSource
 import com.baomidou.mybatisplus.spring.MybatisSqlSessionFactoryBean
 import com.baomidou.mybatisplus.spring.boot.starter.MybatisPlusProperties
 import com.baomidou.mybatisplus.spring.boot.starter.SpringBootVFS
 import com.gxzc.zen.orm.DynamicMultipleDataSource
 import com.gxzc.zen.orm.contants.DSKey
 import org.springframework.beans.factory.annotation.Autowired
+import org.springframework.beans.factory.annotation.Qualifier
 import org.springframework.boot.context.properties.ConfigurationProperties
 import org.springframework.boot.context.properties.EnableConfigurationProperties
+import org.springframework.boot.jta.atomikos.AtomikosDataSourceBean
 import org.springframework.context.annotation.Bean
 import org.springframework.context.annotation.Configuration
+import org.springframework.context.annotation.DependsOn
 import org.springframework.context.annotation.Primary
-import org.springframework.core.annotation.Order
 import org.springframework.jdbc.datasource.DataSourceTransactionManager
-import org.springframework.transaction.PlatformTransactionManager
-import org.springframework.transaction.annotation.TransactionManagementConfigurer
+import org.springframework.transaction.jta.JtaTransactionManager
 import javax.sql.DataSource
+import javax.sql.XADataSource
+import javax.transaction.TransactionManager
 
 /**
  *
@@ -24,28 +27,43 @@ import javax.sql.DataSource
  */
 @Configuration
 @EnableConfigurationProperties(MybatisPlusProperties::class)
-class MultipleDataSourceConfig : TransactionManagementConfigurer {
+class MultipleDataSourceConfig {
 
     @Autowired
     private lateinit var properties: MybatisPlusProperties
 
-    @Bean(DSKey.DSKEY_SYS)
+    @Bean(DSKey.DSKEY_SYS + "druid")
     @ConfigurationProperties(prefix = "datasource.sys")
+    fun dataSourceSysDruid(): XADataSource {
+        return DruidXADataSource()
+    }
+
+    @Bean(DSKey.DSKEY_BUSINESS + "druid")
+    @ConfigurationProperties(prefix = "datasource.bus")
+    fun dataSourceBusDruid(): XADataSource {
+        return DruidXADataSource()
+    }
+
+    @Bean(DSKey.DSKEY_SYS)
+    @DependsOn(DSKey.DSKEY_SYS + "druid")
     @Primary
-    fun dataSourceSys(): DataSource {
-        return DruidDataSource()
+    fun dataSourceSys(@Qualifier(DSKey.DSKEY_SYS + "druid") xaDataSource: XADataSource): DataSource {
+        return AtomikosDataSourceBean().also {
+            it.xaDataSource = xaDataSource
+        }
     }
 
     @Bean(DSKey.DSKEY_BUSINESS)
-    @ConfigurationProperties(prefix = "datasource.bus")
-    fun dataSourceBus(): DataSource {
-        return DruidDataSource()
+    @DependsOn(DSKey.DSKEY_BUSINESS + "druid")
+    fun dataSourceBus(@Qualifier(DSKey.DSKEY_BUSINESS + "druid") xaDataSource: XADataSource): DataSource {
+        return AtomikosDataSourceBean().also {
+            it.xaDataSource = xaDataSource
+        }
     }
 
     @Bean
-    fun multipleDataSource(): DynamicMultipleDataSource {
-        val dataSourceSys = dataSourceSys()
-        val dataSourceBus = dataSourceBus()
+    fun multipleDataSource(@Qualifier(DSKey.DSKEY_SYS) dataSourceSys: DataSource,
+                           @Qualifier(DSKey.DSKEY_SYS) dataSourceBus: DataSource): DynamicMultipleDataSource {
         return DynamicMultipleDataSource().also {
             it.setTargetDataSources(mapOf(
                     Pair(DSKey.DSKEY_SYS, dataSourceSys),
@@ -54,11 +72,10 @@ class MultipleDataSourceConfig : TransactionManagementConfigurer {
         }
     }
 
-    @Bean
-    @Order(3)
-    fun transactionManager(): PlatformTransactionManager {
-        return DataSourceTransactionManager(multipleDataSource())
-    }
+//    @Bean
+//    fun transactionManager(dynamicMultipleDataSource: DynamicMultipleDataSource): JtaTransactionManager {
+//        return JtaTransactionManager(DataSourceTransactionManager(dynamicMultipleDataSource) as TransactionManager)
+//    }
 
     @Bean
     @Primary
@@ -72,9 +89,9 @@ class MultipleDataSourceConfig : TransactionManagementConfigurer {
         }
     }
 
-    override fun annotationDrivenTransactionManager(): PlatformTransactionManager {
-        return transactionManager()
-    }
+//    override fun annotationDrivenTransactionManager(): PlatformTransactionManager {
+//        return transactionManager()
+//    }
 
 //    @Bean
 //    fun sqlSessionFactory(dynamicMultipleDataSource: DynamicMultipleDataSource): SqlSessionFactory {

+ 1 - 1
zen-orm/src/main/resources/application-orm.yml

@@ -53,7 +53,7 @@ datasource:
     timeBetweenEvictionRunsMillis: 60000
     minEvictableIdleTimeMillis: 30000
   bus:
-    name: archives_mgr
+    name: archives_bus
     url: jdbc:mysql://192.168.1.124:3307/archives_mgr?useUnicode=true&characterEncoding=utf-8&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
     username: archives
     password: archives

+ 1 - 1
zen-web/src/main/resources/application.yml

@@ -6,7 +6,7 @@ server:
 spring:
   profiles:
     active: dev
-    include: orm-local,mq
+    include: orm,mq
 #  redis:
 #    host: localhost
 #    port: 6379