Commodity2FindRequest.java 5.39 KB
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.drp.contract.request;

import com.drp.contract.response.Commodity2FindResponse;
import com.xiniunet.sdk.ApiRuleException;
import com.xiniunet.sdk.XiniuRequest;
import com.xiniunet.sdk.framework.SortTypeEnum;

import com.xiniunet.sdk.internal.parser.json.JSON;
import com.xiniunet.sdk.internal.util.RequestCheckUtils;
import com.xiniunet.sdk.internal.util.XiniuHashMap;
import java.util.List;
import java.util.Map;

public class Commodity2FindRequest implements XiniuRequest<Commodity2FindResponse> {
    private XiniuHashMap udfParams = new XiniuHashMap();
    private String name;
    private String number;
    private Long classId;
    private Long operatingUnitId;
    private Long notOuId;
    private String classCode;
    private Long brandId;
    private List<Long> ids;
    private List<Long> classIdList;
    private Boolean isEcommerceSale;
    private Long storeId;
    private int pageNumber;
    private int pageSize;
    private List<String> sortKey;
    private SortTypeEnum sortType;

    public Commodity2FindRequest() {
    }

    public String getApiMethodName() {
        return "api.drp.commodity.find";
    }

    public String getName() {
        return this.name;
    }

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

    public String getNumber() {
        return this.number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public Long getClassId() {
        return this.classId;
    }

    public void setClassId(Long classId) {
        this.classId = classId;
    }

    public Long getOperatingUnitId() {
        return this.operatingUnitId;
    }

    public void setOperatingUnitId(Long operatingUnitId) {
        this.operatingUnitId = operatingUnitId;
    }

    public Long getNotOuId() {
        return this.notOuId;
    }

    public void setNotOuId(Long notOuId) {
        this.notOuId = notOuId;
    }

    public String getClassCode() {
        return this.classCode;
    }

    public void setClassCode(String classCode) {
        this.classCode = classCode;
    }

    public Long getBrandId() {
        return this.brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public List<Long> getIds() {
        return this.ids;
    }

    public void setIds(List<Long> ids) {
        this.ids = ids;
    }

    public List<Long> getClassIdList() {
        return this.classIdList;
    }

    public void setClassIdList(List<Long> classIdList) {
        this.classIdList = classIdList;
    }

    public Boolean getIsEcommerceSale() {
        return this.isEcommerceSale;
    }

    public void setIsEcommerceSale(Boolean isEcommerceSale) {
        this.isEcommerceSale = isEcommerceSale;
    }

    public Long getStoreId() {
        return this.storeId;
    }

    public void setStoreId(Long storeId) {
        this.storeId = storeId;
    }

    public int getPageNumber() {
        return this.pageNumber;
    }

    public void setPageNumber(int pageNumber) {
        this.pageNumber = pageNumber;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<String> getSortKey() {
        return this.sortKey;
    }

    public void setSortKey(List<String> sortKey) {
        this.sortKey = sortKey;
    }

    public SortTypeEnum getSortType() {
        return this.sortType;
    }

    public void setSortType(SortTypeEnum sortType) {
        this.sortType = sortType;
    }

    public Map<String, String> getTextParams() {
        XiniuHashMap txtParams = new XiniuHashMap();
        txtParams.put("name", this.name);
        txtParams.put("number", this.number);
        txtParams.put("classId", this.classId);
        txtParams.put("operatingUnitId", this.operatingUnitId);
        txtParams.put("notOuId", this.notOuId);
        txtParams.put("classCode", this.classCode);
        txtParams.put("brandId", this.brandId);
        if(this.ids != null) {
            txtParams.put("ids", JSON.toJSONString(this.ids));
        }

        if(this.classIdList != null) {
            txtParams.put("classIdList", JSON.toJSONString(this.classIdList));
        }

        txtParams.put("isEcommerceSale", this.isEcommerceSale);
        txtParams.put("storeId", this.storeId);
        txtParams.put("pageNumber", Integer.valueOf(this.pageNumber));
        txtParams.put("pageSize", Integer.valueOf(this.pageSize));
        if(this.sortKey != null) {
            txtParams.put("sortKey", JSON.toJSONString(this.sortKey));
        }

        txtParams.put("sortType", this.sortType);
        if(this.udfParams != null) {
            txtParams.putAll(this.udfParams);
        }

        return txtParams;
    }

    public Long getTimestamp() {
        return null;
    }

    public void setTimestamp(Long timestamp) {
    }

    public Class getResponseClass() {
        return Commodity2FindResponse.class;
    }

    public void check() throws ApiRuleException {
        RequestCheckUtils.checkNotEmpty(Integer.valueOf(this.pageNumber), "pageNumber");
        RequestCheckUtils.checkNotEmpty(Integer.valueOf(this.pageSize), "pageSize");
    }

    public Map<String, String> getHeaderMap() {
        return null;
    }

    public void putOtherTextParam(String key, String value) {
        this.udfParams.put(key, value);
    }
}