package org.springblade.modules.member.wrapper;

import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.member.entity.MemberAccountEntity;
import org.springblade.modules.member.vo.MemberAccountVO;

/**
 *  包装类,返回视图层所需的字段
 *
 * @author Chill
 */
public class MemberAccountWrapper extends BaseEntityWrapper<MemberAccountEntity, MemberAccountVO> {

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

	@Override
	public MemberAccountVO entityVO(MemberAccountEntity member_account) {
		MemberAccountVO member_accountVO = BeanUtil.copy(member_account, MemberAccountVO.class);

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

		return member_accountVO;
	}

}
