package com.zhujizheng.IHome.user.vo; import com.github.binarywang.java.emoji.EmojiConverter; import com.zhujizheng.IHome.generator.dao.PYUserInfo; import lombok.Data; import java.util.Date; /** * Created with IntelliJ IDEA *

* Author: yons * Date: 2019/03/25 * Time: 23:25 * Description: * Copyright © 2019年 com.zhujizheng. All rights reserved. */ @Data public class PYUserVO { private Integer userId; private String userName; private Boolean userSex; private Date userBirthday; private String userIcon; private Integer orientation; private Integer loverId; private String account; private String signature; private String remark; private String type; public void setValues(PYUserInfo userInfo) { this.setUserId(userInfo.getId()); String userName = EmojiConverter.getInstance().toUnicode(userInfo.getUserName()); System.out.println(userName); this.setUserName(userName); this.setUserIcon(userInfo.getUserIcon()); this.setOrientation(userInfo.getOrientation()); this.setUserBirthday(userInfo.getUserBirthday()); this.setUserSex(userInfo.getUserSex()); this.setLoverId(userInfo.getLoverId()); this.setAccount(userInfo.getAccount()); this.setSignature(userInfo.getSignature()); this.setType(userInfo.getType()); this.setRemark(""); } /** * @Description: 初始化方法 * @Param: com.zhujizheng.IHome.generator.dao.PYUserInfo * @return: com.zhujizheng.IHome.user.vo.PYUserVO * @Author: 朱吉峥 * @Date: 2019/04/26 */ public static PYUserVO createUserVO(PYUserInfo userInfo) { System.out.println("userInfo = " + userInfo); if (userInfo == null) { return null; } PYUserVO userVO = new PYUserVO(); userVO.setValues(userInfo); System.out.println("userVO = " + userVO); return userVO; } }