package org.springblade.modules.bq.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.bq.pojo.entity.BqSpEntity;
import org.springblade.modules.bq.pojo.vo.BqSpVO;

import java.util.Objects;

/**
 * 标签_审批 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-25
 */
public class BqSpWrapper extends BaseEntityWrapper<BqSpEntity, BqSpVO> {

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

	@Override
	public BqSpVO entityVO(BqSpEntity bqSp) {
		BqSpVO bqSpVO = Objects.requireNonNull(BeanUtil.copyProperties(bqSp, BqSpVO.class));

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

		return bqSpVO;
	}

}
