feat:五级行政区划接口添加
parent
0578038e36
commit
fb655be011
|
|
@ -0,0 +1,26 @@
|
|||
package com.czcb.scfs.api.service.v2.division;
|
||||
|
||||
import com.czcb.scfs.api.core.ApiClient;
|
||||
import com.czcb.scfs.api.core.http.HttpHeaders;
|
||||
import com.czcb.scfs.api.core.http.HttpResponse;
|
||||
import com.czcb.scfs.api.service.v2.division.model.FiveCascadeQueryRequest;
|
||||
import com.czcb.scfs.api.service.v2.division.model.FiveCascadeQueryResponse;
|
||||
|
||||
import static com.czcb.scfs.api.core.Constants.API_VERSION;
|
||||
import static com.czcb.scfs.api.core.Constants.V_2;
|
||||
|
||||
public class DivisionService {
|
||||
private final ApiClient apiClient;
|
||||
|
||||
public DivisionService(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
}
|
||||
|
||||
public FiveCascadeQueryResponse fiveCascadeQuery(FiveCascadeQueryRequest fiveCascadeQueryRequest) {
|
||||
String url = "/division/five-cascade-query";
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.addHeader(API_VERSION, V_2);
|
||||
HttpResponse<FiveCascadeQueryResponse> httpResponse = apiClient.post(url, headers, fiveCascadeQueryRequest.toJsonRequest(), FiveCascadeQueryResponse.class);
|
||||
return httpResponse.getServiceResponse();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.czcb.scfs.api.service.v2.division.model;
|
||||
|
||||
import com.czcb.scfs.api.core.ApiRequest;
|
||||
import com.czcb.scfs.api.core.agrs.TransType;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TransType("210306")
|
||||
public class FiveCascadeQueryRequest implements ApiRequest {
|
||||
/**
|
||||
* 渠道编号
|
||||
*/
|
||||
@SerializedName("channel_no")
|
||||
private String channelNo;
|
||||
|
||||
/**
|
||||
* 应用编号
|
||||
*/
|
||||
@SerializedName("app_no")
|
||||
private String appNo;
|
||||
|
||||
/**
|
||||
* 流水号
|
||||
*/
|
||||
@SerializedName("serial_no")
|
||||
private String serialNo;
|
||||
|
||||
/**
|
||||
* 操作日期
|
||||
*/
|
||||
@SerializedName("sys_date")
|
||||
private String sysDate;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@SerializedName("sys_time")
|
||||
private String sysTime;
|
||||
|
||||
/**
|
||||
* 区划代码
|
||||
*/
|
||||
@SerializedName("zoning_code")
|
||||
private String zoningCode;
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.czcb.scfs.api.service.v2.division.model;
|
||||
|
||||
import com.czcb.scfs.api.core.ApiResponse;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class FiveCascadeQueryResponse implements ApiResponse {
|
||||
/**
|
||||
* 000000:表示成功
|
||||
*/
|
||||
@SerializedName("recode")
|
||||
private String recode;
|
||||
|
||||
/**
|
||||
* 结果信息
|
||||
*/
|
||||
@SerializedName("recode_info")
|
||||
private String recodeInfo;
|
||||
|
||||
/**
|
||||
* 系统流水号
|
||||
*/
|
||||
@SerializedName("sys_serial_no")
|
||||
private String sysSerialNo;
|
||||
|
||||
/**
|
||||
* 操作日期
|
||||
*/
|
||||
@SerializedName("sys_date")
|
||||
private String sysDate;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@SerializedName("sys_time")
|
||||
private String sysTime;
|
||||
|
||||
/**
|
||||
* 下级区划代码信息
|
||||
*/
|
||||
@SerializedName("zoning_code_children_list")
|
||||
private List<zoning_code_children> zoningCodeChildrenList;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public static class zoning_code_children implements Serializable {
|
||||
|
||||
/**
|
||||
* 省码
|
||||
*/
|
||||
@SerializedName("province_code")
|
||||
private String provinceCode;
|
||||
|
||||
/**
|
||||
* 地市码
|
||||
*/
|
||||
@SerializedName("city_code")
|
||||
private String cityCode;
|
||||
|
||||
/**
|
||||
* 县码
|
||||
*/
|
||||
@SerializedName("county_code")
|
||||
private String countyCode;
|
||||
|
||||
/**
|
||||
* 乡码
|
||||
*/
|
||||
@SerializedName("town_code")
|
||||
private String townCode;
|
||||
|
||||
/**
|
||||
* 村码
|
||||
*/
|
||||
@SerializedName("village_code")
|
||||
private String villageCode;
|
||||
|
||||
/**
|
||||
* 城乡分类代码
|
||||
*/
|
||||
@SerializedName("urban_rural_classification_code")
|
||||
private String urbanRuralClassificationCode;
|
||||
|
||||
/**
|
||||
* 区划代码
|
||||
*/
|
||||
@SerializedName("zoning_code")
|
||||
private String zoningCode;
|
||||
|
||||
/**
|
||||
* 区划名称
|
||||
*/
|
||||
@SerializedName("zoning_name")
|
||||
private String zoningName;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue