diff --git a/muyu-common/muyu-common-cache/.gitignore b/muyu-common/muyu-common-cache/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/muyu-common/muyu-common-cache/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/muyu-common/muyu-common-cache/src/main/java/com/muyu/common/cache/abs/HashCacheAbs.java b/muyu-common/muyu-common-cache/src/main/java/com/muyu/common/cache/abs/HashCacheAbs.java index 0f3cec8..05b70dd 100644 --- a/muyu-common/muyu-common-cache/src/main/java/com/muyu/common/cache/abs/HashCacheAbs.java +++ b/muyu-common/muyu-common-cache/src/main/java/com/muyu/common/cache/abs/HashCacheAbs.java @@ -2,10 +2,140 @@ package com.muyu.common.cache.abs; import com.muyu.common.cache.HashCache; +import java.util.List; +import java.util.Map; +import java.util.function.Function; + /** * @author DongZl * @description: hash缓存抽象类 * @Date 2024-3-29 下午 07:40 */ public abstract class HashCacheAbs implements HashCache { + + /** + * 编码 + * + * @param key ID + * + * @return 键 + */ + @Override + public String encode (K key) { + return keyPre() + key; + } + + /** + * 编码 + * @param hashKey ID + * @return 键 + */ + @Override + public String encodeHashKey (HK hashKey) { + return hashKey.toString(); + } + + /** + * 通过Key获取所有的map + * @param key 数据库键 + * @return 所有集合Map + */ + @Override + public Map get (K key) { + return null; + } + + /** + * 通过键和hashKey获取数据库hashValue + * + * @param key 键 + * @param hashKey hash键 + * + * @return hash值 + */ + @Override + public HV get (K key, HK hashKey) { + return null; + } + + /** + * 通过键和hashKey获取数据库hashValue + * + * @param key 键 + * @param hashKeyList hash键集合 + * + * @return hash值 + */ + @Override + public HV get (K key, HK... hashKeyList) { + return null; + } + + /** + * 获取hash值集合 + * + * @param key 键 + * + * @return hash值集合 + */ + @Override + public List getToList (K key) { + return null; + } + + /** + * 存储数据 + * + * @param key redis键 + * @param map hashMap集合 + */ + @Override + public void put (K key, Map map) { + + } + + /** + * 存储数据 + * + * @param key redis键 + * @param dataList 数据值 + * @param hashKey hash键 + */ + @Override + public void put (K key, List dataList, Function hashKey) { + + } + + /** + * 存储数据 + * + * @param key redis键 + * @param hashKey hash键 + * @param hashValue hash值 + */ + @Override + public void put (K key, HK hashKey, HV hashValue) { + + } + + /** + * 通过redis键删除 + * + * @param key hash键 + */ + @Override + public void remove (K key) { + + } + + /** + * 通过redis键和hash键删除 + * + * @param key redis键 + * @param hashKey hash键 + */ + @Override + public void remove (K key, HK hashKey) { + + } } diff --git a/muyu-modules/muyu-product/muyu-product-cache/.gitignore b/muyu-modules/muyu-product/muyu-product-cache/.gitignore new file mode 100644 index 0000000..5ff6309 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-cache/.gitignore @@ -0,0 +1,38 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-cache/src/main/java/com/muyu/product/cache/ProjectInfoCache.java b/muyu-modules/muyu-product/muyu-product-cache/src/main/java/com/muyu/product/cache/ProjectInfoCache.java index b5c10f0..0ffdd17 100644 --- a/muyu-modules/muyu-product/muyu-product-cache/src/main/java/com/muyu/product/cache/ProjectInfoCache.java +++ b/muyu-modules/muyu-product/muyu-product-cache/src/main/java/com/muyu/product/cache/ProjectInfoCache.java @@ -35,6 +35,7 @@ public class ProjectInfoCache extends CacheAbs { @Autowired private ProjectInfoData projectInfoData; + /** * key前缀 * diff --git a/muyu-modules/muyu-product/结构 b/muyu-modules/muyu-product/结构 new file mode 100644 index 0000000..f4f14d7 --- /dev/null +++ b/muyu-modules/muyu-product/结构 @@ -0,0 +1,26 @@ +{ 基本信息: { + name: "", + introduction: "", + mianType: "", + parentType: "", + type: "", + image: "", + carouselImages: "", + status: "", + ruleId: "", + branId: "", + remark: "" + }, + 品类属性: [ { + id: "", + value: "", + } ………… + ], + 商品规格: [ { + SKU: "",(所有的规格属性拼接而成) + "images": "", + 库存: "", + 价格: "", + } ………… + ] +}