Sunshine
2024-11-05 8f7985d7764a0aad24bd593ac5ea47b7fc290961
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
package com.nova.sankuai.domain.api.doudouqian;
 
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
 
/**
 * @author weikangdi
 * @create 2022/4/27
 */
@ApiModel("豆豆钱通用响应数据")
@Data
public class DdqResponse {
 
    /**
     * 状态码-成功
     */
    public static final String STATUS_SUCCESS = "0000";
    /**
     * 状态码-请求异常
     */
    public static final String STATUS_REQUEST_EXCEPTION = "0001";
    /**
     * 状态码-参数不正确
     */
    public static final String STATUS_PARAM_ERROR = "1001";
 
    @ApiModelProperty(value = "状态码")
    private String status;
 
    @ApiModelProperty("描述信息")
    private String msg;
 
    @ApiModelProperty("返回数据")
    private String data;
 
    /**
     * 判断请求是否成功
     *
     * @return
     */
    public boolean isSuccess() {
        if (STATUS_SUCCESS.equals(status)) {
            return true;
        }
        return false;
    }
 
}