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

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.rhzf.wtfy.pojo.entity.RhzfWtfyEntity;
import org.springblade.modules.rhzf.wtfy.pojo.vo.RhzfWtfyVO;

import java.util.Objects;

/**
 * 入户走访_问题反映 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-14
 */
public class RhzfWtfyWrapper extends BaseEntityWrapper<RhzfWtfyEntity, RhzfWtfyVO> {

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

	@Override
	public RhzfWtfyVO entityVO(RhzfWtfyEntity rhzfWtfy) {
		RhzfWtfyVO rhzfWtfyVO = Objects.requireNonNull(BeanUtil.copyProperties(rhzfWtfy, RhzfWtfyVO.class));

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

		return rhzfWtfyVO;
	}

}
