初始化hash缓存

master
DongZeLiang 2024-03-30 10:53:47 +08:00
parent c76dfb1228
commit 41d4175d23
5 changed files with 233 additions and 0 deletions

View File

@ -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

View File

@ -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<K, HK, HV> implements HashCache<K, HK, HV> {
/**
*
*
* @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();
}
/**
* Keymap
* @param key
* @return Map
*/
@Override
public Map<HK, HV> get (K key) {
return null;
}
/**
* hashKeyhashValue
*
* @param key
* @param hashKey hash
*
* @return hash
*/
@Override
public HV get (K key, HK hashKey) {
return null;
}
/**
* hashKeyhashValue
*
* @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<HV> getToList (K key) {
return null;
}
/**
*
*
* @param key redis
* @param map hashMap
*/
@Override
public void put (K key, Map<HK, HV> map) {
}
/**
*
*
* @param key redis
* @param dataList
* @param hashKey hash
*/
@Override
public void put (K key, List<HV> dataList, Function<HV, HK> 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) {
}
/**
* redishash
*
* @param key redis
* @param hashKey hash
*/
@Override
public void remove (K key, HK hashKey) {
}
}

View File

@ -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

View File

@ -35,6 +35,7 @@ public class ProjectInfoCache extends CacheAbs<Long, ProjectInfo> {
@Autowired
private ProjectInfoData projectInfoData;
/**
* key
*

View File

@ -0,0 +1,26 @@
{ 基本信息: {
name: "",
introduction: "",
mianType: "",
parentType: "",
type: "",
image: "",
carouselImages: "",
status: "",
ruleId: "",
branId: "",
remark: ""
},
品类属性: [ {
id: "",
value: "",
} …………
],
商品规格: [ {
SKU: "",(所有的规格属性拼接而成)
"images": "",
库存: "",
价格: "",
} …………
]
}