wangchangsheng 2 роки тому
батько
коміт
e67d73c8c3
62 змінених файлів з 3877 додано та 0 видалено
  1. 21 0
      .editorconfig
  2. 33 0
      LICENSE
  3. 47 0
      ims-common/pom.xml
  4. 28 0
      ims-common/src/main/java/com/ims/common/cache/CacheNames.java
  5. 29 0
      ims-common/src/main/java/com/ims/common/config/AppInit.java
  6. 32 0
      ims-common/src/main/java/com/ims/common/config/BladeCommonConfiguration.java
  7. 77 0
      ims-common/src/main/java/com/ims/common/constant/CommonConstant.java
  8. 224 0
      ims-common/src/main/java/com/ims/common/constant/LauncherConstant.java
  9. 68 0
      ims-common/src/main/java/com/ims/common/launch/LauncherServiceImpl.java
  10. 26 0
      ims-common/src/main/java/com/ims/common/utils/CommonUtil.java
  11. 6 0
      ims-common/src/main/resources/banner.txt
  12. 15 0
      ims-gateway/Dockerfile
  13. 61 0
      ims-gateway/pom.xml
  14. 40 0
      ims-gateway/src/main/java/com/ims/gateway/GateWayApplication.java
  15. 53 0
      ims-gateway/src/main/java/com/ims/gateway/config/ExceptionHandlerPage.java
  16. 45 0
      ims-gateway/src/main/java/com/ims/gateway/config/GatewayConfiguration.java
  17. 15 0
      ims-gateway/src/main/resources/application-dev.yml
  18. 42 0
      ims-gateway/src/main/resources/bootstrap.yml
  19. 38 0
      ims-service-api/ims-am-api/pom.xml
  20. 220 0
      ims-service-api/ims-am-api/src/main/java/com/ims/ims/am/entity/AsApplication.java
  21. 23 0
      ims-service-api/ims-am-api/src/main/java/com/ims/ims/am/feign/VsAmClient.java
  22. 15 0
      ims-service-api/ims-am-api/src/main/java/com/ims/ims/am/feign/VsAmClientFallBack.java
  23. 73 0
      ims-service-api/pom.xml
  24. 77 0
      ims-service/ims-am/pom.xml
  25. 22 0
      ims-service/ims-am/src/main/java/com/ims/ims/am/AmApplication.java
  26. 37 0
      ims-service/ims-am/src/main/java/com/ims/ims/am/config/ImsDemoConfiguration.java
  27. 55 0
      ims-service/ims-am/src/main/java/com/ims/ims/am/config/XxlJobConfig.java
  28. 18 0
      ims-service/ims-am/src/main/java/com/ims/ims/am/launch/LauncherServiceImpl.java
  29. 7 0
      ims-service/ims-am/src/main/java/com/ims/ims/am/props/DemoProperties.java
  30. 44 0
      ims-service/ims-am/src/main/resources/application-dev.yml
  31. 16 0
      ims-service/ims-am/src/main/resources/application.yml
  32. 274 0
      ims-service/ims-am/src/main/resources/ims_postgresql_func.sql
  33. 77 0
      ims-service/ims-eval/pom.xml
  34. 23 0
      ims-service/ims-eval/src/main/java/com/ims/eval/EvalApplication.java
  35. 36 0
      ims-service/ims-eval/src/main/java/com/ims/eval/config/ImsEvalConfiguration.java
  36. 53 0
      ims-service/ims-eval/src/main/java/com/ims/eval/config/XxlJobConfig.java
  37. 136 0
      ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorDictionaryController.java
  38. 16 0
      ims-service/ims-eval/src/main/java/com/ims/eval/dao/IndicatorDictionaryDao.java
  39. 88 0
      ims-service/ims-eval/src/main/java/com/ims/eval/entity/IndicatorDictionary.java
  40. 18 0
      ims-service/ims-eval/src/main/java/com/ims/eval/launch/LauncherServiceImpl.java
  41. 9 0
      ims-service/ims-eval/src/main/java/com/ims/eval/props/EvalProperties.java
  42. 21 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/IIndicatorDictionaryService.java
  43. 77 0
      ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorDictionaryServiceImpl.java
  44. 41 0
      ims-service/ims-eval/src/main/resources/application-dev.yml
  45. 16 0
      ims-service/ims-eval/src/main/resources/application.yml
  46. 189 0
      ims-service/ims-eval/src/main/resources/mappings/ims/eval/IndicatorDictionaryDao.xml
  47. 67 0
      ims-service/pom.xml
  48. 77 0
      ims-service/sm-test/pom.xml
  49. 21 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/SmTest.java
  50. 36 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/config/ImsDemoConfiguration.java
  51. 53 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/config/XxlJobConfig.java
  52. 154 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/controller/PubinfoController.java
  53. 16 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/dao/PubinfoDao.java
  54. 120 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/entity/Pubinfo.java
  55. 18 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/launch/LauncherServiceImpl.java
  56. 7 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/props/DemoProperties.java
  57. 21 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/service/IPubinfoService.java
  58. 77 0
      ims-service/sm-test/src/main/java/com/ims/ims/sm/service/impl/PubinfoServiceImpl.java
  59. 41 0
      ims-service/sm-test/src/main/resources/application-dev.yml
  60. 16 0
      ims-service/sm-test/src/main/resources/application.yml
  61. 326 0
      ims-service/sm-test/src/main/resources/mappings/sm/PubinfoDao.xml
  62. 246 0
      pom.xml

+ 21 - 0
.editorconfig

@@ -0,0 +1,21 @@
+# http://editorconfig.org
+root = true
+
+# 空格替代Tab缩进在各种编辑工具下效果一致
+[*]
+indent_style = space
+indent_size = 4
+charset = utf-8
+end_of_line = lf
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.java]
+indent_style = tab
+
+[*.{json,yml}]
+indent_size = 2
+
+[*.md]
+insert_final_newline = false
+trim_trailing_whitespace = false

Різницю між файлами не показано, бо вона завелика
+ 33 - 0
LICENSE


+ 47 - 0
ims-common/pom.xml

@@ -0,0 +1,47 @@
+<?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>
+        <groupId>com.ims.as</groupId>
+        <artifactId>ims-as</artifactId>
+        <version>2.5.0.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ims-common</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${ims.project.version}</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-launch</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-auto</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.minio</groupId>
+            <artifactId>minio</artifactId>
+            <version>7.1.0</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                    <finalName>${project.name}</finalName>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 28 - 0
ims-common/src/main/java/com/ims/common/cache/CacheNames.java

@@ -0,0 +1,28 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.common.cache;
+
+/**
+ * 缓存名 定义缓存名称
+ *
+ * @author Chill
+ */
+public interface CacheNames {
+	// notice_one 缓存名称
+	String NOTICE_ONE = "blade:notice:one";
+
+}

+ 29 - 0
ims-common/src/main/java/com/ims/common/config/AppInit.java

@@ -0,0 +1,29 @@
+package com.ims.common.config;
+
+import org.springblade.core.launch.utils.PropsUtil;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.CommandLineRunner;
+import org.springframework.stereotype.Component;
+
+import java.util.Properties;
+
+
+/**
+ * 启动说明
+ */
+@Component
+public class AppInit implements CommandLineRunner {
+
+	@Value("${server.port}")
+	private String port;
+	@Value("${userfiles.basedir}")
+	private String basedir;
+
+	@Override
+	public void run(String... args) throws Exception {
+		Properties props = System.getProperties();
+		PropsUtil.setProperty(props,"userfiles.basedir",basedir);
+		System.out.println(">>>>>>>>>>>>>>>启动成功!!服务名称:"+System.getProperty("spring.application.name")+";端口:"+port+" ;操作系统:"+System.getProperties().getProperty("os.name")+"<<<<<<<<<<<<<");
+		System.out.println("basedir路径:"+basedir);
+	}
+}

+ 32 - 0
ims-common/src/main/java/com/ims/common/config/BladeCommonConfiguration.java

@@ -0,0 +1,32 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.common.config;
+
+
+import lombok.AllArgsConstructor;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 公共封装包配置类
+ *
+ * @author Chill
+ */
+@Configuration
+@AllArgsConstructor
+public class BladeCommonConfiguration {
+
+}

+ 77 - 0
ims-common/src/main/java/com/ims/common/constant/CommonConstant.java

@@ -0,0 +1,77 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.common.constant;
+
+/**
+ * 通用常量
+ *
+ * @author Chill
+ */
+public interface CommonConstant {
+
+	/**
+	 * sword 系统名
+	 */
+	String SWORD_NAME = "sword";
+
+	/**
+	 * saber 系统名
+	 */
+	String SABER_NAME = "saber";
+
+	/**
+	 * 顶级父节点id
+	 */
+	Integer TOP_PARENT_ID = 0;
+
+	/**
+	 * 顶级父节点名称
+	 */
+	String TOP_PARENT_NAME = "顶级";
+
+
+	/**
+	 * 默认密码
+	 */
+	String DEFAULT_PASSWORD = "123456";
+	/**
+	 * 目标管理微服务名称
+	 */
+	String APPLICATION_GOAL_NAME="ims-goal";
+	/**
+	 * 会议管理微服务名称
+	 */
+	String APPLICATION_MEET_NAME="ims-meet";
+	/**
+	 * 安全组织机构微服务名称
+	 */
+	String APPLICATION_ORG_NAME="ims-org";
+	/**
+	 * 安全检查与隐患治理微服务名称
+	 */
+	String APPLICATION_CHECK_NAME="ims-check";
+
+	/**
+	 * 职业健康微服务名称 Healthy
+	 */
+	String APPLICATION_HEALTHY_NAME="sm-healthy";
+
+	/**
+	 * 应用商店微服务名称
+	 */
+	String APPLICATION_AM="ims-am";
+}

+ 224 - 0
ims-common/src/main/java/com/ims/common/constant/LauncherConstant.java

@@ -0,0 +1,224 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.common.constant;
+
+import org.springblade.core.launch.constant.AppConstant;
+import org.springframework.util.StringUtils;
+
+import static org.springblade.core.launch.constant.AppConstant.APPLICATION_NAME_PREFIX;
+
+/**
+ * 通用常量
+ *
+ * @author Chill
+ */
+public interface LauncherConstant {
+
+	/**
+	 * nacos namespace id
+	 */
+	String NACOS_NAMESPACE = "f447a694-519a-4255-95f9-bcbb5a5d6369";
+
+	/**
+	 * nacos dev 地址
+	 */
+	String NACOS_DEV_ADDR = "10.65.78.23:8848";
+
+	/**
+	 * nacos prod 地址
+	 */
+	String NACOS_PROD_ADDR = "10.65.78.23:8848";
+
+	/**
+	 * nacos test 地址
+	 */
+	String NACOS_TEST_ADDR = "10.65.78.23:8848";
+
+	/**
+	 * sentinel dev 地址
+	 */
+	String SENTINEL_DEV_ADDR = "127.0.0.1:8858";
+
+	/**
+	 * sentinel prod 地址
+	 */
+	String SENTINEL_PROD_ADDR = "172.30.0.58:8858";
+
+	/**
+	 * sentinel test 地址
+	 */
+	String SENTINEL_TEST_ADDR = "172.30.0.58:8858";
+
+	/**
+	 * seata dev 地址
+	 */
+	String SEATA_DEV_ADDR = "127.0.0.1:8091";
+
+	/**
+	 * seata prod 地址
+	 */
+	String SEATA_PROD_ADDR = "172.30.0.68:8091";
+
+	/**
+	 * seata test 地址
+	 */
+	String SEATA_TEST_ADDR = "172.30.0.68:8091";
+
+	/**
+	 * dbuuo提供者
+	 */
+	String APPLICATION_DUBBO_PROVIDER_NAME = APPLICATION_NAME_PREFIX + "dubbo-provider";
+
+	/**
+	 * dbuuo消费者
+	 */
+	String APPLICATION_DUBBO_CONSUMER_NAME = APPLICATION_NAME_PREFIX + "dubbo-consumer";
+
+	/**
+	 * seata订单
+	 */
+	String APPLICATION_SEATA_ORDER_NAME = APPLICATION_NAME_PREFIX + "seata-order";
+
+	/**
+	 * seata库存
+	 */
+	String APPLICATION_SEATA_STORAGE_NAME = APPLICATION_NAME_PREFIX + "seata-storage";
+
+	/**
+	 * easypoi
+	 */
+	String APPLICATION_EASYPOI_NAME = APPLICATION_NAME_PREFIX + "easypoi";
+
+	/**
+	 * kafka
+	 */
+	String APPLICATION_KAFKA_NAME = APPLICATION_NAME_PREFIX + "kafka";
+
+	/**
+	 * rabbit
+	 */
+	String APPLICATION_RABBIT_NAME = APPLICATION_NAME_PREFIX + "rabbit";
+
+	/**
+	 * stream消费者
+	 */
+	String APPLICATION_STREAM_CONSUMER_NAME = APPLICATION_NAME_PREFIX + "stream-consumer";
+
+	/**
+	 * stream生产者
+	 */
+	String APPLICATION_STREAM_PROVIDER_NAME = APPLICATION_NAME_PREFIX + "stream-provider";
+
+	/**
+	 * seata file模式
+	 */
+	String FILE_MODE = "file";
+
+	/**
+	 * seata nacos模式
+	 */
+	String NACOS_MODE = "nacos";
+
+	/**
+	 * seata default模式
+	 */
+	String DEFAULT_MODE = "default";
+
+	/**
+	 * seata group后缀
+	 */
+	String GROUP_NAME = "-group";
+
+	/**
+	 * seata 服务组格式
+	 *
+	 * @param appName 服务名
+	 * @return group
+	 */
+	static String seataServiceGroup(String appName) {
+		return appName.concat(GROUP_NAME);
+	}
+
+	/**
+	 * 动态获取nacos地址
+	 *
+	 * @param profile 环境变量
+	 * @return addr
+	 */
+	static String nacosAddr(String profile) {
+		final String nacos_addr = System.getenv("NACOS_ADDR");
+
+		System.out.println(nacos_addr);
+
+		if(!StringUtils.isEmpty(nacos_addr)) {
+			return nacos_addr;
+		}
+		switch (profile) {
+			case (AppConstant.PROD_CODE):
+				return NACOS_PROD_ADDR;
+			case (AppConstant.TEST_CODE):
+				return NACOS_TEST_ADDR;
+			default:
+				return NACOS_DEV_ADDR;
+		}
+	}
+
+	/**
+	 * 动态获取sentinel地址
+	 *
+	 * @param profile 环境变量
+	 * @return addr
+	 */
+	static String sentinelAddr(String profile) {
+		final String sentinel_addr = System.getenv("SENTINEL_ADDR");
+
+		if(!StringUtils.isEmpty(sentinel_addr)) {
+			return sentinel_addr;
+		}
+		switch (profile) {
+			case (AppConstant.PROD_CODE):
+				return SENTINEL_PROD_ADDR;
+			case (AppConstant.TEST_CODE):
+				return SENTINEL_TEST_ADDR;
+			default:
+				return SENTINEL_DEV_ADDR;
+		}
+	}
+
+	/**
+	 * 动态获取seata地址
+	 *
+	 * @param profile 环境变量
+	 * @return addr
+	 */
+	static String seataAddr(String profile) {
+		final String seata_addr = System.getenv("SEATA_ADDR");
+
+		if(!StringUtils.isEmpty(seata_addr)) {
+			return seata_addr;
+		}
+		switch (profile) {
+			case (AppConstant.PROD_CODE):
+				return SEATA_PROD_ADDR;
+			case (AppConstant.TEST_CODE):
+				return SEATA_TEST_ADDR;
+			default:
+				return SEATA_DEV_ADDR;
+		}
+	}
+
+}

+ 68 - 0
ims-common/src/main/java/com/ims/common/launch/LauncherServiceImpl.java

@@ -0,0 +1,68 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.common.launch;
+
+import com.ims.common.constant.LauncherConstant;
+import org.springblade.core.auto.service.AutoService;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.launch.service.LauncherService;
+import org.springblade.core.launch.utils.PropsUtil;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+
+import java.util.Properties;
+
+/**
+ * 启动参数拓展
+ *
+ * @author smallchil
+ */
+@AutoService(LauncherService.class)
+public class LauncherServiceImpl implements LauncherService {
+
+	@Override
+	public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
+		Properties props = System.getProperties();
+		//日志等级
+		PropsUtil.setProperty(props,"logging.level.root","info");
+		// 通用注册
+		PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.server-addr", LauncherConstant.nacosAddr(profile));
+		PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile));
+		PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));
+
+		// dubbo注册
+		PropsUtil.setProperty(props, "dubbo.application.name", appName);
+		PropsUtil.setProperty(props, "dubbo.application.qos.enable", "false");
+		PropsUtil.setProperty(props, "dubbo.protocol.name", "dubbo");
+		PropsUtil.setProperty(props, "dubbo.registry.address", "nacos://" + LauncherConstant.nacosAddr(profile));
+		PropsUtil.setProperty(props, "dubbo.version", AppConstant.APPLICATION_VERSION);
+		PropsUtil.setProperty(props, "dubbo.scan.base-packages", AppConstant.BASE_PACKAGES);
+
+		// seata注册地址
+		PropsUtil.setProperty(props, "seata.service.grouplist.default", LauncherConstant.seataAddr(profile));
+		// seata注册group格式
+		PropsUtil.setProperty(props, "seata.tx-service-group", LauncherConstant.seataServiceGroup(appName));
+		// seata配置服务group
+		PropsUtil.setProperty(props, "seata.service.vgroup-mapping.".concat(LauncherConstant.seataServiceGroup(appName)), LauncherConstant.DEFAULT_MODE);
+		// seata注册模式配置
+		// PropsUtil.setProperty(props, "seata.registry.type", LauncherConstant.NACOS_MODE);
+		// PropsUtil.setProperty(props, "seata.registry.nacos.server-addr", LauncherConstant.nacosAddr(profile));
+		// PropsUtil.setProperty(props, "seata.config.type", LauncherConstant.NACOS_MODE);
+		// PropsUtil.setProperty(props, "seata.config.nacos.server-addr", LauncherConstant.nacosAddr(profile));
+
+	}
+
+}

+ 26 - 0
ims-common/src/main/java/com/ims/common/utils/CommonUtil.java

@@ -0,0 +1,26 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.common.utils;
+
+/**
+ * 通用工具类
+ *
+ * @author Chill
+ */
+public class CommonUtil {
+
+}

+ 6 - 0
ims-common/src/main/resources/banner.txt

@@ -0,0 +1,6 @@
+${AnsiColor.BLUE}             _ __     _              _         __
+${AnsiColor.BLUE}            | '_ \   | |    __ _    | |_      / _|   ___      _ _   _ __
+${AnsiColor.BLUE}            | .__/   | |   / _` |   |  _|    |  _|  / _ \    | '_| | '  \
+${AnsiColor.BLUE}            |_|__   _|_|_  \__,_|   _\__|   _|_|_   \___/   _|_|_  |_|_|_|
+
+${AnsiColor.BLUE}:: BladeX :: ${spring.application.name}:${AnsiColor.RED}${blade.env}${AnsiColor.BLUE} :: Running SpringBoot ${spring-boot.version} :: ${AnsiColor.BRIGHT_BLACK}

+ 15 - 0
ims-gateway/Dockerfile

@@ -0,0 +1,15 @@
+FROM anapsix/alpine-java:8_server-jre_unlimited
+
+MAINTAINER smallchill@163.com
+
+RUN mkdir -p /blade/gateway
+
+WORKDIR /blade/gateway
+
+EXPOSE 80
+
+ADD ./target/blade-gateway.jar ./app.jar
+
+ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
+
+CMD ["--spring.profiles.active=test"]

+ 61 - 0
ims-gateway/pom.xml

@@ -0,0 +1,61 @@
+<?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>
+        <groupId>com.ims.as</groupId>
+        <artifactId>ims-as</artifactId>
+        <version>2.5.0.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ims-gateway</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${ims.project.version}</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.ims.system</groupId>
+            <artifactId>ims-gateway-support</artifactId>
+            <version>2.5.0.RELEASE</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ims.as</groupId>
+            <artifactId>ims-common</artifactId>
+            <version>${ims.project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springblade</groupId>
+                    <artifactId>blade-core-launch</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <username>${docker.username}</username>
+                    <password>${docker.password}</password>
+                    <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 40 - 0
ims-gateway/src/main/java/com/ims/gateway/GateWayApplication.java

@@ -0,0 +1,40 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.gateway;
+
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.launch.BladeApplication;
+import org.springframework.cloud.client.SpringCloudApplication;
+import org.springframework.cloud.netflix.hystrix.EnableHystrix;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+/**
+ * 项目启动
+ *
+ * @author Chill
+ */
+@EnableHystrix
+@EnableScheduling
+@SpringCloudApplication
+public class GateWayApplication {
+
+	public static void main(String[] args) {
+		//System.setProperty("csp.sentinel.app.type", "1");
+		BladeApplication.run(AppConstant.APPLICATION_GATEWAY_NAME, GateWayApplication.class, args);
+	}
+
+}

+ 53 - 0
ims-gateway/src/main/java/com/ims/gateway/config/ExceptionHandlerPage.java

@@ -0,0 +1,53 @@
+/*
+package com.ims.gateway.config;
+
+import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.BlockRequestHandler;
+import com.alibaba.csp.sentinel.slots.block.authority.AuthorityException;
+import com.alibaba.csp.sentinel.slots.block.degrade.DegradeException;
+import com.alibaba.csp.sentinel.slots.block.flow.FlowException;
+import com.alibaba.csp.sentinel.slots.block.flow.param.ParamFlowException;
+import com.alibaba.csp.sentinel.slots.system.SystemBlockException;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Component;
+import org.springframework.web.reactive.function.BodyInserters;
+import org.springframework.web.reactive.function.server.ServerResponse;
+import org.springframework.web.server.ServerWebExchange;
+import reactor.core.publisher.Mono;
+
+@Component
+public class ExceptionHandlerPage implements BlockRequestHandler {
+
+		@Override
+		public Mono<ServerResponse> handleRequest(ServerWebExchange exchange, Throwable e) {
+			ResponseData responseData = new ResponseData();
+			if (e instanceof FlowException) {
+				responseData = new ResponseData(410, "接口被限流了...");
+			} else if (e instanceof DegradeException) {
+				responseData = new ResponseData(420, "接口被降级了...");
+			} else if (e instanceof ParamFlowException) {
+				responseData = new ResponseData(430, "参数限流异常...");
+			} else if (e instanceof AuthorityException) {
+				responseData = new ResponseData(440, "授权异常...");
+			} else if (e instanceof SystemBlockException) {
+				responseData = new ResponseData(450, "系统负载异常...");
+			}
+			return ServerResponse.status(HttpStatus.OK).contentType(MediaType.APPLICATION_JSON).body(BodyInserters.fromObject(responseData));
+		}
+}
+*/
+/**
+ * 定义返回的实体类,字段根据需要添加
+ *//*
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+class ResponseData {
+	private int code;
+	private String message;
+}
+*/

+ 45 - 0
ims-gateway/src/main/java/com/ims/gateway/config/GatewayConfiguration.java

@@ -0,0 +1,45 @@
+/*
+package com.ims.gateway.config;
+
+import com.alibaba.csp.sentinel.adapter.gateway.sc.SentinelGatewayFilter;
+import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.GatewayCallbackManager;
+import com.alibaba.csp.sentinel.adapter.gateway.sc.exception.SentinelGatewayBlockExceptionHandler;
+import org.springframework.beans.factory.ObjectProvider;
+import org.springframework.cloud.gateway.filter.GlobalFilter;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.Ordered;
+import org.springframework.core.annotation.Order;
+import org.springframework.http.codec.ServerCodecConfigurer;
+import org.springframework.web.reactive.result.view.ViewResolver;
+
+import java.util.Collections;
+import java.util.List;
+
+@Configuration
+public class GatewayConfiguration {
+
+	private final List<ViewResolver> viewResolvers;
+	private final ServerCodecConfigurer serverCodecConfigurer;
+
+	public GatewayConfiguration(ObjectProvider<List<ViewResolver>> viewResolversProvider,
+								ServerCodecConfigurer serverCodecConfigurer) {
+		this.viewResolvers = viewResolversProvider.getIfAvailable(Collections::emptyList);
+		this.serverCodecConfigurer = serverCodecConfigurer;
+	}
+
+	@Bean
+	@Order(Ordered.HIGHEST_PRECEDENCE)
+	public SentinelGatewayBlockExceptionHandler sentinelGatewayBlockExceptionHandler() {
+		GatewayCallbackManager.setBlockHandler(new ExceptionHandlerPage());
+		return new SentinelGatewayBlockExceptionHandler(viewResolvers, serverCodecConfigurer);
+	}
+
+	@Bean
+	@Order(Ordered.HIGHEST_PRECEDENCE)
+	public GlobalFilter sentinelGatewayFilter() {
+		return new SentinelGatewayFilter();
+	}
+}
+
+*/

+ 15 - 0
ims-gateway/src/main/resources/application-dev.yml

@@ -0,0 +1,15 @@
+blade:
+  #多团队协作服务配置
+  ribbon:
+    rule:
+      #开启配置
+      enabled: true
+      #负载均衡优先调用的ip段
+      prior-ip-pattern:
+        - 127.0.0.1
+        - 10.65.79.23
+        - 192.168.0.*
+        #- 127.0.0.1
+
+
+

+ 42 - 0
ims-gateway/src/main/resources/bootstrap.yml

@@ -0,0 +1,42 @@
+server:
+  port: 18600
+spring:
+  cloud:
+    gateway:
+      httpclient:
+        connect-timeout: 1000
+        response-timeout: 5s
+      discovery:
+        locator:
+          enabled: true
+      routes:
+        - id: ims-am
+          uri: http://114.115.246.24:18700
+          predicates:
+            - Path=/as/asApplication/**
+        - id: sm-test
+          uri: http://127.0.0.1:18799
+          predicates:
+            - Path=/pubinfo/**
+          #metadata:
+            #response-timeout: 10
+            #connect-timeout: 10
+    loadbalancer:
+      retry:
+        enabled: true
+# 聚合文档配置
+blade:
+  document:
+    resources:
+      - name: 基础业务模块
+        location: /ims-ext
+      - name: 系统模块
+        location: /blade-system
+      - name: 鉴权
+        location: /ims-idas
+      - name: iam
+        location: /ims-idms
+      - name: 日志
+        location: /blade-log
+      - name: 用户
+        location: /blade-user

+ 38 - 0
ims-service-api/ims-am-api/pom.xml

@@ -0,0 +1,38 @@
+<?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>ims-service-api</artifactId>
+        <groupId>com.ims.as</groupId>
+        <version>2.5.0.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ims-am-api</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.ims.core</groupId>
+            <artifactId>ims-core</artifactId>
+            <version>${ims.core.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ims.as</groupId>
+            <artifactId>ims-common</artifactId>
+            <version>${ims.project.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springblade</groupId>
+                    <artifactId>blade-core-launch</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-openfeign-core</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 220 - 0
ims-service-api/ims-am-api/src/main/java/com/ims/ims/am/entity/AsApplication.java

@@ -0,0 +1,220 @@
+/**
+ *
+ */
+package com.ims.ims.am.entity;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.ims.core.entity.DataEntity;
+
+import java.util.Date;
+
+/**
+ * 应用台账Entity
+ * @author mwd
+ * @version 2021-04-15
+ */
+public class AsApplication extends DataEntity<AsApplication> {
+
+	private static final long serialVersionUID = 1L;
+	private String code;		// 应用编码
+	private String name;		// 名称
+	private String type;		// 业务分类
+	private String type2;		// 技术分类
+	private String type3;		// 资源类型
+	private String type4;		// 部署方式
+	private String type5;		// 权限类型
+	private String resource;		// 资源要求
+	private String developer;		// 开发商
+	private String developerName;		// 开发商名称
+	private Date publishDate;		// 发布日期
+	private Long size;		// 文件大小
+	private String version;		// 当前版本
+	private String image;		// 图标
+	private String imageId;		// 图标编码
+	private String quickMark;		// 二维码
+	private String quickId;		// 二维码编码
+	private String status;		// 状态
+	private String href;		// 路径
+	private String orgIds;		// 授权单位
+	private String orgNames;		// 授权名称
+	private Integer sorting;		// 排序
+	private String tenantId;		// 租户id
+
+
+	public AsApplication() {
+		super();
+	}
+
+	public AsApplication(String id){
+		super(id);
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+	public String getType2() {
+		return type2;
+	}
+
+	public void setType2(String type2) {
+		this.type2 = type2;
+	}
+	public String getType3() {
+		return type3;
+	}
+
+	public void setType3(String type3) {
+		this.type3 = type3;
+	}
+	public String getType4() {
+		return type4;
+	}
+
+	public void setType4(String type4) {
+		this.type4 = type4;
+	}
+	public String getType5() {
+		return type5;
+	}
+
+	public void setType5(String type5) {
+		this.type5 = type5;
+	}
+	public String getResource() {
+		return resource;
+	}
+
+	public void setResource(String resource) {
+		this.resource = resource;
+	}
+	public String getDeveloper() {
+		return developer;
+	}
+
+	public void setDeveloper(String developer) {
+		this.developer = developer;
+	}
+	public String getDeveloperName() {
+		return developerName;
+	}
+
+	public void setDeveloperName(String developerName) {
+		this.developerName = developerName;
+	}
+	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
+	public Date getPublishDate() {
+		return publishDate;
+	}
+
+	public void setPublishDate(Date publishDate) {
+		this.publishDate = publishDate;
+	}
+	public Long getSize() {
+		return size;
+	}
+
+	public void setSize(Long size) {
+		this.size = size;
+	}
+	public String getVersion() {
+		return version;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+	public String getImage() {
+		return image;
+	}
+
+	public void setImage(String image) {
+		this.image = image;
+	}
+	public String getQuickMark() {
+		return quickMark;
+	}
+
+	public void setQuickMark(String quickMark) {
+		this.quickMark = quickMark;
+	}
+
+	public String getHref() {
+		return href;
+	}
+
+	public void setHref(String href) {
+		this.href = href;
+	}
+
+	public String getOrgIds() {
+		return orgIds;
+	}
+
+	public void setOrgIds(String orgIds) {
+		this.orgIds = orgIds;
+	}
+
+	public String getOrgNames() {
+		return orgNames;
+	}
+
+	public void setOrgNames(String orgNames) {
+		this.orgNames = orgNames;
+	}
+
+	public String getStatus() {
+		return status;
+	}
+
+	public void setStatus(String status) {
+		this.status = status;
+	}
+	public Integer getSorting() {
+		return sorting;
+	}
+
+	public void setSorting(Integer sorting) {
+		this.sorting = sorting;
+	}
+	public String getTenantId() {
+		return tenantId;
+	}
+
+	public void setTenantId(String tenantId) {
+		this.tenantId = tenantId;
+	}
+
+	public String getImageId() {
+		return imageId;
+	}
+
+	public void setImageId(String imageId) {
+		this.imageId = imageId;
+	}
+
+	public String getQuickId() {
+		return quickId;
+	}
+
+	public void setQuickId(String quickId) {
+		this.quickId = quickId;
+	}
+}

+ 23 - 0
ims-service-api/ims-am-api/src/main/java/com/ims/ims/am/feign/VsAmClient.java

@@ -0,0 +1,23 @@
+package com.ims.ims.am.feign;
+
+import com.ims.common.constant.CommonConstant;
+import com.ims.ims.am.entity.AsApplication;
+import io.protostuff.Request;
+import org.springblade.core.tool.api.R;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+@FeignClient(
+	value = "ims-am"
+)
+public interface VsAmClient {
+
+	String API_PREFIX = "/client";
+	String GET_ORG_APPS = API_PREFIX+"/getByOrg";
+
+	@GetMapping(value = GET_ORG_APPS)
+	R<List<AsApplication>> getAppsOfOrg(@RequestParam(required = false,value = "orgId") String orgId);
+}

+ 15 - 0
ims-service-api/ims-am-api/src/main/java/com/ims/ims/am/feign/VsAmClientFallBack.java

@@ -0,0 +1,15 @@
+package com.ims.ims.am.feign;
+
+import com.ims.ims.am.entity.AsApplication;
+import org.springblade.core.tool.api.R;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+public class VsAmClientFallBack implements VsAmClient{
+	@Override
+	public R<List<AsApplication>> getAppsOfOrg(String orgId) {
+		return null;
+	}
+}

+ 73 - 0
ims-service-api/pom.xml

@@ -0,0 +1,73 @@
+<?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>
+        <groupId>com.ims.as</groupId>
+        <artifactId>ims-as</artifactId>
+        <version>2.5.0.RELEASE</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ims-service-api</artifactId>
+    <packaging>pom</packaging>
+    <description>IMS API集合</description>
+
+    <modules>
+        <module>ims-am-api</module>
+    </modules>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-mybatis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-tenant</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger</groupId>
+                    <artifactId>swagger-models</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-auto</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.ims.core</groupId>
+            <artifactId>ims-core</artifactId>
+            <version>${ims.core.version}</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                    <finalName>${project.name}</finalName>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 77 - 0
ims-service/ims-am/pom.xml

@@ -0,0 +1,77 @@
+<?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>ims-service</artifactId>
+        <groupId>com.ims.as</groupId>
+        <version>2.5.0.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ims-am</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${ims.project.version}</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-boot</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>2.5.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-auto</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.xuxueli</groupId>
+            <artifactId>xxl-job-core</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ims.as</groupId>
+            <artifactId>ims-am-api</artifactId>
+            <version>${ims.project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-trace</artifactId>
+            <version>8.5.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-logback-1.x</artifactId>
+            <version>8.5.0</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <username>${docker.username}</username>
+                    <password>${docker.password}</password>
+                    <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 22 - 0
ims-service/ims-am/src/main/java/com/ims/ims/am/AmApplication.java

@@ -0,0 +1,22 @@
+package com.ims.ims.am;
+
+import com.ims.common.constant.CommonConstant;
+import org.springblade.core.launch.BladeApplication;
+import org.springframework.cloud.client.SpringCloudApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScans;
+
+/**
+ * Am启动器
+ *
+ * @author Chill
+ */
+@SpringCloudApplication
+@ComponentScans({
+	@ComponentScan("com.ims.ext.act")
+})
+public class AmApplication {
+	public static void main(String[] args) {
+		BladeApplication.run("ims-am", AmApplication.class, args);
+	}
+}

+ 37 - 0
ims-service/ims-am/src/main/java/com/ims/ims/am/config/ImsDemoConfiguration.java

@@ -0,0 +1,37 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.ims.am.config;
+
+
+import com.ims.ims.am.props.DemoProperties;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 配置feign、mybatis包名、properties
+ *
+ * @author Chill
+ */
+@Configuration
+@EnableFeignClients({"com.ims"})
+@MapperScan({"com.ims.ims.am.dao.**","com.ims.**.dao.**"})
+@EnableConfigurationProperties(DemoProperties.class)
+public class ImsDemoConfiguration {
+}

+ 55 - 0
ims-service/ims-am/src/main/java/com/ims/ims/am/config/XxlJobConfig.java

@@ -0,0 +1,55 @@
+package com.ims.ims.am.config;
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Slf4j
+//@ConditionalOnProperty(prefix = "xxl.job",value = "enable",matchIfMissing = false)
+//@Configuration
+public class XxlJobConfig {
+
+	@Value("${xxl.job.admin.addresses}")
+	private String adminAddresses;
+
+	@Value("${xxl.job.accessToken}")
+	private String accessToken;
+
+	@Value("${xxl.job.executor.appname}")
+	private String appname;
+
+	@Value("${xxl.job.executor.address}")
+	private String address;
+
+	@Value("${xxl.job.executor.ip}")
+	private String ip;
+
+	@Value("${xxl.job.executor.port}")
+	private int port;
+
+	@Value("${xxl.job.executor.logpath}")
+	private String logPath;
+
+	@Value("${xxl.job.executor.logretentiondays}")
+	private int logRetentionDays;
+
+	@Bean
+	public XxlJobSpringExecutor xxlJobExecutor() {
+		log.info(">>>>>>>>>>> xxl-job config init.");
+		XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+		xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
+		xxlJobSpringExecutor.setAppname(appname);
+		xxlJobSpringExecutor.setAddress(address);
+		xxlJobSpringExecutor.setIp(ip);
+		xxlJobSpringExecutor.setPort(port);
+		xxlJobSpringExecutor.setAccessToken(accessToken);
+		xxlJobSpringExecutor.setLogPath(logPath);
+		xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
+
+		return xxlJobSpringExecutor;
+	}
+
+}

+ 18 - 0
ims-service/ims-am/src/main/java/com/ims/ims/am/launch/LauncherServiceImpl.java

@@ -0,0 +1,18 @@
+package com.ims.ims.am.launch;
+
+import org.springblade.core.auto.service.AutoService;
+import org.springblade.core.launch.service.LauncherService;
+import org.springblade.core.launch.utils.PropsUtil;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+
+import java.util.Properties;
+
+//启动项,增加配置
+@AutoService(LauncherService.class)
+public class LauncherServiceImpl implements LauncherService {
+	public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
+//
+//		Properties props = System.getProperties();
+//		props.setProperty("spring.cloud.nacos.config.shared-dataids", "demo.yaml");
+	}
+}

+ 7 - 0
ims-service/ims-am/src/main/java/com/ims/ims/am/props/DemoProperties.java

@@ -0,0 +1,7 @@
+package com.ims.ims.am.props;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties(prefix = "am")
+public class DemoProperties {
+}

+ 44 - 0
ims-service/ims-am/src/main/resources/application-dev.yml

@@ -0,0 +1,44 @@
+#服务器端口
+server:
+  port: 18700
+
+
+
+spring:
+  #排除DruidDataSourceAutoConfigure
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+  datasource:
+    dynamic:
+      #设置默认的数据源或者数据源组,默认值即为master
+      primary: master
+      datasource:
+        master:
+          driver-class-name: org.postgresql.Driver
+          url: ${blade.datasource.dev.url}
+          username: ${blade.datasource.dev.username}
+          password: ${blade.datasource.dev.password}
+#        impala:
+#          hikari:
+#            minimum-idle: 5
+#            maximum-pool-size: 500
+#            max-lifetime: 0
+#          type: com.zaxxer.hikari.HikariDataSource
+#          driver-class-name: com.cloudera.impala.jdbc41.Driver
+#          url: jdbc:impala://10.65.80.15:21050/gddl_pg;UseSasl=0;AuthMech=3;UID=gddl;PWD=q1w2e3@ASD;OptimizedInsert=0;
+#          druid:
+#            filters: stat,slf4j
+xxl:
+  job:
+    accessToken: ''
+    admin:
+      addresses: http://10.65.78.23:12345/xxl-job-admin
+    executor:
+      address:
+      appname: ims-am
+      ip:
+      logpath: /home/applogs/xxl-job/jobhandler
+      logretentiondays: -1
+      port: 7019
+
+

+ 16 - 0
ims-service/ims-am/src/main/resources/application.yml

@@ -0,0 +1,16 @@
+#mybatis-plus配置
+mybatis-plus:
+  mapper-locations: classpath:mappings/**/*.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.ims.ims.am.entity,com.ims.**.entity
+
+#swagger扫描路径配置
+swagger:
+  base-packages:
+    - com.ims.ims
+spring:
+  cloud:
+    gateway:
+      httpclient:
+        connect-timeout: 1000
+        response-timeout: 5s

+ 274 - 0
ims-service/ims-am/src/main/resources/ims_postgresql_func.sql

@@ -0,0 +1,274 @@
+CREATE OR REPLACE FUNCTION get_next_id(obj_id_  IN VARCHAR  ,
+                                       ext_value_ IN  VARCHAR  ) RETURNS VARCHAR AS $$
+
+declare
+     l_res VARCHAR ;
+     l_temp VARCHAR;
+     l_temp_ext_value VARCHAR;
+     l_field_value VARCHAR;
+     l_key_type VARCHAR;
+     l_start integer;
+     l_step integer;
+     l_value integer;
+     nPos integer;
+     l_index integer;
+     l_lead_zero_len integer;
+     l_mask VARCHAR;
+     l_ext_value VARCHAR;
+
+
+     get_sys_id cursor(obj_id_  varchar)  FOR
+     SELECT  KEY_TYPE, start ,STEP, VALUE ,MASK, lead_zero_len,ext_value
+     FROM sys_id WHERE obj_id =  obj_id_;
+BEGIN
+
+   open get_sys_id(obj_id_);
+   fetch get_sys_id INTO l_key_type,l_start,l_step,l_value,l_mask ,l_lead_zero_len,l_ext_value;
+   close get_sys_id ;
+   IF l_start IS NULL THEN
+     l_start:=1;
+   END IF;
+   IF l_step IS NULL THEN
+       l_step :=1;
+   END IF;
+   if l_key_type is null THEN
+     SELECT  sys_guid() INTO l_res;
+     l_res := REPLACE(l_res,'-','') ;
+   end if;
+   /*l_key_type*/
+   /*1: 自增,2: UUID,3: 日期+自增,4: 年月+自增;5: 年+自增  */
+    IF l_key_type='1' THEN
+				 IF l_value IS NULL THEN
+						 l_value :=l_start;
+				 ELSE
+						 l_value := l_value+ l_step;
+				 END IF;
+         IF l_lead_zero_len>0 THEN
+            l_res :=LPAD(l_value,l_lead_zero_len,'0') ;
+         ELSE
+            l_res :=cast(l_value as INTEGER) ;
+         END IF;
+         IF l_mask IS NOT NULL THEN
+            l_res:= REPLACE(l_mask,'{SEQ}',l_res) ;
+         END IF;
+        UPDATE sys_id
+        SET VALUE=l_value
+        WHERE obj_id =  obj_id_ ;
+   ELSIF l_key_type='3' THEN
+
+     SELECT to_char(now(),'YYYYMMDD') INTO l_temp_ext_value  ;
+     IF l_temp_ext_value= l_ext_value THEN
+				 IF l_value IS NULL THEN
+						l_value :=l_start;
+				 ELSE
+					 l_value := l_value+ l_step;
+				 END IF;
+     ELSE
+          l_value :=l_start;
+          l_ext_value :=l_temp_ext_value;
+     END IF;
+		 IF l_lead_zero_len>0 THEN
+			   l_temp :=LPAD(l_value,l_lead_zero_len,'0') ;
+		 ELSE
+				 l_temp :=cast(l_value as INTEGER);
+		 END IF;
+     IF l_mask IS NOT NULL THEN
+             l_res := REPLACE(l_mask,'{DATE}',l_ext_value) ;
+             l_res := REPLACE(l_res,'{SEQ}',l_temp) ;
+     ELSE
+             l_res := l_ext_value||'-'||l_temp ;
+     END IF;
+        UPDATE sys_id
+        SET VALUE=l_value,
+            ext_value=l_ext_value
+        WHERE obj_id =  obj_id_ ;
+   ELSIF l_key_type='4' THEN
+
+     SELECT to_char(now(),'YYYYMM') INTO l_temp_ext_value ;
+     IF l_temp_ext_value= l_ext_value THEN
+				 IF l_value IS NULL THEN
+					  l_value :=l_start;
+				 ELSE
+					  l_value := l_value+ l_step;
+				 END IF;
+     ELSE
+          l_value :=l_start;
+          l_ext_value :=l_temp_ext_value;
+     END IF;
+		 IF l_lead_zero_len>0 THEN
+			  l_temp :=LPAD(l_value,l_lead_zero_len,'0') ;
+		 ELSE
+				 l_temp :=cast(l_value as INTEGER);
+		 END IF;
+     IF l_mask IS NOT NULL THEN
+           l_res := REPLACE(l_mask,'{DATE}',l_ext_value) ;
+           l_res := REPLACE(l_res,'{SEQ}',l_temp) ;
+     ELSE
+          l_res :=  l_ext_value||'-'||l_temp ;
+     END IF;
+         UPDATE sys_id
+        SET VALUE=l_value,
+            ext_value=l_ext_value
+        WHERE obj_id =  obj_id_ ;
+   ELSIF l_key_type='5' THEN
+
+     SELECT to_char(now(),'YYYY') INTO l_temp_ext_value ;
+     IF l_temp_ext_value= l_ext_value THEN
+				 IF l_value IS NULL THEN
+						 l_value :=l_start;
+				 ELSE
+						 l_value := l_value+ l_step;
+				 END IF;
+     ELSE
+          l_value :=l_start;
+          l_ext_value :=l_temp_ext_value;
+     END IF;
+		 IF l_lead_zero_len>0 THEN
+				 l_temp :=LPAD(l_value,l_lead_zero_len,'0') ;
+		 ELSE
+				 l_temp :=cast(l_value as INTEGER);
+		 END IF;
+     IF l_mask IS NOT NULL THEN
+              l_res := REPLACE(l_mask,'{DATE}',l_ext_value) ;
+              l_res := REPLACE(l_res,'{SEQ}',l_temp) ;
+     ELSE
+              l_res := l_ext_value||'-'||l_temp ;
+     END IF;
+         UPDATE sys_id
+        SET VALUE=l_value,
+            ext_value=l_ext_value
+        WHERE obj_id =  obj_id_ ;
+   ELSE  --l_key_type='2' THEN
+     SELECT  sys_guid() INTO l_res ;
+     l_res := REPLACE(l_res,'-','') ;
+   END IF;
+   IF  ext_value_  is not null THEN
+        l_index:=1;
+        l_temp:=ext_value_ ;
+        WHILE position(';' in l_temp)>0 loop
+            nPos:=position(';' in l_temp);
+            l_field_value:=substring(l_temp from 1 for nPos-1);
+            l_temp:=substring(l_temp from nPos+1 );
+            l_res := REPLACE(l_res,'{'||cast(l_index as INTEGER)||'}',l_field_value) ;
+            l_index:=l_index+1;
+        END loop;
+        l_res := REPLACE(l_res, '{'||cast(l_index as INTEGER)||'}' ,l_temp) ;
+   END IF;
+   --commit;
+   RETURN l_res;
+END ;
+$$ language plpgsql;
+
+CREATE or REPLACE FUNCTION  sys_guid()
+RETURNS varchar AS
+$$
+DECLARE
+v_seed_value varchar(32);
+BEGIN
+select
+md5(
+inet_client_addr()::varchar ||
+timeofday() ||
+inet_server_addr()::varchar ||
+to_hex(inet_client_port())
+)
+into v_seed_value;
+
+
+return (substr(v_seed_value,1,8) ||
+substr(v_seed_value,9,4) ||
+substr(v_seed_value,13,4) ||
+substr(v_seed_value,17,4) ||
+substr(v_seed_value,21,12));
+END;
+$$
+LANGUAGE 'plpgsql' ;
+
+
+CREATE OR REPLACE FUNCTION   TREPS_CONCAT(str1  VARCHAR  , str2  VARCHAR  , str3  VARCHAR  ) RETURNS VARCHAR  AS $$
+
+BEGIN
+
+   RETURN str1||str2||str3;
+
+END  ;
+$$ language plpgsql;
+
+CREATE OR REPLACE FUNCTION  treps_date_to_char(date1  timestamp    , strFormat  VARCHAR ) RETURNS VARCHAR  as $$
+
+BEGIN
+
+   RETURN to_char(date1,strFormat) ;
+
+END   ;
+$$ language plpgsql;
+
+
+CREATE OR REPLACE FUNCTION  treps_instr(str   varchar, substr1  varchar,flag integer default 0) returns  integer as $$
+declare
+    l_res integer;
+    posSep integer;
+    posSepSub integer;
+    strTemp varchar;
+BEGIN
+  if (substr1 is null or substr1='')  THEN
+
+      return 0;
+
+  end if;
+  if (str is null or str='')  THEN
+    if   (flag=1) then
+      return 1;
+    ELSE
+      return 0;
+    end if;
+  end if;
+  posSep:=position( ',' in str );
+  posSepSub:=position( ',' in substr1 ) ;
+  if (posSep>0) OR (posSepSub>0) then
+     if posSepSub>0 then
+		     l_res:=0;
+		     strTemp:=substr1;
+		     while (posSepSub>0)and(char_length(strTemp)>0) loop
+
+		       if position( ','||substring(strTemp from 1 for posSepSub-1)||',' in  ','||str||',')>0 then
+		         return 1;
+		       end if;
+
+		       strTemp:= substring(strTemp from posSepSub+1 );
+		       posSepSub:= position( ',' in strTemp );
+		     end loop;
+		     if char_length(strTemp)>0 then
+			       if  position( ','||strTemp||',' in ','||str||',' )>0 then
+		           return 1;
+		         end if;
+		     end if;
+      else
+         l_res:= position(','||substr1||',' in ','||str||',' );
+
+      end if;
+  else
+     l_res:= position(substr1 in str );
+  end if;
+
+	RETURN l_res;
+
+END  ;
+$$ language plpgsql;
+
+CREATE OR REPLACE FUNCTION   treps_to_date(str1  VARCHAR , strFormat  VARCHAR ) RETURNS date as $$
+
+BEGIN
+
+   RETURN to_date(str1,strFormat) ;
+
+END  ;
+$$ language plpgsql;
+
+CREATE OR REPLACE FUNCTION  TREPS_TO_INT(TEMP_ in varchar ) RETURNS integer AS $$
+
+BEGIN
+    RETURN  to_number(TEMP_,'9999999999');
+
+END    ;
+$$ language plpgsql;

+ 77 - 0
ims-service/ims-eval/pom.xml

@@ -0,0 +1,77 @@
+<?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>ims-service</artifactId>
+        <groupId>com.ims.as</groupId>
+        <version>2.5.0.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ims-eval</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${ims.project.version}</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-boot</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>2.5.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-auto</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.xuxueli</groupId>
+            <artifactId>xxl-job-core</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ims.as</groupId>
+            <artifactId>ims-am-api</artifactId>
+            <version>${ims.project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-trace</artifactId>
+            <version>8.5.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-logback-1.x</artifactId>
+            <version>8.5.0</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <username>${docker.username}</username>
+                    <password>${docker.password}</password>
+                    <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 23 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/EvalApplication.java

@@ -0,0 +1,23 @@
+package com.ims.eval;
+
+
+import org.springblade.core.launch.BladeApplication;
+import org.springframework.cloud.client.SpringCloudApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScans;
+
+/**
+ * eval启动器
+ *
+ * @author wang
+ */
+@SpringCloudApplication
+@ComponentScans({
+	@ComponentScan("com.ims.ext.act")
+})
+public class EvalApplication {
+
+	public static void main(String[] args) {
+		BladeApplication.run("ims-eval", EvalApplication.class, args);
+	}
+}

+ 36 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/config/ImsEvalConfiguration.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.eval.config;
+
+
+import com.ims.eval.props.EvalProperties;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 配置feign、mybatis包名、properties
+ *
+ * @author Chill
+ */
+@Configuration
+@EnableFeignClients({"com.ims"})
+@MapperScan({"com.ims.eval.dao.**","com.ims.**.dao.**"})
+@EnableConfigurationProperties(EvalProperties.class)
+public class ImsEvalConfiguration {
+}

+ 53 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/config/XxlJobConfig.java

@@ -0,0 +1,53 @@
+package com.ims.eval.config;
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+
+@Slf4j
+//@ConditionalOnProperty(prefix = "xxl.job",value = "enable",matchIfMissing = false)
+//@Configuration
+public class XxlJobConfig {
+
+	@Value("${xxl.job.admin.addresses}")
+	private String adminAddresses;
+
+	@Value("${xxl.job.accessToken}")
+	private String accessToken;
+
+	@Value("${xxl.job.executor.appname}")
+	private String appname;
+
+	@Value("${xxl.job.executor.address}")
+	private String address;
+
+	@Value("${xxl.job.executor.ip}")
+	private String ip;
+
+	@Value("${xxl.job.executor.port}")
+	private int port;
+
+	@Value("${xxl.job.executor.logpath}")
+	private String logPath;
+
+	@Value("${xxl.job.executor.logretentiondays}")
+	private int logRetentionDays;
+
+	@Bean
+	public XxlJobSpringExecutor xxlJobExecutor() {
+		log.info(">>>>>>>>>>> xxl-job config init.");
+		XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+		xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
+		xxlJobSpringExecutor.setAppname(appname);
+		xxlJobSpringExecutor.setAddress(address);
+		xxlJobSpringExecutor.setIp(ip);
+		xxlJobSpringExecutor.setPort(port);
+		xxlJobSpringExecutor.setAccessToken(accessToken);
+		xxlJobSpringExecutor.setLogPath(logPath);
+		xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
+
+		return xxlJobSpringExecutor;
+	}
+
+}

+ 136 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorDictionaryController.java

@@ -0,0 +1,136 @@
+/**
+ *
+ */
+package com.ims.eval.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ims.system.auth.ImsPreAuth;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.http.MediaType;
+
+
+import org.springframework.web.bind.annotation.*;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+
+import com.ims.core.controller.WebController;
+import com.ims.core.utils.StringUtils;
+
+import com.ims.eval.entity.IndicatorDictionary;
+import com.ims.eval.service.IIndicatorDictionaryService;
+
+/**
+ * 指标字典表Controller
+ * @author song
+ * @version 2023-02-22
+ */
+@Controller
+@RequestMapping(value = "/eval/indicatorDictionary")
+public class IndicatorDictionaryController extends WebController<IIndicatorDictionaryService,IndicatorDictionary> {
+
+ 	//@ImsPreAuth("eval:indicatorDictionary:view")
+	@RequestMapping(value = "list")
+	public String list(IndicatorDictionary indicatorDictionary, Model model) {
+		return "ims/ims-eval${ims_eval_suffix}/eval/indicatorDictionaryList";
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:view")
+	@RequestMapping(value = "form")
+	public String form(IndicatorDictionary indicatorDictionary, Model model) {
+	    String formView = indicatorDictionary.getFormView();
+	    if(StringUtils.isNotBlank(formView)){
+			return "ims/"+formView;
+		}
+		return "ims/ims-eval${ims_eval_suffix}/eval/indicatorDictionaryForm";
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:view")
+	@RequestMapping(value = "lov")
+	public String lov(IndicatorDictionary indicatorDictionary, Model model) {
+		return "ims/ims-eval${ims_eval_suffix}/eval/indicatorDictionaryList";
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:view")
+	@RequestMapping(value = "data")
+	@ResponseBody
+	public String getData(IndicatorDictionary indicatorDictionary, HttpServletRequest request, HttpServletResponse response, Model model)  throws IOException  {
+        return  super.getData(indicatorDictionary,request,response,model);
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:view")
+	@RequestMapping(value = "allData")
+	@ResponseBody
+	public String getAllData(IndicatorDictionary indicatorDictionary, HttpServletRequest request, HttpServletResponse response, Model model)  throws IOException  {
+        System.out.println("jjjjjjjjjjjjjjj");
+		return  super.getAllData(indicatorDictionary,request,response,model);
+	}
+
+
+    //@ImsPreAuth("eval:indicatorDictionary:view")
+	@RequestMapping(value = "get")
+	@ResponseBody
+	public String get(IndicatorDictionary indicatorDictionary, HttpServletRequest request, HttpServletResponse response, Model model) throws IOException {
+        return  super.get(indicatorDictionary,request,response,model);
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:edit")
+	@RequestMapping(value = "initInsert")
+	@ResponseBody
+	public String initInsert(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		return super.initInsert(indicatorDictionary,request,response,model);
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:edit")
+	@RequestMapping(value = "checkSave")
+	@ResponseBody
+	public String checkSave(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		return super.checkSave(indicatorDictionary,request,response,model);
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:edit")
+	@RequestMapping(value = "save")
+	@ResponseBody
+	public String save(IndicatorDictionary indicatorDictionary, Model model,  HttpServletRequest request, HttpServletResponse response) {
+		 return super.save(indicatorDictionary,request,response,model);
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:remove")
+	@RequestMapping(value = "checkRemove")
+	@ResponseBody
+	public String checkRemove(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		return super.checkRemove(indicatorDictionary,request,response,model);
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:remove")
+	@RequestMapping(value = "remove")
+	@ResponseBody
+	public String remove(IndicatorDictionary indicatorDictionary, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		return super.remove(indicatorDictionary,request,response,model);
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:edit")
+	@RequestMapping(value = "import",produces=MediaType.APPLICATION_JSON_UTF8_VALUE)
+	@ResponseBody
+	public String importFile(IndicatorDictionary indicatorDictionary,MultipartFile excelFile, HttpServletRequest request, HttpServletResponse response) {
+         return super.importFile(indicatorDictionary,excelFile,null,request,response);
+	}
+
+    //@ImsPreAuth("eval:indicatorDictionary:view")
+	@RequestMapping(value = "export", method= RequestMethod.POST)
+	public void exportFile(IndicatorDictionary indicatorDictionary, HttpServletRequest request, HttpServletResponse response) {
+         super.exportFile(indicatorDictionary,request,response );
+	}
+
+}

+ 16 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/dao/IndicatorDictionaryDao.java

@@ -0,0 +1,16 @@
+/**
+ *
+ */
+package com.ims.eval.dao;
+
+import com.ims.core.dao.CrudDao;
+import com.ims.eval.entity.IndicatorDictionary;
+
+/**
+ * 指标字典DAO接口
+ * @author song
+ * @version 2023-02-22
+ */
+public interface IndicatorDictionaryDao extends CrudDao<IndicatorDictionary> {
+
+}

+ 88 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/IndicatorDictionary.java

@@ -0,0 +1,88 @@
+/**
+ *
+ */
+package com.ims.eval.entity;
+
+import java.util.Date;
+import com.alibaba.fastjson.annotation.JSONField;
+
+import com.ims.core.entity.DataEntity;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+/**
+ * 指标字典Entity
+ * @author song
+ * @version 2023-02-22
+ */
+public class IndicatorDictionary extends DataEntity<IndicatorDictionary> {
+
+	private static final long serialVersionUID = 1L;
+	private String indicatorId;		// 指标ID
+	private String optionCode;		// 选项编码
+	private String optionName;		// 选项名称
+	private String optionOrder;		// 选项顺序
+	private String des;		// 描述
+	private Date createTime;		// 创建时间
+	private Date updateTime;		// 更新时间
+
+
+	public IndicatorDictionary() {
+		super();
+	}
+
+	public IndicatorDictionary(String id){
+		super(id);
+	}
+
+	public String getIndicatorId() {
+		return indicatorId;
+	}
+
+	public void setIndicatorId(String indicatorId) {
+		this.indicatorId = indicatorId;
+	}
+	public String getOptionCode() {
+		return optionCode;
+	}
+
+	public void setOptionCode(String optionCode) {
+		this.optionCode = optionCode;
+	}
+	public String getOptionName() {
+		return optionName;
+	}
+
+	public void setOptionName(String optionName) {
+		this.optionName = optionName;
+	}
+	public String getOptionOrder() {
+		return optionOrder;
+	}
+
+	public void setOptionOrder(String optionOrder) {
+		this.optionOrder = optionOrder;
+	}
+	public String getDes() {
+		return des;
+	}
+
+	public void setDes(String des) {
+		this.des = des;
+	}
+	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+}

+ 18 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/launch/LauncherServiceImpl.java

@@ -0,0 +1,18 @@
+package com.ims.eval.launch;
+
+import org.springblade.core.auto.service.AutoService;
+import org.springblade.core.launch.service.LauncherService;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+
+import java.util.Properties;
+
+//启动项,增加配置
+@AutoService(LauncherService.class)
+public class LauncherServiceImpl implements LauncherService {
+	public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
+
+		//NACOS_ADDR=10.65.78.23:8848
+		Properties props = System.getProperties();
+		props.setProperty("spring.cloud.nacos.config.shared-dataids", "gddl_dbkp.yaml");
+	}
+}

+ 9 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/props/EvalProperties.java

@@ -0,0 +1,9 @@
+package com.ims.eval.props;
+
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+
+@ConfigurationProperties(prefix = "eval")
+public class EvalProperties {
+}

+ 21 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IIndicatorDictionaryService.java

@@ -0,0 +1,21 @@
+/**
+ *
+ */
+package com.ims.eval.service;
+
+
+
+import com.ims.core.service.ICrudService;
+
+import com.ims.eval.entity.IndicatorDictionary;
+import com.ims.eval.dao.IndicatorDictionaryDao;
+
+/**
+ * 指标字典表Service
+ * @author song
+ * @version 2023-02-22
+ */
+
+public interface IIndicatorDictionaryService extends ICrudService<IndicatorDictionary> {
+
+}

+ 77 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorDictionaryServiceImpl.java

@@ -0,0 +1,77 @@
+/**
+ *
+ */
+package com.ims.eval.service.impl;
+
+import java.util.List;
+import com.ims.core.utils.IdGen;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.ims.core.persistence.Page;
+import com.ims.core.service.impl.CrudServiceImpl;
+
+import com.ims.eval.service.IIndicatorDictionaryService;
+
+import com.ims.eval.entity.IndicatorDictionary;
+import com.ims.eval.dao.IndicatorDictionaryDao;
+
+
+/**
+ * 指标字典表Service
+ * @author song
+ * @version 2023-02-22
+ */
+@Service
+@Transactional(readOnly = true)
+public class IndicatorDictionaryServiceImpl extends CrudServiceImpl<IndicatorDictionaryDao, IndicatorDictionary> implements IIndicatorDictionaryService{
+
+ 	public IndicatorDictionary get(IndicatorDictionary indicatorDictionary) {
+		return super.get(indicatorDictionary);
+	}
+
+    public List<IndicatorDictionary> findList(IndicatorDictionary indicatorDictionary) {
+        return super.findList(indicatorDictionary);
+    }
+
+	public List<IndicatorDictionary> findAllListM(IndicatorDictionary indicatorDictionary,String dataFilter,String baseFilter,String key,String baseQuery,String specQuery) {
+	 	return super.findAllListM(indicatorDictionary,dataFilter,baseFilter,key,baseQuery,specQuery);
+	}
+
+	public Page<IndicatorDictionary> findPageM(Page<IndicatorDictionary> page, IndicatorDictionary indicatorDictionary,String dataFilter,String baseFilter,String key,String baseQuery,String specQuery) {
+		return super.findPageM(page, indicatorDictionary,dataFilter,baseFilter,key,baseQuery,specQuery);
+	}
+
+	public IndicatorDictionary initInsert(IndicatorDictionary indicatorDictionary)  {
+		return super.initInsert(indicatorDictionary);
+	}
+
+	@Transactional(readOnly = false)
+	public void checkSave(IndicatorDictionary indicatorDictionary) {
+		super.checkSave(indicatorDictionary);
+	}
+
+	@Transactional(readOnly = false)
+	public IndicatorDictionary save(IndicatorDictionary indicatorDictionary, boolean isNewRecord){
+	    if(isNewRecord){
+	        indicatorDictionary.setId(IdGen.uuid());
+	    }
+		return super.save(indicatorDictionary,isNewRecord);
+	}
+
+    @Transactional(readOnly = false)
+    @Override
+    public void insertList(List<IndicatorDictionary> list){
+        super.insertList(list);
+    }
+
+	@Transactional(readOnly = false)
+	public void checkRemove(IndicatorDictionary indicatorDictionary,String baseFilter){
+		super.checkRemove(indicatorDictionary,baseFilter);
+	}
+
+	@Transactional(readOnly = false)
+	public void delete(IndicatorDictionary indicatorDictionary,String baseFilter) {
+		super.delete(indicatorDictionary,baseFilter);
+	}
+}

+ 41 - 0
ims-service/ims-eval/src/main/resources/application-dev.yml

@@ -0,0 +1,41 @@
+#服务器端口
+server:
+  port: 18800
+spring:
+  #排除DruidDataSourceAutoConfigure
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+  datasource:
+    dynamic:
+      #设置默认的数据源或者数据源组,默认值即为master
+      primary: master
+      datasource:
+        master:
+          driver-class-name: org.postgresql.Driver
+          url: ${blade.datasource.dev.url}
+          username: ${blade.datasource.dev.username}
+          password: ${blade.datasource.dev.password}
+#        impala:
+#          hikari:
+#            minimum-idle: 5
+#            maximum-pool-size: 500
+#            max-lifetime: 0
+#          type: com.zaxxer.hikari.HikariDataSource
+#          driver-class-name: com.cloudera.impala.jdbc41.Driver
+#          url: jdbc:impala://10.65.80.15:21050/gddl_pg;UseSasl=0;AuthMech=3;UID=gddl;PWD=q1w2e3@ASD;OptimizedInsert=0;
+#          druid:
+#            filters: stat,slf4j
+xxl:
+  job:
+    accessToken: ''
+    admin:
+      addresses: http://10.65.78.23:12345/xxl-job-admin
+    executor:
+      address:
+      appname: ims-eval
+      ip:
+      logpath: /home/applogs/xxl-job/jobhandler
+      logretentiondays: -1
+      port: 7019
+
+

+ 16 - 0
ims-service/ims-eval/src/main/resources/application.yml

@@ -0,0 +1,16 @@
+#mybatis-plus配置
+mybatis-plus:
+  mapper-locations: classpath:mappings/**/**/*.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.ims.eval.entity,com.ims.**.entity
+
+#swagger扫描路径配置
+swagger:
+  base-packages:
+    - com.ims.eval
+spring:
+  cloud:
+    gateway:
+      httpclient:
+        connect-timeout: 1000
+        response-timeout: 5s

+ 189 - 0
ims-service/ims-eval/src/main/resources/mappings/ims/eval/IndicatorDictionaryDao.xml

@@ -0,0 +1,189 @@
+<?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.ims.eval.dao.IndicatorDictionaryDao">
+
+	<sql id="indicatorDictionaryColumns">
+		a.id AS "id",
+		a.indicator_id AS "indicatorId",
+		a.option_code AS "optionCode",
+		a.option_name AS "optionName",
+		a.option_order AS "optionOrder",
+		a.des AS "des",
+		a.create_by AS "createBy",
+		a.create_time AS "createTime",
+		a.update_by AS "updateBy",
+		a.update_time AS "updateTime"
+	</sql>
+
+
+    <sql id="whereStr">
+			1=1
+		    <!-- 快速定位 -->
+			<if test="sqlMap.key != null and  sqlMap.key  != ''">
+			  AND (
+			  )
+			</if>
+		    <!-- 高级查询dataFilter -->
+			<if test="sqlMap.df != null and  sqlMap.df  != ''">
+			   AND ( ${sqlMap.df} )
+			</if>
+		    <!-- 默认查询baseFilter -->
+			<if test="sqlMap.bf != null and  sqlMap.bf  != ''">
+			   AND ( ${sqlMap.bf} )
+			</if>
+		    <!-- 基本Query查询 -->
+			<if test="sqlMap.baseQuery != null and  sqlMap.baseQuery  != ''">
+			   AND ( ${sqlMap.baseQuery} )
+			</if>
+		    <!-- 特定Query查询 -->
+			<if test="sqlMap.specQuery != null and  sqlMap.specQuery  != ''">
+			   AND ( ${sqlMap.specQuery} )
+			</if>
+			<if test="sqlMap.dsf != null and  sqlMap.dsf  != ''">
+				AND (${sqlMap.dsf})
+			</if>
+    </sql>
+
+	<select id="get" resultType="IndicatorDictionary">
+		SELECT
+			<include refid="indicatorDictionaryColumns"/>
+		FROM public.{table.name} a
+
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="IndicatorDictionary">
+		SELECT
+			<include refid="indicatorDictionaryColumns"/>
+		FROM public.indicator_dictionary a
+
+		<where>
+              <include refid="whereStr"/>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="findAllList" resultType="IndicatorDictionary">
+		SELECT
+			<include refid="indicatorDictionaryColumns"/>
+		FROM public.indicator_dictionary a
+
+		<where>
+			 <include refid="whereStr"/>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</select>
+
+    <sql id="insertColumns">
+	        indicator_id,
+	        option_code,
+	        option_name,
+	        option_order,
+	        des,
+	        create_time,
+	        update_time
+    </sql>
+
+	<insert id="insert">
+        <selectKey keyProperty="id" resultType="String" order="BEFORE">
+          <choose>
+			<when test="id == null or  id  == ''">
+              select get_next_id('indicator_dictionary','') from dual
+			</when>
+			<otherwise>
+			  select #{id} from dual
+			</otherwise>
+	      </choose>
+        </selectKey>
+		INSERT INTO indicator_dictionary(
+            <include refid="insertColumns"/>
+		) VALUES (
+			#{indicatorId
+, jdbcType=VARCHAR
+
+},
+			#{optionCode
+, jdbcType=VARCHAR
+
+},
+			#{optionName
+, jdbcType=VARCHAR
+
+},
+			#{optionOrder
+, jdbcType=VARCHAR
+
+},
+			#{des
+, jdbcType=VARCHAR
+
+},
+			#{createTime, jdbcType=TIMESTAMP
+
+
+},
+			#{updateTime, jdbcType=TIMESTAMP
+
+
+}
+		)
+	</insert>
+
+	<insert id="insertList">
+		INSERT INTO indicator_dictionary(
+		    <include refid="insertColumns"/>
+		) select FFF.* from (
+            <foreach collection="list" item="item" index="index" separator="UNION ALL" >
+                select
+                    #{item.indicatorId, jdbcType=VARCHAR} as "indicatorId",
+                    #{item.optionCode, jdbcType=VARCHAR} as "optionCode",
+                    #{item.optionName, jdbcType=VARCHAR} as "optionName",
+                    #{item.optionOrder, jdbcType=VARCHAR} as "optionOrder",
+                    #{item.des, jdbcType=VARCHAR} as "des",
+                    #{item.createTime, jdbcType=TIMESTAMP} as "createTime",
+                    #{item.updateTime, jdbcType=TIMESTAMP} as "updateTime"
+                from dual
+            </foreach>
+		) FFF
+
+	</insert>
+
+	<update id="update">
+		UPDATE indicator_dictionary SET
+			id = #{id},
+			indicator_id = #{indicatorId},
+			option_code = #{optionCode},
+			option_name = #{optionName},
+			option_order = #{optionOrder},
+			des = #{des},
+			create_time = #{createTime},
+			update_by = #{updateBy},
+			update_time = #{updateTime}
+		WHERE id = #{id, jdbcType=VARCHAR}
+	</update>
+
+	<update id="delete">
+		DELETE FROM public.indicator_dictionary
+	    WHERE
+		<choose>
+			<when test="id != null and  id  != ''">
+					 id = #{id, jdbcType=VARCHAR}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</update>
+
+</mapper>

+ 67 - 0
ims-service/pom.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>com.ims.as</groupId>
+        <artifactId>ims-as</artifactId>
+        <version>2.5.0.RELEASE</version>
+    </parent>
+
+    <artifactId>ims-service</artifactId>
+    <packaging>pom</packaging>
+    <description>IMS 微服务 管理</description>
+
+    <modules>
+        <module>ims-am</module>
+        <module>sm-test</module>
+        <module>ims-eval</module>
+    </modules>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.ims.as</groupId>
+            <artifactId>ims-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.ims.system</groupId>
+            <artifactId>ims-act-client</artifactId>
+            <version>2.5.0.RELEASE</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ims.core</groupId>
+            <artifactId>ims-core</artifactId>
+            <version>${ims.core.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ims</groupId>
+            <artifactId>ims-mybatis-config-starter</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.ims.system</groupId>
+            <artifactId>ims-query</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.ims.system</groupId>
+            <artifactId>ims-permission-starter</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <version>2.15.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-to-slf4j</artifactId>
+            <version>2.15.0</version>
+        </dependency>
+
+    </dependencies>
+
+</project>

+ 77 - 0
ims-service/sm-test/pom.xml

@@ -0,0 +1,77 @@
+<?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>ims-service</artifactId>
+        <groupId>com.ims.as</groupId>
+        <version>2.5.0.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>sm-test</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${ims.project.version}</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-boot</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>2.5.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-auto</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.xuxueli</groupId>
+            <artifactId>xxl-job-core</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ims.as</groupId>
+            <artifactId>ims-am-api</artifactId>
+            <version>${ims.project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-trace</artifactId>
+            <version>8.5.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.skywalking</groupId>
+            <artifactId>apm-toolkit-logback-1.x</artifactId>
+            <version>8.5.0</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <username>${docker.username}</username>
+                    <password>${docker.password}</password>
+                    <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 21 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/SmTest.java

@@ -0,0 +1,21 @@
+package com.ims.ims.sm;
+
+import org.springblade.core.launch.BladeApplication;
+import org.springframework.cloud.client.SpringCloudApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScans;
+
+/**
+ * Am启动器
+ *
+ * @author Chill
+ */
+@SpringCloudApplication
+@ComponentScans({
+	@ComponentScan("com.ims.ext.act")
+})
+public class SmTest {
+	public static void main(String[] args) {
+		BladeApplication.run("sm-test", SmTest.class, args);
+	}
+}

+ 36 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/config/ImsDemoConfiguration.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.ims.ims.sm.config;
+
+
+import com.ims.ims.sm.props.DemoProperties;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 配置feign、mybatis包名、properties
+ *
+ * @author Chill
+ */
+@Configuration
+@EnableFeignClients({"com.ims"})
+@MapperScan({"com.ims.ims.sm.dao.**","com.ims.**.dao.**"})
+@EnableConfigurationProperties(DemoProperties.class)
+public class ImsDemoConfiguration {
+}

+ 53 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/config/XxlJobConfig.java

@@ -0,0 +1,53 @@
+package com.ims.ims.sm.config;
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+
+@Slf4j
+//@ConditionalOnProperty(prefix = "xxl.job",value = "enable",matchIfMissing = false)
+//@Configuration
+public class XxlJobConfig {
+
+	@Value("${xxl.job.admin.addresses}")
+	private String adminAddresses;
+
+	@Value("${xxl.job.accessToken}")
+	private String accessToken;
+
+	@Value("${xxl.job.executor.appname}")
+	private String appname;
+
+	@Value("${xxl.job.executor.address}")
+	private String address;
+
+	@Value("${xxl.job.executor.ip}")
+	private String ip;
+
+	@Value("${xxl.job.executor.port}")
+	private int port;
+
+	@Value("${xxl.job.executor.logpath}")
+	private String logPath;
+
+	@Value("${xxl.job.executor.logretentiondays}")
+	private int logRetentionDays;
+
+	@Bean
+	public XxlJobSpringExecutor xxlJobExecutor() {
+		log.info(">>>>>>>>>>> xxl-job config init.");
+		XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+		xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
+		xxlJobSpringExecutor.setAppname(appname);
+		xxlJobSpringExecutor.setAddress(address);
+		xxlJobSpringExecutor.setIp(ip);
+		xxlJobSpringExecutor.setPort(port);
+		xxlJobSpringExecutor.setAccessToken(accessToken);
+		xxlJobSpringExecutor.setLogPath(logPath);
+		xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
+
+		return xxlJobSpringExecutor;
+	}
+
+}

+ 154 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/controller/PubinfoController.java

@@ -0,0 +1,154 @@
+/**
+ *
+ */
+package com.ims.ims.sm.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import com.alibaba.fastjson.JSONObject;
+import com.ims.system.auth.ImsPreAuth;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.http.MediaType;
+
+
+import org.springframework.web.bind.annotation.*;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+
+import com.ims.core.controller.WebController;
+import com.ims.core.utils.StringUtils;
+
+import com.ims.ims.sm.entity.Pubinfo;
+import com.ims.ims.sm.service.IPubinfoService;
+
+/**
+ * 电子公告Controller
+ * @author niyili
+ * @version 2022-12-27
+ */
+@Controller
+@RequestMapping(value = "/pubinfo/pubinfo")
+public class PubinfoController extends WebController<IPubinfoService,Pubinfo> {
+
+	@RequestMapping(value = "doLogin")
+	public void doLogin(HttpServletRequest request, HttpServletResponse response) throws IOException {
+		//获取code和iam-token
+		String iamCode = request.getParameter("code");
+		String iamAccessToken = request.getParameter("iamAccessToken");
+		String url = "http://localhost:9527/";
+		String auth_url = url + "?iamCode="+iamCode+"&iamAccessToken="+iamAccessToken;
+		System.out.println("auth_url:"+auth_url);
+		response.sendRedirect(auth_url);
+	}
+
+ 	@ImsPreAuth("pubinfo:pubinfo:view")
+	@RequestMapping(value = "list")
+	public String list(Pubinfo pubinfo, Model model) {
+		return "你好";
+	}
+
+
+	@RequestMapping(value = "list2")
+	public JSONObject list2(Pubinfo pubinfo, Model model) {
+		JSONObject json = new JSONObject();
+		json.put("json","你好");
+		return json;
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:view")
+	@RequestMapping(value = "form")
+	public String form(Pubinfo pubinfo, Model model) {
+	    String formView = pubinfo.getFormView();
+	    if(StringUtils.isNotBlank(formView)){
+			return "sm/"+formView;
+		}
+		return "sm/sm-test${sm_test_suffix}/pubinfo/pubinfoForm";
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:view")
+	@RequestMapping(value = "lov")
+	public String lov(Pubinfo pubinfo, Model model) {
+		return "sm/sm-test${sm_test_suffix}/pubinfo/pubinfoList";
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:view")
+	@RequestMapping(value = "data")
+	@ResponseBody
+	public String getData(Pubinfo pubinfo, HttpServletRequest request, HttpServletResponse response, Model model)  throws IOException  {
+        return  super.getData(pubinfo,request,response,model);
+	}
+
+//    @ImsPreAuth("pubinfo:pubinfo:view")
+	@RequestMapping(value = "allData")
+	@ResponseBody
+	public String getAllData(Pubinfo pubinfo, HttpServletRequest request, HttpServletResponse response, Model model)  throws IOException  {
+        return  super.getAllData(pubinfo,request,response,model);
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:view")
+	@RequestMapping(value = "get")
+	@ResponseBody
+	public String get(Pubinfo pubinfo, HttpServletRequest request, HttpServletResponse response, Model model) throws IOException {
+        return  super.get(pubinfo,request,response,model);
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:edit")
+	@RequestMapping(value = "initInsert")
+	@ResponseBody
+	public String initInsert(Pubinfo pubinfo, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		return super.initInsert(pubinfo,request,response,model);
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:edit")
+	@RequestMapping(value = "checkSave")
+	@ResponseBody
+	public String checkSave(Pubinfo pubinfo, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		return super.checkSave(pubinfo,request,response,model);
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:edit")
+	@RequestMapping(value = "save")
+	@ResponseBody
+	public String save(Pubinfo pubinfo, Model model,  HttpServletRequest request, HttpServletResponse response) {
+		 return super.save(pubinfo,request,response,model);
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:remove")
+	@RequestMapping(value = "checkRemove")
+	@ResponseBody
+	public String checkRemove(Pubinfo pubinfo, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		return super.checkRemove(pubinfo,request,response,model);
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:remove")
+	@RequestMapping(value = "remove")
+	@ResponseBody
+	public String remove(Pubinfo pubinfo, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+		return super.remove(pubinfo,request,response,model);
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:edit")
+	@RequestMapping(value = "import",produces=MediaType.APPLICATION_JSON_UTF8_VALUE)
+	@ResponseBody
+	public String importFile(Pubinfo pubinfo,MultipartFile excelFile, HttpServletRequest request, HttpServletResponse response) {
+         return super.importFile(pubinfo,excelFile,null,request,response);
+	}
+
+    @ImsPreAuth("pubinfo:pubinfo:view")
+	@RequestMapping(value = "export", method= RequestMethod.POST)
+	public void exportFile(Pubinfo pubinfo, HttpServletRequest request, HttpServletResponse response) {
+         super.exportFile(pubinfo,request,response );
+	}
+}

+ 16 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/dao/PubinfoDao.java

@@ -0,0 +1,16 @@
+/**
+ *
+ */
+package com.ims.ims.sm.dao;
+
+import com.ims.core.dao.CrudDao;
+import com.ims.ims.sm.entity.Pubinfo;
+
+/**
+ * 电子公告DAO接口
+ * @author niyili
+ * @version 2022-12-27
+ */
+public interface PubinfoDao extends CrudDao<Pubinfo> {
+
+}

+ 120 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/entity/Pubinfo.java

@@ -0,0 +1,120 @@
+/**
+ *
+ */
+package com.ims.ims.sm.entity;
+
+import java.util.Date;
+import com.alibaba.fastjson.annotation.JSONField;
+
+import com.ims.core.entity.DataEntity;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+/**
+ * 电子公告Entity
+ * @author niyili
+ * @version 2022-12-27
+ */
+public class Pubinfo extends DataEntity<Pubinfo> {
+
+	private static final long serialVersionUID = 1L;
+	private String title;		// 标题
+	private String descr;		// 描述
+	private Date infoStartTime;		// 有效开始时间
+	private Date infoEndTime;		// 有效截止时间
+	private String infoType;		// 公告类型
+	private String notic;		// 公告内容
+	private String readPerson;		// 阅读人
+	private String readDep;		// 阅读部门
+	private String picName;		// 撰写人
+	private String isActive;		// 是否可用
+	private String remark;		// 备注说明
+
+
+	public Pubinfo() {
+		super();
+	}
+
+	public Pubinfo(String id){
+		super(id);
+	}
+
+	public String getTitle() {
+		return title;
+	}
+
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	public String getDescr() {
+		return descr;
+	}
+
+	public void setDescr(String descr) {
+		this.descr = descr;
+	}
+	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
+	public Date getInfoStartTime() {
+		return infoStartTime;
+	}
+
+	public void setInfoStartTime(Date infoStartTime) {
+		this.infoStartTime = infoStartTime;
+	}
+	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
+	public Date getInfoEndTime() {
+		return infoEndTime;
+	}
+
+	public void setInfoEndTime(Date infoEndTime) {
+		this.infoEndTime = infoEndTime;
+	}
+	public String getInfoType() {
+		return infoType;
+	}
+
+	public void setInfoType(String infoType) {
+		this.infoType = infoType;
+	}
+	public String getNotic() {
+		return notic;
+	}
+
+	public void setNotic(String notic) {
+		this.notic = notic;
+	}
+	public String getReadPerson() {
+		return readPerson;
+	}
+
+	public void setReadPerson(String readPerson) {
+		this.readPerson = readPerson;
+	}
+	public String getReadDep() {
+		return readDep;
+	}
+
+	public void setReadDep(String readDep) {
+		this.readDep = readDep;
+	}
+	public String getPicName() {
+		return picName;
+	}
+
+	public void setPicName(String picName) {
+		this.picName = picName;
+	}
+	public String getIsActive() {
+		return isActive;
+	}
+
+	public void setIsActive(String isActive) {
+		this.isActive = isActive;
+	}
+	public String getRemark() {
+		return remark;
+	}
+
+	public void setRemark(String remark) {
+		this.remark = remark;
+	}
+
+}

+ 18 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/launch/LauncherServiceImpl.java

@@ -0,0 +1,18 @@
+package com.ims.ims.sm.launch;
+
+import org.springblade.core.auto.service.AutoService;
+import org.springblade.core.launch.service.LauncherService;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+
+import java.util.Properties;
+
+//启动项,增加配置
+@AutoService(LauncherService.class)
+public class LauncherServiceImpl implements LauncherService {
+	public void launcher(SpringApplicationBuilder builder, String appName, String profile, boolean isLocalDev) {
+//
+//		Properties props = System.getProperties();
+//		props.setProperty("spring.cloud.nacos.config.shared-dataids", "test.yaml");
+
+	}
+}

+ 7 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/props/DemoProperties.java

@@ -0,0 +1,7 @@
+package com.ims.ims.sm.props;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+@ConfigurationProperties(prefix = "am")
+public class DemoProperties {
+}

+ 21 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/service/IPubinfoService.java

@@ -0,0 +1,21 @@
+/**
+ *
+ */
+package com.ims.ims.sm.service;
+
+
+
+import com.ims.core.service.ICrudService;
+
+import com.ims.ims.sm.entity.Pubinfo;
+import com.ims.ims.sm.dao.PubinfoDao;
+
+/**
+ * 电子公告Service
+ * @author niyili
+ * @version 2022-12-27
+ */
+
+public interface IPubinfoService extends ICrudService<Pubinfo> {
+
+}

+ 77 - 0
ims-service/sm-test/src/main/java/com/ims/ims/sm/service/impl/PubinfoServiceImpl.java

@@ -0,0 +1,77 @@
+/**
+ *
+ */
+package com.ims.ims.sm.service.impl;
+
+import java.util.List;
+import com.ims.core.utils.IdGen;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.ims.core.persistence.Page;
+import com.ims.core.service.impl.CrudServiceImpl;
+
+import com.ims.ims.sm.service.IPubinfoService;
+
+import com.ims.ims.sm.entity.Pubinfo;
+import com.ims.ims.sm.dao.PubinfoDao;
+
+
+/**
+ * 电子公告Service
+ * @author niyili
+ * @version 2022-12-27
+ */
+@Service
+@Transactional(readOnly = true)
+public class PubinfoServiceImpl extends CrudServiceImpl<PubinfoDao, Pubinfo> implements IPubinfoService{
+
+ 	public Pubinfo get(Pubinfo pubinfo) {
+		return super.get(pubinfo);
+	}
+
+    public List<Pubinfo> findList(Pubinfo pubinfo) {
+        return super.findList(pubinfo);
+    }
+
+	public List<Pubinfo> findAllListM(Pubinfo pubinfo,String dataFilter,String baseFilter,String key,String baseQuery,String specQuery) {
+	 	return super.findAllListM(pubinfo,dataFilter,baseFilter,key,baseQuery,specQuery);
+	}
+
+	public Page<Pubinfo> findPageM(Page<Pubinfo> page, Pubinfo pubinfo,String dataFilter,String baseFilter,String key,String baseQuery,String specQuery) {
+		return super.findPageM(page, pubinfo,dataFilter,baseFilter,key,baseQuery,specQuery);
+	}
+
+	public Pubinfo initInsert(Pubinfo pubinfo)  {
+		return super.initInsert(pubinfo);
+	}
+
+	@Transactional(readOnly = false)
+	public void checkSave(Pubinfo pubinfo) {
+		super.checkSave(pubinfo);
+	}
+
+	@Transactional(readOnly = false)
+	public Pubinfo save(Pubinfo pubinfo, boolean isNewRecord){
+	    if(isNewRecord){
+	        pubinfo.setId(IdGen.uuid());
+	    }
+		return super.save(pubinfo,isNewRecord);
+	}
+
+    @Transactional(readOnly = false)
+    @Override
+    public void insertList(List<Pubinfo> list){
+        super.insertList(list);
+    }
+
+	@Transactional(readOnly = false)
+	public void checkRemove(Pubinfo pubinfo,String baseFilter){
+		super.checkRemove(pubinfo,baseFilter);
+	}
+
+	@Transactional(readOnly = false)
+	public void delete(Pubinfo pubinfo,String baseFilter) {
+		super.delete(pubinfo,baseFilter);
+	}
+}

+ 41 - 0
ims-service/sm-test/src/main/resources/application-dev.yml

@@ -0,0 +1,41 @@
+#服务器端口
+server:
+  port: 18799
+spring:
+  #排除DruidDataSourceAutoConfigure
+  autoconfigure:
+    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+  datasource:
+    dynamic:
+      #设置默认的数据源或者数据源组,默认值即为master
+      primary: master
+      datasource:
+        master:
+          driver-class-name: org.postgresql.Driver
+          url: ${blade.datasource.dev.url}
+          username: ${blade.datasource.dev.username}
+          password: ${blade.datasource.dev.password}
+#        impala:
+#          hikari:
+#            minimum-idle: 5
+#            maximum-pool-size: 500
+#            max-lifetime: 0
+#          type: com.zaxxer.hikari.HikariDataSource
+#          driver-class-name: com.cloudera.impala.jdbc41.Driver
+#          url: jdbc:impala://10.65.80.15:21050/gddl_pg;UseSasl=0;AuthMech=3;UID=gddl;PWD=q1w2e3@ASD;OptimizedInsert=0;
+#          druid:
+#            filters: stat,slf4j
+xxl:
+  job:
+    accessToken: ''
+    admin:
+      addresses: http://10.65.78.23:12345/xxl-job-admin
+    executor:
+      address:
+      appname: ims-am
+      ip:
+      logpath: /home/applogs/xxl-job/jobhandler
+      logretentiondays: -1
+      port: 7019
+
+

+ 16 - 0
ims-service/sm-test/src/main/resources/application.yml

@@ -0,0 +1,16 @@
+#mybatis-plus配置
+mybatis-plus:
+  mapper-locations: classpath:mappings/**/*.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.ims.ims.sm.entity,com.ims.**.entity
+
+#swagger扫描路径配置
+swagger:
+  base-packages:
+    - com.ims.ims
+spring:
+  cloud:
+    gateway:
+      httpclient:
+        connect-timeout: 1000
+        response-timeout: 5s

+ 326 - 0
ims-service/sm-test/src/main/resources/mappings/sm/PubinfoDao.xml

@@ -0,0 +1,326 @@
+<?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.ims.ims.sm.dao.PubinfoDao">
+
+	<sql id="pubinfoColumns">
+		a.id AS "id",
+		a.title AS "title",
+		a.descr AS "descr",
+		a.info_start_time AS "infoStartTime",
+		a.info_end_time AS "infoEndTime",
+		a.info_type AS "infoType",
+		a.notic AS "notic",
+		a.read_person AS "readPerson",
+		a.read_dep AS "readDep",
+		a.pic_name AS "picName",
+		a.is_active AS "isActive",
+		a.remark AS "remark",
+		a.create_by AS "createBy",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy",
+		a.update_date AS "updateDate"
+	</sql>
+
+	<sql id="pubinfoJoins">
+		LEFT JOIN ims_sys_user u8 ON u8.id = a.create_by
+	</sql>
+    <sql id="whereStr">
+			1=1
+		    <!-- 快速定位 -->
+			<if test="sqlMap.key != null and  sqlMap.key  != ''">
+			  AND (
+						( a.title LIKE treps_concat('%',#{sqlMap.key},'%')
+							)
+						OR( a.descr LIKE treps_concat('%',#{sqlMap.key},'%')
+							)
+			  )
+			</if>
+		    <!-- 高级查询dataFilter -->
+			<if test="sqlMap.df != null and  sqlMap.df  != ''">
+			   AND ( ${sqlMap.df} )
+			</if>
+		    <!-- 默认查询baseFilter -->
+			<if test="sqlMap.bf != null and  sqlMap.bf  != ''">
+			   AND ( ${sqlMap.bf} )
+			</if>
+		    <!-- 基本Query查询 -->
+			<if test="sqlMap.baseQuery != null and  sqlMap.baseQuery  != ''">
+			   AND ( ${sqlMap.baseQuery} )
+			</if>
+		    <!-- 特定Query查询 -->
+			<if test="sqlMap.specQuery != null and  sqlMap.specQuery  != ''">
+			   AND ( ${sqlMap.specQuery} )
+			</if>
+			<if test="sqlMap.dsf != null and  sqlMap.dsf  != ''">
+				AND (${sqlMap.dsf})
+			</if>
+    </sql>
+
+	<select id="get" resultType="Pubinfo">
+		SELECT
+			<include refid="pubinfoColumns"/>
+		FROM pubinfo a
+		<include refid="pubinfoJoins"/>
+		WHERE a.id = #{id}
+	</select>
+
+	<select id="findList" resultType="Pubinfo">
+		SELECT
+			<include refid="pubinfoColumns"/>
+		FROM pubinfo a
+		<include refid="pubinfoJoins"/>
+		<where>
+              <include refid="whereStr"/>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+	<select id="findAllList" resultType="Pubinfo">
+		SELECT
+			<include refid="pubinfoColumns"/>
+		FROM pubinfo a
+		<include refid="pubinfoJoins"/>
+		<where>
+			 <include refid="whereStr"/>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+
+    <sql id="insertColumns">
+	        id,
+	        title,
+	        descr,
+	        info_start_time,
+	        info_end_time,
+	        info_type,
+	        notic,
+	        read_person,
+	        read_dep,
+	        pic_name,
+	        is_active,
+	        remark,
+	        create_by,
+	        create_date,
+	        update_by,
+	        update_date
+    </sql>
+
+	<insert id="insert">
+        <selectKey keyProperty="id" resultType="String" order="BEFORE">
+          <choose>
+			<when test="id == null or  id  == ''">
+              select get_next_id('pubinfo','') from dual
+			</when>
+			<otherwise>
+			  select #{id} from dual
+			</otherwise>
+	      </choose>
+        </selectKey>
+		INSERT INTO pubinfo(
+            <include refid="insertColumns"/>
+		) VALUES (
+			#{id
+, jdbcType=VARCHAR
+
+},
+			#{title
+, jdbcType=VARCHAR
+
+},
+			#{descr
+, jdbcType=VARCHAR
+
+},
+			#{infoStartTime, jdbcType=TIMESTAMP
+
+
+},
+			#{infoEndTime, jdbcType=TIMESTAMP
+
+
+},
+			#{infoType
+, jdbcType=VARCHAR
+
+},
+			#{notic
+, jdbcType=VARCHAR
+
+},
+			#{readPerson
+, jdbcType=VARCHAR
+
+},
+			#{readDep
+, jdbcType=VARCHAR
+
+},
+			#{picName
+, jdbcType=VARCHAR
+
+},
+			#{isActive
+, jdbcType=VARCHAR
+
+},
+			#{remark
+, jdbcType=VARCHAR
+
+},
+			#{createBy
+, jdbcType=VARCHAR
+
+},
+			#{createDate, jdbcType=TIMESTAMP
+
+
+},
+			#{updateBy
+, jdbcType=VARCHAR
+
+},
+			#{updateDate, jdbcType=TIMESTAMP
+
+
+}
+		)
+	</insert>
+
+	<insert id="insertList">
+        <selectKey keyProperty="id" resultType="String" order="BEFORE">
+          <choose>
+			<when test="id == null or  id  == ''">
+              select get_next_id('pubinfo','') from dual
+			</when>
+			<otherwise>
+			  select #{id} from dual
+			</otherwise>
+	      </choose>
+        </selectKey>
+		INSERT INTO pubinfo(
+		    <include refid="insertColumns"/>
+		) select FFF.* from (
+            <foreach collection="list" item="item" index="index" separator="UNION ALL" >
+                select
+                    #{item.id
+, jdbcType=VARCHAR
+
+} as "id",
+                    #{item.title
+, jdbcType=VARCHAR
+
+} as "title",
+                    #{item.descr
+, jdbcType=VARCHAR
+
+} as "descr",
+                    #{item.infoStartTime, jdbcType=TIMESTAMP
+
+
+} as "infoStartTime",
+                    #{item.infoEndTime, jdbcType=TIMESTAMP
+
+
+} as "infoEndTime",
+                    #{item.infoType
+, jdbcType=VARCHAR
+
+} as "infoType",
+                    #{item.notic
+, jdbcType=VARCHAR
+
+} as "notic",
+                    #{item.readPerson
+, jdbcType=VARCHAR
+
+} as "readPerson",
+                    #{item.readDep
+, jdbcType=VARCHAR
+
+} as "readDep",
+                    #{item.picName
+, jdbcType=VARCHAR
+
+} as "picName",
+                    #{item.isActive
+, jdbcType=VARCHAR
+
+} as "isActive",
+                    #{item.remark
+, jdbcType=VARCHAR
+
+} as "remark",
+                    #{item.createBy
+, jdbcType=VARCHAR
+
+} as "createBy",
+                    #{item.createDate, jdbcType=TIMESTAMP
+
+
+} as "createDate",
+                    #{item.updateBy
+, jdbcType=VARCHAR
+
+} as "updateBy",
+                    #{item.updateDate, jdbcType=TIMESTAMP
+
+
+} as "updateDate"
+                from dual
+            </foreach>
+		) FFF
+
+	</insert>
+
+	<update id="update">
+		UPDATE pubinfo SET
+			id = #{id},
+			title = #{title},
+			descr = #{descr},
+			info_start_time = #{infoStartTime},
+			info_end_time = #{infoEndTime},
+			info_type = #{infoType},
+			notic = #{notic},
+			read_person = #{readPerson},
+			read_dep = #{readDep},
+			pic_name = #{picName},
+			is_active = #{isActive},
+			remark = #{remark},
+			update_by = #{updateBy},
+			update_date = #{updateDate}
+		WHERE id = #{id
+, jdbcType=VARCHAR
+
+}
+	</update>
+
+	<update id="delete">
+		DELETE FROM pubinfo
+	    WHERE
+		<choose>
+			<when test="id != null and  id  != ''">
+					 id = #{id
+, jdbcType=VARCHAR
+
+}
+			</when>
+			<otherwise>
+			</otherwise>
+		</choose>
+	</update>
+
+</mapper>

+ 246 - 0
pom.xml

@@ -0,0 +1,246 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.ims.as</groupId>
+    <artifactId>ims-as</artifactId>
+    <version>2.5.0.RELEASE</version>
+    <packaging>pom</packaging>
+
+    <properties>
+        <bladex.project.version>2.5.0.RELEASE</bladex.project.version>
+        <ims.project.version>2.5.0.RELEASE</ims.project.version>
+        <ims.core.version>1.0</ims.core.version>
+        <java.version>1.8</java.version>
+
+        <flowable.version>6.4.2</flowable.version>
+        <dubbo.version>2.7.5</dubbo.version>
+
+        <spring.boot.version>2.1.13.RELEASE</spring.boot.version>
+        <spring.cloud.version>Greenwich.SR5</spring.cloud.version>
+        <spring.platform.version>Cairo-SR8</spring.platform.version>
+
+        <!-- 推荐使用Harbor -->
+        <docker.registry.url>192.168.0.157</docker.registry.url>
+        <docker.registry.host>http://${docker.registry.url}:2375</docker.registry.host>
+        <docker.username>admin</docker.username>
+        <docker.password>Harbor12345</docker.password>
+        <docker.namespace>blade</docker.namespace>
+        <docker.plugin.version>1.4.13</docker.plugin.version>
+
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+
+    </properties>
+
+    <modules>
+        <module>ims-common</module>
+        <module>ims-gateway</module>
+        <module>ims-service</module>
+        <module>ims-service-api</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springblade.platform</groupId>
+                <artifactId>blade-bom</artifactId>
+                <version>${bladex.project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>com.ims.as</groupId>
+                <artifactId>ims-common</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.alibaba</groupId>
+                <artifactId>fastjson</artifactId>
+                <version>1.2.83</version>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring.boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring.cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>io.spring.platform</groupId>
+                <artifactId>platform-bom</artifactId>
+                <version>${spring.platform.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>com.ims.system</groupId>
+                <artifactId>ims-query</artifactId>
+                <version>${ims.project.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>com.ims.system</groupId>
+                <artifactId>ims-permission-starter</artifactId>
+                <version>2.5.0.RELEASE</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>${project.name}</finalName>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                </includes>
+            </resource>
+        </resources>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-maven-plugin</artifactId>
+                    <version>${spring.boot.version}</version>
+                    <configuration>
+                        <fork>true</fork>
+                        <finalName>${project.build.finalName}</finalName>
+                    </configuration>
+                    <executions>
+                        <execution>
+                            <goals>
+                                <goal>repackage</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <groupId>com.spotify</groupId>
+                    <artifactId>dockerfile-maven-plugin</artifactId>
+                    <version>${docker.plugin.version}</version>
+                    <configuration>
+                        <username>${docker.username}</username>
+                        <password>${docker.password}</password>
+                        <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+                        <tag>${project.version}</tag>
+                        <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                        <buildArgs>
+                            <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                        </buildArgs>
+                    </configuration>
+                    <!--子服务添加如下配置,运行 mvn deploy 命令便会自动打包镜像-->
+                    <!--<executions>
+                        <execution>
+                            <id>default</id>
+                            <goals>
+                                <goal>build</goal>
+                                <goal>push</goal>
+                            </goals>
+                        </execution>
+                    </executions>-->
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-antrun-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <phase>package</phase>
+                            <goals>
+                                <goal>run</goal>
+                            </goals>
+                            <configuration>
+                                <tasks>
+                                    <!--suppress UnresolvedMavenProperty -->
+                                    <copy overwrite="true"
+                                          tofile="${session.executionRootDirectory}/target/${project.artifactId}.jar"
+                                          file="${project.build.directory}/${project.artifactId}.jar" />
+                                </tasks>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                    <encoding>UTF-8</encoding>
+                    <compilerArgs>
+                        <arg>-parameters</arg>
+                    </compilerArgs>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <!--        <repository>-->
+        <!--            <id>ims</id>-->
+        <!--            <url>http://39.100.131.102:8081/repository/ims/</url>-->
+        <!--            <snapshots>-->
+        <!--                <enabled>false</enabled>-->
+        <!--            </snapshots>-->
+        <!--        </repository>-->
+        <repository>
+            <id>localrepo</id>
+            <name>Local Repository</name>
+            <url>file://D:\java\maven\repository-gddl</url>
+        </repository>
+        <repository>
+            <id>aliyun-repos</id>
+            <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>blade-release</id>
+            <name>Release Repository</name>
+            <url>http://nexus.bladex.vip/repository/maven-releases/</url>
+        </repository>
+    </repositories>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>aliyun-plugin</id>
+            <url>https://maven.aliyun.com/nexus/content/groups/public/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
+</project>