ApplicationResponseVo.java
1.54 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
package com.ruoyi.pojo.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author 20412
*/
@ApiModel("应用更新实体类")
@Data
public class ApplicationResponseVo {
@ApiModelProperty("是否更新")
Boolean updateFlag;
@ApiModelProperty("是否强制更新")
Boolean forceUpdate;
@ApiModelProperty("更新版本号")
Integer versionNum;
@ApiModelProperty("更新apk的url")
String apkUrl;
private ApplicationResponseVo(){ }
public ApplicationResponseVo appNoUpdate(Integer versionNum){
this.updateFlag = false;
this.forceUpdate = false;
this.versionNum = versionNum;
this.apkUrl = "";
return this;
}
/**
* 一般更新
* @param versionNum
* @param apkUrl
* @return
*/
public ApplicationResponseVo appNormalUpdate(Integer versionNum,String apkUrl){
this.updateFlag = true;
this.forceUpdate = false;
this.versionNum = versionNum;
this.apkUrl = apkUrl;
return this;
}
/**
* 强制更新
* @param versionNum
* @param apkUrl
* @return
*/
public ApplicationResponseVo appForceUpdate(Integer versionNum,String apkUrl){
this.updateFlag = true;
this.forceUpdate = true;
this.versionNum = versionNum;
this.apkUrl = apkUrl;
return this;
}
public static ApplicationResponseVo ApplicationResponseVoBuild(){
return new ApplicationResponseVo();
}
}