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.SqmyRyEntity;
import org.springblade.modules.sqmy.pojo.vo.SqmyRyVO;

import java.util.Objects;

/**
 * 社情民意_线索提供人 包装类,返回视图层所需的字段
 *
 * @author wth
 * @since 2024-11-12
 */
public class SqmyRyWrapper extends BaseEntityWrapper<SqmyRyEntity, SqmyRyVO>  {

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

	@Override
	public SqmyRyVO entityVO(SqmyRyEntity sqmyRy) {
		SqmyRyVO sqmyRyVO = Objects.requireNonNull(BeanUtil.copyProperties(sqmyRy, SqmyRyVO.class));

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

		return sqmyRyVO;
	}

}
