diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 26d33521a..000000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.m2/settings.xml b/.m2/settings.xml
new file mode 100644
index 000000000..615216734
--- /dev/null
+++ b/.m2/settings.xml
@@ -0,0 +1,20 @@
+
+
+
+
+ nexus
+ developer
+ 123456
+
+
+
+
+ nexus
+ collcollege
+ http://nexus.coolcollege.cn/repository/maven-public/
+ central
+
+
+
\ No newline at end of file
diff --git a/coolstore-partner-common/coolstore-partner-common.iml b/coolstore-partner-common/coolstore-partner-common.iml
new file mode 100644
index 000000000..1de68ac5e
--- /dev/null
+++ b/coolstore-partner-common/coolstore-partner-common.iml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/coolstore-partner-common/pom.xml b/coolstore-partner-common/pom.xml
new file mode 100644
index 000000000..d1a2206a8
--- /dev/null
+++ b/coolstore-partner-common/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ coolstore-partner-manage
+ com.coolstore
+ 1.0.0
+
+ 4.0.0
+
+ coolstore-partner-common
+
+
+ 8
+ 8
+
+
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ org.projectlombok
+ lombok
+
+
+ com.alibaba
+ fastjson
+
+
+ org.apache.commons
+ commons-collections4
+
+
+ org.apache.commons
+ commons-pool2
+
+
+ redis.clients
+ jedis
+
+
+
+
\ No newline at end of file
diff --git a/coolstore-partner-common/src/main/java/com/cool/store/model/constants/CommonConstants.java b/coolstore-partner-common/src/main/java/com/cool/store/model/constants/CommonConstants.java
new file mode 100644
index 000000000..b1d27e08e
--- /dev/null
+++ b/coolstore-partner-common/src/main/java/com/cool/store/model/constants/CommonConstants.java
@@ -0,0 +1,13 @@
+package com.cool.store.model.constants;
+
+/**
+ * @author zhangchenbiao
+ * @FileName: CommonConstatns
+ * @Description:
+ * @date 2023-05-18 14:47
+ */
+public class CommonConstants {
+
+ public static final String DEFAULT_DB = "coolcollege_intelligent_config";
+
+}
diff --git a/coolstore-partner-common/src/main/java/com/cool/store/model/utils/RedisUtilPool.java b/coolstore-partner-common/src/main/java/com/cool/store/model/utils/RedisUtilPool.java
new file mode 100644
index 000000000..a6a529a73
--- /dev/null
+++ b/coolstore-partner-common/src/main/java/com/cool/store/model/utils/RedisUtilPool.java
@@ -0,0 +1,1418 @@
+package com.cool.store.model.utils;
+
+import org.apache.commons.lang3.StringUtils;
+import redis.clients.jedis.*;
+
+import java.util.*;
+
+/**
+ * 内存数据库Redis的辅助类,负责对内存数据库的所有操作
+ *
+ * @author fengjc
+ * @version V1.0
+ */
+public class RedisUtilPool {
+ // 数据源
+ private ShardedJedisPool shardedJedisPool;
+
+ /**
+ * dbIndex和连接池的映射
+ */
+ private Map shardedJedisPoolMap;
+
+ private static final String LOCK_SUCCESS = "OK";
+ private static final String SET_IF_NOT_EXIST = "NX";
+ private static final String SET_WITH_EXPIRE_TIME = "PX";
+
+ /**
+ * 它保证在执行操作之后释放数据源returnResource(jedis)
+ *
+ * @param
+ * @author fengjc
+ * @version V1.0
+ */
+ abstract class Executor {
+
+ ShardedJedis jedis;
+ ShardedJedisPool shardedJedisPool;
+
+ public Executor(ShardedJedisPool shardedJedisPool) {
+ this.shardedJedisPool = shardedJedisPool;
+ jedis = this.shardedJedisPool.getResource();
+ }
+
+ /**
+ * 回调
+ *
+ * @return 执行结果
+ */
+ abstract T execute();
+
+ /**
+ * 调用{@link #execute()}并返回执行结果
+ * 它保证在执行{@link #execute()}之后释放数据源returnResource(jedis)
+ *
+ * @return 执行结果
+ */
+ public T getResult() {
+ T result = null;
+ try {
+ result = execute();
+ } catch (Throwable e) {
+ throw new RuntimeException("Redis execute exception", e);
+ } finally {
+ if (jedis != null) {
+ jedis.close();
+ }
+ }
+ return result;
+ }
+ }
+
+ /**
+ * 删除模糊匹配的key
+ *
+ * @param likeKey 模糊匹配的key
+ * @return 删除成功的条数
+ */
+ public long delKeysLike(final String likeKey) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ Long execute() {
+ Collection jedisC = jedis.getAllShards();
+ Iterator iter = jedisC.iterator();
+ long count = 0;
+ while (iter.hasNext()) {
+ Jedis _jedis = iter.next();
+ Set keys = _jedis.keys(likeKey + "*");
+ if (keys != null && keys.size() > 0)
+ count += _jedis.del(keys.toArray(new String[keys.size()]));
+ }
+ return count;
+ }
+ }.getResult();
+ }
+
+ /**
+ * 删除
+ *
+ * @param key 匹配的key
+ * @return 删除成功的条数
+ */
+ public Long delKey(final String key) {
+ return new Executor(shardedJedisPool) {
+ @Override
+ Long execute() {
+ return jedis.del(key);
+ }
+ }.getResult();
+ }
+
+ /**
+ * 删除
+ *
+ * @param key 匹配的key
+ * @return 删除成功的条数
+ */
+ public Long delKey(final String key, final Integer dbIndex) {
+ ShardedJedisPool jedisPool = null;
+ if (null != shardedJedisPoolMap) {
+ jedisPool = shardedJedisPoolMap.get(dbIndex);
+ }
+ if (null == jedisPool) {
+ jedisPool = shardedJedisPool;
+ }
+ return new Executor(jedisPool) {
+ @Override
+ Long execute() {
+ return jedis.del(key);
+ }
+ }.getResult();
+
+ }
+
+ /**
+ * 删除
+ *
+ * @param keys 匹配的key的集合
+ * @return 删除成功的条数
+ */
+ public Long delKeys(final String[] keys) {
+ return new Executor(shardedJedisPool) {
+ @Override
+ Long execute() {
+ Collection jedisC = jedis.getAllShards();
+ Iterator iter = jedisC.iterator();
+ long count = 0;
+ while (iter.hasNext()) {
+ Jedis _jedis = iter.next();
+ count += _jedis.del(keys);
+ }
+ return count;
+ }
+ }.getResult();
+ }
+
+ /**
+ * 为给定 key 设置生存时间,当 key 过期时(生存时间为 0 ),它会被自动删除。
+ * 在 Redis 中,带有生存时间的 key 被称为『可挥发』(volatile)的。
+ *
+ * @param key key
+ * @param expire 生命周期,单位为秒
+ * @return 1: 设置成功 0: 已经超时或key不存在
+ */
+ public Long expire(final String key, final int expire) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ Long execute() {
+ return jedis.expire(key, expire);
+ }
+ }.getResult();
+ }
+
+ /**
+ * 获取给定key的剩余有效时间
+ *
+ * @param key
+ * @return
+ */
+ public Long getExpire(final String key) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ Long execute() {
+ return jedis.ttl(key);
+ }
+ }.getResult();
+ }
+
+
+ /**
+ * 一个跨jvm的id生成器,利用了redis原子性操作的特点
+ *
+ * @param key id的key
+ * @return 返回生成的Id
+ */
+ public long makeId(final String key) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ Long execute() {
+ long id = jedis.incr(key);
+ if ((id + 75807) >= Long.MAX_VALUE) {
+ // 避免溢出,重置,getSet命令之前允许incr插队,75807就是预留的插队空间
+ jedis.getSet(key, "0");
+ }
+ return id;
+ }
+ }.getResult();
+ }
+
+ /* ======================================Strings====================================== */
+
+ /**
+ * 将字符串值 value 关联到 key 。
+ * 如果 key 已经持有其他值, setString 就覆写旧值,无视类型。
+ * 对于某个原本带有生存时间(TTL)的键来说, 当 setString 成功在这个键上执行时, 这个键原有的 TTL 将被清除。
+ * 时间复杂度:O(1)
+ *
+ * @param key key
+ * @param value string value
+ * @return 在设置操作成功完成时,才返回 OK 。
+ */
+ public String setString(final String key, final String value) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ String execute() {
+ return jedis.set(key, value);
+ }
+ }.getResult();
+ }
+
+ /**
+ * 将值 value 关联到 key ,并将 key 的生存时间设为 expire (以秒为单位)。
+ * 如果 key 已经存在, 将覆写旧值。
+ * 类似于以下两个命令:
+ * SET key value
+ * EXPIRE key expire # 设置生存时间
+ * 不同之处是这个方法是一个原子性(atomic)操作,关联值和设置生存时间两个动作会在同一时间内完成,在 Redis 用作缓存时,非常实用。
+ * 时间复杂度:O(1)
+ *
+ * @param key key
+ * @param value string value
+ * @param expire 生命周期
+ * @return 设置成功时返回 OK 。当 expire 参数不合法时,返回一个错误。
+ */
+ public String setString(final String key, final String value, final int expire) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ String execute() {
+ return jedis.setex(key, expire, value);
+ }
+ }.getResult();
+ }
+
+
+ /**
+ * 时间复杂度: O(1)
+ * 为键 key 储存的数字值加上增量 increment 。
+ * 如果键 key 不存在, 那么键 key 的值会先被初始化为 0 , 然后再执行 INCRBY 命令。
+ * 如果键 key 储存的值不能被解释为数字, 那么 INCRBY 命令将返回一个错误。
+ * 本操作的值限制在 64 位(bit)有符号数字表示之内。
+ *
+ * @param key key
+ * @param increment 计数步长
+ * @return 在加上增量 increment 之后, 键 key 当前的值。
+ */
+ public Long incrby(final String key, final long increment) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ Long execute() {
+ return jedis.incrBy(key, increment);
+ }
+ }.getResult();
+ }
+
+ public Long incrby(final String key, final long increment, int cacheTime) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ Long execute() {
+ Long result = jedis.incrBy(key, increment);
+ expire(key, cacheTime);
+ return result;
+ }
+ }.getResult();
+ }
+
+ /**
+ * 将 key 的值设为 value ,当且仅当 key 不存在。若给定的 key 已经存在,则 setStringIfNotExists 不做任何动作。
+ * 时间复杂度:O(1)
+ *
+ * @param key key
+ * @param value string value
+ * @return 设置成功,返回 1 。设置失败,返回 0 。
+ */
+ public Long setStringIfNotExists(final String key, final String value) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ Long execute() {
+ return jedis.setnx(key, value);
+ }
+ }.getResult();
+ }
+
+ /**
+ * 将 key 的值设为 value ,当且仅当 key 不存在。若给定的 key 已经存在,则 setNxExpire 不做任何动作。
+ *
+ * 时间复杂度:O(1)
+ *
+ * @param key key
+ * @param value string value
+ * @param expire 超时时间
+ * @return 设置成功,返回 true 。设置失败,返回 false 。
+ */
+ public boolean setNxExpire(final String key, final String value, final int expire) {
+ String res = new Executor(shardedJedisPool) {
+ @Override
+ String execute() {
+ return jedis.set(key, value, SET_IF_NOT_EXIST, SET_WITH_EXPIRE_TIME, expire);
+ }
+ }.getResult();
+ return res != null && res.equals(LOCK_SUCCESS);
+ }
+
+ /**
+ * 返回 key 所关联的字符串值。如果 key 不存在那么返回特殊值 nil 。
+ * 假如 key 储存的值不是字符串类型,返回一个错误,因为 getString 只能用于处理字符串值。
+ * 时间复杂度: O(1)
+ *
+ * @param key key
+ * @return 当 key 不存在时,返回 nil ,否则,返回 key 的值。如果 key 不是字符串类型,那么返回一个错误。
+ */
+ public String getString(final String key) {
+ return new Executor(shardedJedisPool) {
+
+ @Override
+ String execute() {
+ return jedis.get(key);
+ }
+ }.getResult();
+ }
+
+ /**
+ * 批量的 {@link #setString(String, String)}
+ *
+ * @param pairs 键值对数组{数组第一个元素为key,第二个元素为value}
+ * @return 操作状态的集合
+ */
+ public List