package org.springblade.modules.sqmy.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.sqmy.pojo.entity.ZatbInfoEntity;
import org.springblade.modules.sqmy.pojo.vo.ZatbInfoVO;

import java.util.Objects;

/**
 * 季度治安通报 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-12
 */
public class ZatbInfoWrapper extends BaseEntityWrapper<ZatbInfoEntity, ZatbInfoVO>  {

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

	@Override
	public ZatbInfoVO entityVO(ZatbInfoEntity zatbInfo) {
		ZatbInfoVO zatbInfoVO = Objects.requireNonNull(BeanUtil.copyProperties(zatbInfo, ZatbInfoVO.class));

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

		return zatbInfoVO;
	}

}
