package com.sqx.modules.datacentre.query;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.StringUtils;

import javax.validation.constraints.Pattern;

@Data
public class RankListQuery extends DataCenterQuery {

    @ApiModelProperty(value = "地区")
    private String address;

    @ApiModelProperty(value = "骑手站点id")
    private String riderStationId;

    @ApiModelProperty(value = "登录人id")
    private String userId;

    public String toStrMessage() {
        StringBuilder stringBuilder=new StringBuilder();
        stringBuilder
                .append(StringUtils.hasText(address)?"商铺类型编号："+address+";":"")
                .append(StringUtils.hasText(getDateType())?"日期类型："+getDateType()+";":"")
                .append(StringUtils.hasText(getDate())?"日期："+getDate()+";":"");
        return stringBuilder.toString();
    }

    public String toStrCode() {
        return
                ","+(address==null?"":address)
                +","+(getDateType()==null?"":getDateType())
                +","+(getDate()==null?"":getDate())
                +","+(riderStationId==null?"":riderStationId)
                +",";
    }
}
