package org.springblade.modules.sqjw.pcsInfo.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.sqjw.pcsInfo.entity.PcsInfoEntity;
import org.springblade.modules.sqjw.pcsInfo.vo.PcsInfoVO;

import java.util.Objects;

/**
 * 派出所信息表 包装类,返回视图层所需的字段
 *
 * @author BladeX
 * @since 2024-01-08
 */
public class PcsInfoWrapper extends BaseEntityWrapper<PcsInfoEntity, PcsInfoVO>  {

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

	@Override
	public PcsInfoVO entityVO(PcsInfoEntity pcsInfo) {
		PcsInfoVO pcsInfoVO = Objects.requireNonNull(BeanUtil.copy(pcsInfo, PcsInfoVO.class));

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

		return pcsInfoVO;
	}


}
