Repository navigation
Expand file tree
/
Copy pathBaseResponseRootMsg.java
More file actions
54 lines (49 loc) · 1.8 KB
/
Copy pathBaseResponseRootMsg.java
File metadata and controls
54 lines (49 loc) · 1.8 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
package com.zero.barrageserver.message.entity;
import com.zero.barrageserver.common.entity.BaseQueueEntity;
import com.alibaba.fastjson.annotation.JSONField;
import com.zero.barrageserver.common.entity.BaseQueueEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* Created by Administrator on 2017/12/12.
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class BaseResponseRootMsg extends BaseQueueEntity implements Cloneable{
private String type;
@JSONField(name = "isLoop")
private boolean isLoop;
//这是一个神奇的字段
@JSONField(name = "isProgram")
private boolean isProgram;
private int scrollTime;
private int loopIntervalTime;
private String value;
private String shopId;
private String activityId;
public BaseResponseRootMsg(){}
public BaseResponseRootMsg(BaseResponseRootMsg rootMsg,String value){
this.weight = rootMsg.getWeight();
this.type = rootMsg.getType();
this.shopId = rootMsg.getShopId();
this.activityId = rootMsg.getActivityId();
this.value = value;
}
public BaseResponseRootMsg(String shopId, String activityId, int weight, String type, String value,boolean isProgram){
this.weight = weight;
this.type = type;
this.value = value;
this.shopId = shopId;
this.activityId = activityId;
this.isProgram = isProgram;
}
public String toNormalMsgString(){
return "type:" + type + ";value:" + value + ";shopId:" + shopId + ";activityId:" + activityId;
}
// public BaseResponseRootMsg getClone(){
// BaseResponseRootMsg cloneMsg = new BaseResponseRootMsg(this,this.getValue());
// cloneMsg.setLoop(this.isLoop());
// cloneMsg.setLoopIntervalTime(this.getLoopIntervalTime());
// return cloneMsg;
// }
}