package org.springblade.swzdr.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.swzdr.pojo.entity.RyInfoEntity;
import org.springblade.swzdr.pojo.vo.RyInfoVO;

import java.util.Objects;

/**
 * 人员_基本信息 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-09-12
 */
public class RyInfoWrapper extends BaseEntityWrapper<RyInfoEntity, RyInfoVO>  {

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

	@Override
	public RyInfoVO entityVO(RyInfoEntity ryInfo) {
		RyInfoVO ryInfoVO = Objects.requireNonNull(BeanUtil.copyProperties(ryInfo, RyInfoVO.class));

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

		return ryInfoVO;
	}

}
