diff --git a/mcp b/mcp
new file mode 160000
index 0000000000000000000000000000000000000000..2181e0521bc55700d3c2a3a7b4f29ac5c13bdf97
--- /dev/null
+++ b/mcp
@@ -0,0 +1 @@
+Subproject commit 2181e0521bc55700d3c2a3a7b4f29ac5c13bdf97
diff --git a/mcp-cloud-core/pom.xml b/mcp-cloud-core/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..60a1cf2ced401f8ec2f32f1568b563e4e678915b
--- /dev/null
+++ b/mcp-cloud-core/pom.xml
@@ -0,0 +1,56 @@
+
+
+
+ mcp
+ com.hnkylin
+ 1.0-SNAPSHOT
+
+ 4.0.0
+
+ mcp-cloud-core
+
+
+
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ 1.3.0
+
+
+ org.projectlombok
+ lombok
+
+
+ com.auth0
+ java-jwt
+ 3.7.0
+
+
+ org.apache.commons
+ commons-lang3
+ 3.7
+
+
+
+ org.apache.commons
+ commons-pool2
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5.6
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/FieldCheck.java b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/FieldCheck.java
new file mode 100644
index 0000000000000000000000000000000000000000..eb00425b55bd91efaf42b0ea6af61386d26e254b
--- /dev/null
+++ b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/FieldCheck.java
@@ -0,0 +1,102 @@
+package com.hnkylin.cloud.core.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface FieldCheck {
+
+ /**
+ * 参数校验错误默认返回的信息
+ *
+ * @return
+ */
+ public String defaultMessage() default "";
+
+ /**
+ * 不允许为空
+ *
+ * @return
+ */
+ public boolean notNull() default false;
+
+ /**
+ * 为空时返回信息
+ *
+ * @return
+ */
+ public String notNullMessage() default "";
+
+ /**
+ * 只允许数字
+ *
+ * @return
+ */
+ public boolean numeric() default false;
+
+ /**
+ * 只允许数字错误信息
+ *
+ * @return
+ */
+ public String numericMessage() default "";
+
+ /**
+ * 只对字符串、List起效,最小长度
+ *
+ * @return
+ */
+ public int minLen() default -1;
+
+ /**
+ * 只对字符串、List起效,最大长度
+ *
+ * @return
+ */
+ public int maxLen() default -1;
+
+ /**
+ * maxLen的错误信息
+ *
+ * @return
+ */
+ public String minLenMessage() default "";
+
+ /**
+ * maxLen的错误信息
+ *
+ * @return
+ */
+ public String maxLenMessage() default "";
+
+ /**
+ * 最小数字
+ *
+ * @return
+ */
+ public double minNum() default -999999999;
+
+ /**
+ * 最大数字
+ *
+ * @return
+ */
+ public double maxNum() default -999999999;
+
+ /**
+ * minNum错误信息
+ *
+ * @return
+ */
+ public String minNumMessage() default "";
+
+ /**
+ * maxNum错误信息
+ *
+ * @return
+ */
+ public String maxNumMessage() default "";
+}
diff --git a/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ListCheck.java b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ListCheck.java
new file mode 100644
index 0000000000000000000000000000000000000000..1117ee186725222d3631b69d07fe2e28d1b336f5
--- /dev/null
+++ b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ListCheck.java
@@ -0,0 +1,25 @@
+package com.hnkylin.cloud.core.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.PARAMETER, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ListCheck {
+
+ public boolean notNull() default false;
+
+ public String notNullMessage() default "";
+
+ public int minLen() default -1;
+
+ public String minLenMessage() default "";
+
+ public int maxLen() default -1;
+
+ public String maxLenMessage() default "";
+
+ public String defaultMessage() default "";
+}
diff --git a/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/LoginUser.java b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/LoginUser.java
new file mode 100644
index 0000000000000000000000000000000000000000..74288d121385317aa53e9d8e1d76d4a0ca2b9f93
--- /dev/null
+++ b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/LoginUser.java
@@ -0,0 +1,13 @@
+package com.hnkylin.cloud.core.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target({ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface LoginUser {
+
+}
\ No newline at end of file
diff --git a/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ModelCheck.java b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ModelCheck.java
new file mode 100644
index 0000000000000000000000000000000000000000..5af5703c4d3bc5a5eb57c34d45bac684dafc85bb
--- /dev/null
+++ b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ModelCheck.java
@@ -0,0 +1,14 @@
+package com.hnkylin.cloud.core.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD, ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ModelCheck {
+ public boolean notNull() default false;
+
+ public String notNullMessage() default "";
+}
diff --git a/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ParamCheck.java b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ParamCheck.java
new file mode 100644
index 0000000000000000000000000000000000000000..95b59f5213af9387669ce00776b2947802b48c6d
--- /dev/null
+++ b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/annotation/ParamCheck.java
@@ -0,0 +1,12 @@
+package com.hnkylin.cloud.core.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ParamCheck {
+
+}
diff --git a/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/aop/LogAop.java b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/aop/LogAop.java
new file mode 100644
index 0000000000000000000000000000000000000000..94a227456b243a61031b433bc0d9586276cfd436
--- /dev/null
+++ b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/aop/LogAop.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright © 2018 com.yishouapp All rights reserved.
+ *
+ * @Package: com.yishou.pss.api.aop
+ * @author: wanglei
+ * @date: 2018年5月24日 上午11:28:59
+ */
+package com.hnkylin.cloud.core.aop;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ArrayUtils;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+
+
+@Aspect
+@Component
+@Slf4j
+public class LogAop {
+
+ @Autowired
+ private ObjectMapper objectMapper;
+
+
+ @Pointcut("execution(* com.hnkylin.cloud.*.ctrl..*(..))")
+ public void webLog() {
+ }
+
+ private static final String LOG = "url:{} ,params: {}";
+
+
+ @Before("webLog()")
+ public void doBefore(JoinPoint joinPoint) throws Throwable {
+ // 开始打印请求日志
+ ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+ HttpServletRequest request = attributes.getRequest();
+ Object[] args = joinPoint.getArgs();
+ //过滤后序列化无异常
+ log.info(LOG, request.getRequestURI(), ArrayUtils.toString(args));
+ }
+
+
+ @Around("webLog()")
+ public Object doAroud(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
+ long startTime = System.currentTimeMillis();
+ Object result = proceedingJoinPoint.proceed();
+ //打印出参
+ log.info("Response Args : {},Time-Consuming:{}", objectMapper.writeValueAsString(result),
+ System.currentTimeMillis() - startTime);
+
+ return result;
+ }
+
+}
diff --git a/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/aop/ParamAOP.java b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/aop/ParamAOP.java
new file mode 100644
index 0000000000000000000000000000000000000000..298c22c224bfe4322bb703cb554fda18dcbf5fc7
--- /dev/null
+++ b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/aop/ParamAOP.java
@@ -0,0 +1,34 @@
+package com.hnkylin.cloud.core.aop;
+
+import com.hnkylin.cloud.core.config.ParamterCheckCompent;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Component
+@Aspect
+public class ParamAOP {
+
+ @Autowired
+ private ParamterCheckCompent paramterCheckComp;
+
+ @Pointcut("@annotation(com.hnkylin.cloud.core.annotation.ParamCheck)")
+ public void check() {
+
+ }
+
+ @Around(value = "check()")
+ public Object doBefore(JoinPoint joinPoint) throws Throwable {
+ Object object = null;
+ // 参数校验,未抛出异常表示验证OK
+ paramterCheckComp.checkAnnoValid(joinPoint.getSignature().getName(), joinPoint.getTarget(),
+ joinPoint.getArgs());
+ object = ((ProceedingJoinPoint) joinPoint).proceed();
+ return object;
+ }
+
+}
diff --git a/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/cache/RedisCache.java b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/cache/RedisCache.java
new file mode 100644
index 0000000000000000000000000000000000000000..d354cf4f2fb12edaabe3ea8bf64f674160829cb8
--- /dev/null
+++ b/mcp-cloud-core/src/main/java/com/hnkylin/cloud/core/cache/RedisCache.java
@@ -0,0 +1,216 @@
+package com.ruoyi.common.core.redis;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.BoundSetOperations;
+import org.springframework.data.redis.core.HashOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.stereotype.Component;
+
+/**
+ * spring redis 工具类
+ *
+ * @author ruoyi
+ **/
+@SuppressWarnings(value = {"unchecked", "rawtypes"})
+@Component
+public class RedisCache {
+ @Autowired
+ public RedisTemplate redisTemplate;
+
+ /**
+ * 缓存基本的对象,Integer、String、实体类等
+ *
+ * @param key 缓存的键值
+ * @param value 缓存的值
+ */
+ public void setCacheObject(final String key, final T value) {
+ redisTemplate.opsForValue().set(key, value);
+ }
+
+ /**
+ * 缓存基本的对象,Integer、String、实体类等
+ *
+ * @param key 缓存的键值
+ * @param value 缓存的值
+ * @param timeout 时间
+ * @param timeUnit 时间颗粒度
+ */
+ public void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit) {
+ redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
+ }
+
+ /**
+ * 设置有效时间
+ *
+ * @param key Redis键
+ * @param timeout 超时时间
+ * @return true=设置成功;false=设置失败
+ */
+ public boolean expire(final String key, final long timeout) {
+ return expire(key, timeout, TimeUnit.SECONDS);
+ }
+
+ /**
+ * 设置有效时间
+ *
+ * @param key Redis键
+ * @param timeout 超时时间
+ * @param unit 时间单位
+ * @return true=设置成功;false=设置失败
+ */
+ public boolean expire(final String key, final long timeout, final TimeUnit unit) {
+ return redisTemplate.expire(key, timeout, unit);
+ }
+
+ /**
+ * 获得缓存的基本对象。
+ *
+ * @param key 缓存键值
+ * @return 缓存键值对应的数据
+ */
+ public T getCacheObject(final String key) {
+ ValueOperations operation = redisTemplate.opsForValue();
+ return operation.get(key);
+ }
+
+ /**
+ * 删除单个对象
+ *
+ * @param key
+ */
+ public boolean deleteObject(final String key) {
+ return redisTemplate.delete(key);
+ }
+
+ /**
+ * 删除集合对象
+ *
+ * @param collection 多个对象
+ * @return
+ */
+ public long deleteObject(final Collection collection) {
+ return redisTemplate.delete(collection);
+ }
+
+ /**
+ * 缓存List数据
+ *
+ * @param key 缓存的键值
+ * @param dataList 待缓存的List数据
+ * @return 缓存的对象
+ */
+ public long setCacheList(final String key, final List dataList) {
+ Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
+ return count == null ? 0 : count;
+ }
+
+ /**
+ * 获得缓存的list对象
+ *
+ * @param key 缓存的键值
+ * @return 缓存键值对应的数据
+ */
+ public List getCacheList(final String key) {
+ return redisTemplate.opsForList().range(key, 0, -1);
+ }
+
+ /**
+ * 缓存Set
+ *
+ * @param key 缓存键值
+ * @param dataSet 缓存的数据
+ * @return 缓存数据的对象
+ */
+ public BoundSetOperations setCacheSet(final String key, final Set dataSet) {
+ BoundSetOperations setOperation = redisTemplate.boundSetOps(key);
+ Iterator it = dataSet.iterator();
+ while (it.hasNext()) {
+ setOperation.add(it.next());
+ }
+ return setOperation;
+ }
+
+ /**
+ * 获得缓存的set
+ *
+ * @param key
+ * @return
+ */
+ public Set getCacheSet(final String key) {
+ return redisTemplate.opsForSet().members(key);
+ }
+
+ /**
+ * 缓存Map
+ *
+ * @param key
+ * @param dataMap
+ */
+ public void setCacheMap(final String key, final Map dataMap) {
+ if (dataMap != null) {
+ redisTemplate.opsForHash().putAll(key, dataMap);
+ }
+ }
+
+ /**
+ * 获得缓存的Map
+ *
+ * @param key
+ * @return
+ */
+ public Map getCacheMap(final String key) {
+ return redisTemplate.opsForHash().entries(key);
+ }
+
+ /**
+ * 往Hash中存入数据
+ *
+ * @param key Redis键
+ * @param hKey Hash键
+ * @param value 值
+ */
+ public void setCacheMapValue(final String key, final String hKey, final T value) {
+ redisTemplate.opsForHash().put(key, hKey, value);
+ }
+
+ /**
+ * 获取Hash中的数据
+ *
+ * @param key Redis键
+ * @param hKey Hash键
+ * @return Hash中的对象
+ */
+ public T getCacheMapValue(final String key, final String hKey) {
+ HashOperations opsForHash = redisTemplate.opsForHash();
+ return opsForHash.get(key, hKey);
+ }
+
+ /**
+ * 获取多个Hash中的数据
+ *
+ * @param key Redis键
+ * @param hKeys Hash键集合
+ * @return Hash对象集合
+ */
+ public List getMultiCacheMapValue(final String key, final Collection