package cn.ysk.cashier.dto.product;

import cn.ysk.cashier.annotation.Query;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
public class StockQueryDto {

    private String name;
    private String shopId;
    private Double num;
    private Integer isStock;
    private String categoryId;
    private String sort;

    public void setName(String name) {
        if (StringUtils.isNotBlank(name)) {
            this.name = name;
        }
    }

    public void setCategoryId(String categoryId) {
        if (StringUtils.isNotBlank(categoryId)) {
            this.categoryId = categoryId;
        }
    }

    public void setShopId(String shopId) {
        if (StringUtils.isNotBlank(shopId) && !shopId.equals("1")) {
            this.shopId = shopId;
        }
    }

    public void setIsStock(Integer isStock) {
        if (isStock!=null) {
            this.isStock = isStock;
        }
    }

    public void setNum(Double num) {
        if (num!=null) {
            this.num = num;
        }
    }
}
