package org.springblade.modules.yjjl.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.yjjl.entity.YjjlEntity;
import org.springblade.modules.yjjl.vo.YjjlVO;

import java.util.Objects;

/**
 * 场所检查-移交记录 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2023-07-29
 */
public class YjjlWrapper extends BaseEntityWrapper<YjjlEntity, YjjlVO> {

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

	@Override
	public YjjlVO entityVO(YjjlEntity yjjl) {
		YjjlVO yjjlVO = Objects.requireNonNull(BeanUtil.copy(yjjl, YjjlVO.class));
		//User createUser = UserCache.getUser(yjjl.getCreateUser());
		//User updateUser = UserCache.getUser(yjjl.getUpdateUser());
		//yjjlVO.setCreateUserName(createUser.getName());
		//yjjlVO.setUpdateUserName(updateUser.getName());
		return yjjlVO;
	}
}
