Repository navigation
Expand file tree
/
Copy pathBaseResponseMsg.java
More file actions
55 lines (48 loc) · 2 KB
/
Copy pathBaseResponseMsg.java
File metadata and controls
55 lines (48 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.zero.barrageserver.message.entity;
import com.zero.barrageserver.common.entity.servermsg.BaseRequestMsgEntity;
import com.zero.barrageserver.common.utils.UrlUtils;
import com.zero.barrageserver.common.entity.servermsg.BaseRequestMsgEntity;
import com.zero.barrageserver.common.utils.UrlUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* Created by zero大神 on 2017/12/14.
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BaseResponseMsg extends BaseResponseRootMsg{
private String id;
public String portraitImage;
public String nickName;
public int userLevel;
public int levelRange;
public String userRole;
public String activityId;
public String usertoken;
public int count;
// public boolean isFree = true;
public int teamCode;
public String teamName;
public BaseResponseMsg(){}
public BaseResponseMsg(String shopId, String activityId, int weight, String type, String value,boolean isProgram){
super(shopId,activityId,weight,type,value,isProgram);
}
public void setUser(BaseRequestMsgEntity requestMsgEntity){
this.id = requestMsgEntity.getId();
this.levelRange = requestMsgEntity.getLevelRange();
this.userLevel = requestMsgEntity.getUserLevel();
this.userRole = requestMsgEntity.getUserRole();
this.usertoken = requestMsgEntity.getUsertoken();
this.nickName = requestMsgEntity.getUserName();
this.portraitImage = UrlUtils.getRealUrl(requestMsgEntity.getUserImage());
}
public void setUser(BaseResponseMsg responseMsgEntity){
this.id = responseMsgEntity.getId();
this.levelRange = responseMsgEntity.getLevelRange();
this.userLevel = responseMsgEntity.getUserLevel();
this.userRole = responseMsgEntity.getUserRole();
this.usertoken = responseMsgEntity.getUsertoken();
this.nickName = responseMsgEntity.getNickName();
this.portraitImage = UrlUtils.getRealUrl(responseMsgEntity.getPortraitImage());
}
}