refactor: 修改缓存转换逻辑.
This commit is contained in:
@@ -29,6 +29,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* $!{table.comment} 服务实现类
|
* $!{table.comment} 服务实现类
|
||||||
@@ -145,7 +146,9 @@ public class ${table.serviceImplName} implements ${table.serviceName} {
|
|||||||
// 删除屏障
|
// 删除屏障
|
||||||
RedisMaps.removeBarrier(list);
|
RedisMaps.removeBarrier(list);
|
||||||
// 转换
|
// 转换
|
||||||
return Lists.map(list, ${type}Convert.MAPPER::to);
|
return list.stream()
|
||||||
|
.map(${type}Convert.MAPPER::to)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
#end
|
#end
|
||||||
|
|||||||
@@ -126,7 +126,9 @@ public class HostIdentityServiceImpl implements HostIdentityService {
|
|||||||
// 删除屏障
|
// 删除屏障
|
||||||
RedisMaps.removeBarrier(list);
|
RedisMaps.removeBarrier(list);
|
||||||
// 转换
|
// 转换
|
||||||
return Lists.map(list, HostIdentityConvert.MAPPER::to);
|
return list.stream()
|
||||||
|
.map(HostIdentityConvert.MAPPER::to)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主机秘钥 服务实现类
|
* 主机秘钥 服务实现类
|
||||||
@@ -139,7 +140,9 @@ public class HostKeyServiceImpl implements HostKeyService {
|
|||||||
// 删除屏障
|
// 删除屏障
|
||||||
RedisMaps.removeBarrier(list);
|
RedisMaps.removeBarrier(list);
|
||||||
// 转换
|
// 转换
|
||||||
return Lists.map(list, HostKeyConvert.MAPPER::to);
|
return list.stream()
|
||||||
|
.map(HostKeyConvert.MAPPER::to)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -163,7 +163,9 @@ public class HostServiceImpl implements HostService {
|
|||||||
// 删除屏障
|
// 删除屏障
|
||||||
RedisMaps.removeBarrier(list);
|
RedisMaps.removeBarrier(list);
|
||||||
// 转换
|
// 转换
|
||||||
return Lists.map(list, HostConvert.MAPPER::to);
|
return list.stream()
|
||||||
|
.map(HostConvert.MAPPER::to)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -172,7 +172,9 @@ public class SystemUserServiceImpl implements SystemUserService {
|
|||||||
// 删除屏障
|
// 删除屏障
|
||||||
RedisMaps.removeBarrier(list);
|
RedisMaps.removeBarrier(list);
|
||||||
// 转换
|
// 转换
|
||||||
return Lists.map(list, SystemUserConvert.MAPPER::to);
|
return list.stream()
|
||||||
|
.map(SystemUserConvert.MAPPER::to)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标签枚举 服务实现类
|
* 标签枚举 服务实现类
|
||||||
@@ -76,7 +77,9 @@ public class TagServiceImpl implements TagService {
|
|||||||
// 删除屏障
|
// 删除屏障
|
||||||
RedisLists.removeBarrier(list);
|
RedisLists.removeBarrier(list);
|
||||||
// 转换
|
// 转换
|
||||||
return Lists.map(list, TagConvert.MAPPER::to);
|
return list.stream()
|
||||||
|
.map(TagConvert.MAPPER::to)
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user