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.RyLhspEntity;
import org.springblade.swzdr.pojo.vo.RyLhspVO;

import java.util.Objects;

/**
 * 人员_列化审批 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-09-24
 */
public class RyLhspWrapper extends BaseEntityWrapper<RyLhspEntity, RyLhspVO>  {

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

	@Override
	public RyLhspVO entityVO(RyLhspEntity ryLhsp) {
		RyLhspVO ryLhspVO = Objects.requireNonNull(BeanUtil.copyProperties(ryLhsp, RyLhspVO.class));

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

		return ryLhspVO;
	}

}
