Repository navigation
Expand file tree
/
Copy pathResponseHotPointEntity.java
More file actions
64 lines (59 loc) · 2.63 KB
/
Copy pathResponseHotPointEntity.java
File metadata and controls
64 lines (59 loc) · 2.63 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
56
57
58
59
60
61
62
63
64
package com.zero.barrageserver.message.entity;
import com.zero.barrageserver.common.entity.servermsg.RequestHotPointEntity;
import com.zero.barrageserver.common.utils.UrlUtils;
import com.zero.barrageserver.dbserver.model.HotCreatorTable;
import com.zero.barrageserver.common.entity.servermsg.RequestHotPointEntity;
import com.zero.barrageserver.common.utils.UrlUtils;
import com.zero.barrageserver.dbserver.model.HotCreatorTable;
import lombok.Data;
/**
* Created by zero大神 on 2017/12/15.
*/
@Data
public class ResponseHotPointEntity {
private int points;
private String userRole;
private String nickName;
private String sign;
private int sex;
private int nickCount;
private String image;
private String usertoken;
private int levelRange;
private int level;
private int userId;
private String activityId;
private String id;
private int cannice;
private int myLike;
private String artistId;
public ResponseHotPointEntity(){}
public ResponseHotPointEntity(HotCreatorTable hotCreatorTable){
this.userRole = hotCreatorTable.getUser().getUserRole();
this.nickName = hotCreatorTable.getUser().getNickName();
this.image = UrlUtils.getRealUrl(hotCreatorTable.getUser().getImageList() != null && hotCreatorTable.getUser().getImageList().size() > 0
? hotCreatorTable.getUser().getImageList().get(0) : "");
this.levelRange = hotCreatorTable.getUser().getLevelRange();
this.level = hotCreatorTable.getUser().getLevel();
this.activityId = hotCreatorTable.getActivityId();
this.id = hotCreatorTable.getId();
}
public ResponseHotPointEntity(RequestHotPointEntity requestHotPointEntity){
this.points = requestHotPointEntity.getPoints();
this.userRole = requestHotPointEntity.getUserRole();
this.nickName = requestHotPointEntity.getNickName();
this.sign = requestHotPointEntity.getSign();
this.sex = requestHotPointEntity.getSex();
this.nickCount = requestHotPointEntity.getNiceCount();
this.image = UrlUtils.getRealUrl(requestHotPointEntity.getImage());
this.usertoken = requestHotPointEntity.getUsertoken();
this.levelRange = requestHotPointEntity.getLevelRange();
this.level = requestHotPointEntity.getLevel();
this.userId = requestHotPointEntity.getUserId();
this.activityId = requestHotPointEntity.getActivityId();
this.id = requestHotPointEntity.getId();
this.cannice = requestHotPointEntity.getCannice();
this.myLike = requestHotPointEntity.getMyLike();
this.artistId = requestHotPointEntity.getArtistId();
}
}