package com.qianwen.smartman.modules.system.wrapper;
|
|
import java.util.Objects;
|
import com.qianwen.smartman.common.cache.DictCache;
|
import com.qianwen.smartman.common.enums.DictEnum;
|
import com.qianwen.core.mp.support.BaseEntityWrapper;
|
import com.qianwen.core.tool.utils.BeanUtil;
|
import com.qianwen.smartman.modules.system.entity.Post;
|
import com.qianwen.smartman.modules.system.vo.PostVO;
|
|
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/system/wrapper/PostWrapper.class */
|
public class PostWrapper extends BaseEntityWrapper<Post, PostVO> {
|
public static PostWrapper build() {
|
return new PostWrapper();
|
}
|
|
public PostVO entityVO(Post post) {
|
PostVO postVO = (PostVO) Objects.requireNonNull(BeanUtil.copy(post, PostVO.class));
|
String categoryName = DictCache.getValue(DictEnum.POST_CATEGORY, post.getCategory());
|
postVO.setCategoryName(categoryName);
|
return postVO;
|
}
|
}
|