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

import java.util.Objects;

/**
 * 人员_审批历史表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-09-13
 */
public class RySpWrapper extends BaseEntityWrapper<RyDjspEntity, RyDjspVO> {

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

	@Override
	public RyDjspVO entityVO(RyDjspEntity rySp) {
		RyDjspVO rySpVO = Objects.requireNonNull(BeanUtil.copyProperties(rySp, RyDjspVO.class));

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

		return rySpVO;
	}

}
