admin
2022-10-28 0e9b6603d4ae9d11c1fbc90257ce816c5807b8ff
app/src/main/java/com/yeshi/makemoney/app/entity/goldcorn/GoldCornGetRecord.java
@@ -1,5 +1,6 @@
package com.yeshi.makemoney.app.entity.goldcorn;
import com.yeshi.makemoney.app.entity.SystemEnum;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
@@ -14,6 +15,11 @@
 */
@Document(collection = "goldCornGetRecord")
public class GoldCornGetRecord {
    public final static int LEVEL_OWN = 0;
    public final static int LEVEL_FIRST = 1;
    public final static int LEVEL_SECOND = 2;
    @Id
    private String id;
    @Indexed
@@ -21,6 +27,13 @@
    @Indexed
    private String day;
    private Integer cornNum;
    private SystemEnum system;
    /**
     * 时间数量(单位为次/个/秒)
     **/
    private Long eventCount;
    /**
     * 缘由用户ID(当有二级分销时存在)
@@ -34,6 +47,11 @@
    @Indexed
    private String fromId;
    /**
     * 是否属于加倍
     **/
    private Boolean isDubble;
    @Indexed
    private GoldCornGetType type;
    private String remarks;
@@ -41,10 +59,26 @@
    private Date createTime;
    private Date updateTime;
    /**
     * 等级,0-由自己获取 1-下级获取  2-下下级获取
     **/
    private Integer level;
    public String toId() {
        return uid + "-" + type.name() + "-" + createTime.getTime();
        String st = uid + "-" + type.name() + "-" + createTime.getTime();
        if (isDubble != null && isDubble) {
            st += "-double";
        }
        return st;
    }
    public SystemEnum getSystem() {
        return system;
    }
    public void setSystem(SystemEnum system) {
        this.system = system;
    }
    public String getId() {
        return id;
@@ -125,4 +159,28 @@
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getLevel() {
        return level;
    }
    public void setLevel(Integer level) {
        this.level = level;
    }
    public Boolean getDubble() {
        return isDubble;
    }
    public void setDubble(Boolean dubble) {
        isDubble = dubble;
    }
    public Long getEventCount() {
        return eventCount;
    }
    public void setEventCount(Long eventCount) {
        this.eventCount = eventCount;
    }
}