| | |
| | | |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.system.cache.DictCache; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.system.entity.Post; |
| | | import org.springblade.system.enums.DictEnum; |
| | | import org.springblade.system.vo.PostVO; |
| | |
| | | @Override |
| | | public PostVO entityVO(Post post) { |
| | | PostVO postVO = Objects.requireNonNull(BeanUtil.copy(post, PostVO.class)); |
| | | String categoryName = DictCache.getValue(DictEnum.POST_CATEGORY, post.getCategory()); |
| | | String categoryName = DictCache.getValue(DictEnum.POST_CATEGORY.getName(), post.getCategory()); |
| | | postVO.setCategoryName(categoryName); |
| | | return postVO; |
| | | } |