|
@@ -33,8 +33,7 @@ public class DefaultNumberingStrategyClient implements NumberingStrategyClient {
|
|
|
private Cache cache;
|
|
private Cache cache;
|
|
|
|
|
|
|
|
DefaultNumberingStrategyClient(NumberingStrategyProperties properties,CacheManager cacheManager) {
|
|
DefaultNumberingStrategyClient(NumberingStrategyProperties properties,CacheManager cacheManager) {
|
|
|
- Cache cache = cacheManager.getCache("serialStrategy" + properties.getClientId());
|
|
|
|
|
-// operation = redissonClient.getMap("global:serialStrategy:"+properties.getClientId(),new IntegerCodec());
|
|
|
|
|
|
|
+ this.cache = cacheManager.getCache("serialStrategy" + properties.getClientId());
|
|
|
doInit(properties);
|
|
doInit(properties);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -75,7 +74,7 @@ public class DefaultNumberingStrategyClient implements NumberingStrategyClient {
|
|
|
//拼接流水号
|
|
//拼接流水号
|
|
|
String result=fillNum;
|
|
String result=fillNum;
|
|
|
|
|
|
|
|
- if (StrUtil.isNotEmpty(strategyEnum.getPattern())) {
|
|
|
|
|
|
|
+ if (StrUtil.isNotBlank(strategyEnum.getPattern())) {
|
|
|
result=DateUtil.format(new Date(),pattern)+"-"+fillNum;
|
|
result=DateUtil.format(new Date(),pattern)+"-"+fillNum;
|
|
|
}
|
|
}
|
|
|
if(StrUtil.isNotEmpty(prefix)){
|
|
if(StrUtil.isNotEmpty(prefix)){
|