package org.springblade.modules.rhzf.gzyj.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.rhzf.gzyj.pojo.entity.RhzfGzyjEntity;
import org.springblade.modules.rhzf.gzyj.pojo.vo.RhzfGzyjVO;

import java.util.Objects;

/**
 * 入户走访_意见征集 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-14
 */
public class RhzfGzyjWrapper extends BaseEntityWrapper<RhzfGzyjEntity, RhzfGzyjVO> {

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

	@Override
	public RhzfGzyjVO entityVO(RhzfGzyjEntity rhzfGzyj) {
		RhzfGzyjVO rhzfGzyjVO = Objects.requireNonNull(BeanUtil.copyProperties(rhzfGzyj, RhzfGzyjVO.class));

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

		return rhzfGzyjVO;
	}

}
