package com.zhujizheng.IHome.applyfriend.vo; import com.zhujizheng.IHome.generator.dao.PYApplyFriend; import lombok.Data; import lombok.extern.slf4j.Slf4j; @Slf4j @Data public class PYApplyFriendVO { private Integer applyId; private Integer applyUserId; private Integer friendId; // 0无状态 1申请中 2已接受 private Integer status; private Long applyTime; private Long replyTime; public static PYApplyFriendVO createVO(PYApplyFriend applyFriend) { log.info("applyFriend = " + applyFriend); if (applyFriend == null) { return null; } PYApplyFriendVO vo = new PYApplyFriendVO(); vo.setApplyId(applyFriend.getId()); vo.setApplyUserId(applyFriend.getApplyUserId()); vo.setFriendId(applyFriend.getFriendId()); vo.setStatus(applyFriend.getStatus()); vo.setApplyTime(applyFriend.getApplyTime()); vo.setReplyTime(applyFriend.getReplyTime()); log.info("vo = " + vo); return vo; } }