peter
2025-07-11 19be3926c88d19645f43dd926d00615225f30802
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package com.yami.trading.bean.future.dto;
 
import javax.validation.constraints.NotNull;
import java.util.Date;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yami.trading.common.dto.BaseDTO;
import com.yami.trading.common.query.Query;
import com.yami.trading.common.query.QueryType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
 
/**
 * 交割合约DTO
 *
 * @author lucas
 * @version 2023-04-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class ProfitLossConfigDTO extends BaseDTO {
 
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("用户名")
    private String userName;
 
    private String userCode;
    @ApiModelProperty("角色名称")
    private String roleName;
    /**
     * PARTY_ID
     */
    private String partyId;
    /**
     * REMARK
     */
    private String remark;
    /**
     * TYPE
     */
    private String type;
 
    private String typeName;
 
 
 
    public String getTypeName() {
        typeName = "-";
        if ("profit".equals(type)) {
            typeName = "盈利";
        }
        if ("loss".equals(type)) {
            typeName = "亏损";
        }
        if ("buy_profit".equals(type)) {
            typeName = "买多盈利";
        }
        if ("sell_profit".equals(type)
        ) {
            typeName = "买空盈利";
        }
        if ("buy_profit_sell_loss".equals(type)) {
            typeName = "买多盈利并且买空亏损";
        }
        if ("sell_profit_buy_loss".equals(type)) {
            typeName = "买空盈利并且买多亏损";
        }
        return typeName;
    }
 
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 时间戳
     */
    private Long createTimeTs;
    /**
     * 更新时间戳
     */
    private Long updateTimeTs;
 
}