From 3ada3a6e740b3c4b60a43d1a1a67dba072181dbd Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 09 Apr 2021 14:42:24 +0800
Subject: [PATCH] 20210409 获取未领取的奖品

---
 zq-erp/src/main/java/com/matrix/core/tools/rr/GlueFactory.java |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/core/tools/rr/GlueFactory.java b/zq-erp/src/main/java/com/matrix/core/tools/rr/GlueFactory.java
index 5f0f32f..d46fe06 100644
--- a/zq-erp/src/main/java/com/matrix/core/tools/rr/GlueFactory.java
+++ b/zq-erp/src/main/java/com/matrix/core/tools/rr/GlueFactory.java
@@ -104,4 +104,27 @@
 		throw new IllegalArgumentException(">>>>>>>>>>> xxl-glue, loadNewInstance error, instance is null");
 	}
 
+
+	/**
+	 * 根据字符串获取几个java实例
+	 * @param codeSource
+	 * @return
+	 * @throws Exception
+	 */
+	public Object loadInstance(String codeSource) throws Exception{
+		if (codeSource!=null && codeSource.trim().length()>0) {
+			Class<?> clazz = groovyClassLoader.parseClass(codeSource);
+			if (clazz != null) {
+				Object instance = clazz.newInstance();
+				if (instance!=null) {
+					this.injectService(instance);
+					return  instance;
+				}
+			}
+		}
+		throw new IllegalArgumentException(">>>>>>>>>>> xxl-glue, loadNewInstance error, instance is null");
+	}
+
+
+
 }

--
Gitblit v1.9.1