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

import java.util.Objects;

/**
 * 人员_撤管记录 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-09-27
 */
public class RyCgspWrapper extends BaseEntityWrapper<RyCgspEntity, RyCgspVO> {

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

	@Override
	public RyCgspVO entityVO(RyCgspEntity ryCgsp) {
		RyCgspVO ryCgspVO = Objects.requireNonNull(BeanUtil.copyProperties(ryCgsp, RyCgspVO.class));

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

		return ryCgspVO;
	}

}
