| | |
| | | import com.vci.corba.omd.vrm.VersionRule; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.util.VciDateUtil; |
| | | import com.vci.web.constant.CacheKeyConstant; |
| | | import com.vci.web.pageModel.OsRevisionRuleVO; |
| | | import com.vci.web.service.OsRevisionRuleServiceI; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.CachePut; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.web.constant.CacheNameConstant.VCI_OBJECT_SERVICE; |
| | | |
| | | /** |
| | | * 版本规则的服务 |
| | |
| | | * @return key 是版本的英文名称 |
| | | */ |
| | | @Override |
| | | @CachePut(value = VCI_OBJECT_SERVICE,key = CacheKeyConstant.ALL_REVISION,unless = "#result ==null ") |
| | | @VciUnLog |
| | | public Map<String, OsRevisionRuleVO> selectAllRevisionMap() { |
| | | return Optional.ofNullable(self.selectAllRevision()).orElseGet(()->new ArrayList<>()).stream().collect(Collectors.toMap(s->s.getId().toLowerCase(),t->t,(o1,o2)->o1)); |
| | |
| | | * 清除缓存 |
| | | */ |
| | | @Override |
| | | @CachePut(value = VCI_OBJECT_SERVICE,key = CacheKeyConstant.ALL_REVISION) |
| | | public void clearCache() { |
| | | |
| | | } |