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

import java.util.Objects;

/**
 * 人员_任务指令(接收/转递) 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-10-10
 */
public class RyRwzlWrapper extends BaseEntityWrapper<RyRwzlEntity, RyRwzlVO> {

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

	@Override
	public RyRwzlVO entityVO(RyRwzlEntity ryRwzl) {
		RyRwzlVO ryRwzlVO = Objects.requireNonNull(BeanUtil.copyProperties(ryRwzl, RyRwzlVO.class));
		//User createUser = UserCache.getUser(ryRwzl.getCreateUser());
		//User updateUser = UserCache.getUser(ryRwzl.getUpdateUser());
		//ryRwzlVO.setCreateUserName(createUser.getName());
		//ryRwzlVO.setUpdateUserName(updateUser.getName());
		return ryRwzlVO;
	}
}
