com.dahuatech.icc.passengerflow.model.v202207.person.PresencePersonPageRequest Maven / Gradle / Ivy
package com.dahuatech.icc.passengerflow.model.v202207.person;
import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.oauth.exception.BusinessException;
import com.dahuatech.icc.oauth.http.AbstractIccRequest;
import com.dahuatech.icc.oauth.model.v202010.HttpConfigInfo;
import com.dahuatech.icc.passengerflow.constant.PassengerFlowConstant;
import com.dahuatech.icc.util.StringUtils;
/**
* program:java-sdk
*
* Author: 355079
* Date:2022-08-08 11:15
* Description: 查询多区域在场人员信息
*/
public class PresencePersonPageRequest extends AbstractIccRequest {
private Integer pageNum;
private Integer pageSize;
private String enterStartTime ;
private String enterEndTime ;
private String personCode;
private String personType;
private String deptId;
private String channelCode;
private String personName;
private String regionCode;
private String host;
private String port;
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public String getPort() {
return port;
}
public void setPort(String port) {
this.port = port;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
putBodyParameter("pageNum",pageNum);
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
putBodyParameter("pageSize",pageSize);
this.pageSize = pageSize;
}
public String getEnterStartTime() {
return enterStartTime;
}
public void setEnterStartTime(String enterStartTime) {
putBodyParameter("enterStartTime",enterStartTime);
this.enterStartTime = enterStartTime;
}
public String getEnterEndTime() {
return enterEndTime;
}
public void setEnterEndTime(String enterEndTime) {
putBodyParameter("enterEndTime",enterEndTime);
this.enterEndTime = enterEndTime;
}
public String getPersonCode() {
return personCode;
}
public void setPersonCode(String personCode) {
putBodyParameter("personCode",personCode);
this.personCode = personCode;
}
public String getPersonType() {
return personType;
}
public void setPersonType(String personType) {
putBodyParameter("personType",personType);
this.personType = personType;
}
public String getDeptId() {
return deptId;
}
public void setDeptId(String deptId) {
putBodyParameter("deptId",deptId);
this.deptId = deptId;
}
public String getChannelCode() {
return channelCode;
}
public void setChannelCode(String channelCode) {
putBodyParameter("channelCode",channelCode);
this.channelCode = channelCode;
}
public String getPersonName() {
return personName;
}
public void setPersonName(String personName) {
putBodyParameter("personName",personName);
this.personName = personName;
}
public String getRegionCode() {
return regionCode;
}
public void setRegionCode(String regionCode) {
putBodyParameter("regionCode",regionCode);
this.regionCode = regionCode;
}
public PresencePersonPageRequest() throws ClientException {
super(PassengerFlowConstant.url(PassengerFlowConstant.PRESENCE_PERSON_PAGE), Method.POST);
}
public PresencePersonPageRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
super(httpConfigInfo.getPrefixUrl() + url,method,Boolean.TRUE);
}
@Override
public Class getResponseClass() {
return PresencePersonPageResponse.class;
}
public void businessValid() {
if(pageNum == null){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "pageNum");
}
if(pageSize == null){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "pageSize");
}
if(StringUtils.isEmpty(personType)){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "personType");
}
}
}