zlyx
2022-09-14 d6400e382a91fe7b00fa9dc7a24499a5ebf0c211
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.ruoyi.demo.controller.queue;
 
import lombok.Data;
import lombok.NoArgsConstructor;
import org.jetbrains.annotations.NotNull;
 
/**
 * 实体类 注意不允许使用内部类 否则会找不到类
 *
 * @author Lion Li
 * @version 3.6.0
 */
@Data
@NoArgsConstructor
public class PriorityDemo implements Comparable<PriorityDemo> {
    private String name;
    private Integer orderNum;
 
    @Override
    public int compareTo(@NotNull PriorityDemo other) {
        return Integer.compare(getOrderNum(), other.getOrderNum());
    }
}