package org.springblade.modules.sqmy.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.sqmy.pojo.entity.SqmyInfoEntity;
import org.springblade.modules.sqmy.pojo.vo.SqmyInfoVO;

import java.util.Objects;

/**
 * 社情民意 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-12
 */
public class SqmyInfoWrapper extends BaseEntityWrapper<SqmyInfoEntity, SqmyInfoVO>  {

	public static SqmyInfoWrapper build() {
		return new SqmyInfoWrapper();
 	}

	@Override
	public SqmyInfoVO entityVO(SqmyInfoEntity sqmyInfo) {
		SqmyInfoVO sqmyInfoVO = Objects.requireNonNull(BeanUtil.copyProperties(sqmyInfo, SqmyInfoVO.class));

		//User createUser = UserCache.getUser(sqmyInfo.getCreateUser());
		//User updateUser = UserCache.getUser(sqmyInfo.getUpdateUser());
		//sqmyInfoVO.setCreateUserName(createUser.getName());
		//sqmyInfoVO.setUpdateUserName(updateUser.getName());

		return sqmyInfoVO;
	}

}
