Commit 8d3aded2 authored by xianjun's avatar xianjun

附近小程序 getList

parent a9970dee
package com.yanzuoguang.wxxcx.analysis.data;
/**
* body 的结构
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataBodyRes {
/**
* 返回的数据数组
*/
private WxXcxAnalysisGetPerformanceDataTableRes table;
/**
* 数组大小
*/
private int count;
public WxXcxAnalysisGetPerformanceDataTableRes getTable() {
return table;
}
public void setTable(WxXcxAnalysisGetPerformanceDataTableRes table) {
this.table = table;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
}
package com.yanzuoguang.wxxcx.analysis.data;
/**
* 单天的性能数据
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataFieldsRes {
/**
* 日期
*/
private String refdate;
/**
* 性能数据值
*/
private String value;
public String getRefdate() {
return refdate;
}
public void setRefdate(String refdate) {
this.refdate = refdate;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
package com.yanzuoguang.wxxcx.analysis.data;
/**
* 按时间排列的性能数据
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataLinesRes {
private WxXcxAnalysisGetPerformanceDataFieldsRes fields;
public WxXcxAnalysisGetPerformanceDataFieldsRes getFields() {
return fields;
}
public void setFields(WxXcxAnalysisGetPerformanceDataFieldsRes fields) {
this.fields = fields;
}
}
package com.yanzuoguang.wxxcx.analysis.data;
/**
* params 的结构
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataParamsReq {
/**
* 查询条件
* networktype 网络类型作为查询条件,value=“-1,3g,4g,wifi”分别表示 全部网络类型,3G,4G,WIFI,不传 networktype 默认为全部网络类型
* device_level 机型作为查询条件,此时value=“-1,1,2,3”分别表示 全部机型,高档机,中档机,低档机,不传device_level默认为全部机型
* device 平台作为查询条件,此时value="-1,1,2"分别表示 全部平台,IOS平台,安卓平台,不传 device 默认为全部平台
*/
private String field;
/**
* 查询条件值
*/
private String value;
public String getField() {
return field;
}
public void setField(String field) {
this.field = field;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
package com.yanzuoguang.wxxcx.analysis.data;
/**
* 获取小程序启动性能,运行性能等数据 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始和结束日期的时间戳,时间跨度不能超过30天
*/
private WxXcxAnalysisGetPerformanceDataTimeReq time;
/**
* 查询数据的类型
* 10016 打开率, params字段可传入网络类型和机型
* 10017 启动各阶段耗时,params字段可传入网络类型和机型
* 10021 页面切换耗时,params数组字段可传入机型
* 10022 内存指标,params数组字段可传入机型
* 10023 内存异常,params数组字段可传入机型
*/
private String module;
/**
* 查询条件,比如机型,网络类型等等
*/
private WxXcxAnalysisGetPerformanceDataParamsReq params;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public WxXcxAnalysisGetPerformanceDataTimeReq getTime() {
return time;
}
public void setTime(WxXcxAnalysisGetPerformanceDataTimeReq time) {
this.time = time;
}
public String getModule() {
return module;
}
public void setModule(String module) {
this.module = module;
}
public WxXcxAnalysisGetPerformanceDataParamsReq getParams() {
return params;
}
public void setParams(WxXcxAnalysisGetPerformanceDataParamsReq params) {
this.params = params;
}
}
package com.yanzuoguang.wxxcx.analysis.data;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取小程序启动性能,运行性能等数据 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAnalysisGetPerformanceDataReq req;
public WxXcxAnalysisGetPerformanceDataRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAnalysisGetPerformanceDataReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetPerformanceData() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAnalysisGetPerformanceDataRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAnalysisGetPerformanceDataRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAnalysisGetPerformanceDataRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.analysis.data;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 获取小程序启动性能,运行性能等数据 响应
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataRes extends WxXcxResponseBaseError {
/**
* 返回的性能数据
*/
private WxXcxAnalysisGetPerformanceDataBodyRes body;
public WxXcxAnalysisGetPerformanceDataBodyRes getBody() {
return body;
}
public void setBody(WxXcxAnalysisGetPerformanceDataBodyRes body) {
this.body = body;
}
}
package com.yanzuoguang.wxxcx.analysis.data;
/**
* tables 的结构
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataTableRes {
/**
* 性能数据指标id
*/
private String id;
/**
* 按时间排列的性能数据
*/
private WxXcxAnalysisGetPerformanceDataLinesRes lines;
/**
* 性能数据指标中文名
*/
private String zh;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public WxXcxAnalysisGetPerformanceDataLinesRes getLines() {
return lines;
}
public void setLines(WxXcxAnalysisGetPerformanceDataLinesRes lines) {
this.lines = lines;
}
public String getZh() {
return zh;
}
public void setZh(String zh) {
this.zh = zh;
}
}
package com.yanzuoguang.wxxcx.analysis.data;
/**
* time 的结构
*
* @author 李贤军
*/
public class WxXcxAnalysisGetPerformanceDataTimeReq {
/**
* 结束日期时间戳
*/
private String end_timestamp;
/**
* 开始日期时间戳
*/
private String begin_timestamp;
public String getEnd_timestamp() {
return end_timestamp;
}
public void setEnd_timestamp(String end_timestamp) {
this.end_timestamp = end_timestamp;
}
public String getBegin_timestamp() {
return begin_timestamp;
}
public void setBegin_timestamp(String begin_timestamp) {
this.begin_timestamp = begin_timestamp;
}
}
package com.yanzuoguang.wxxcx.analysis.distribution;
/**
* 获取用户小程序访问分布数据 响应列表项
*
* @author 李贤军
*/
public class WxXcxAnalysisGetVisitDistributionItemListRes {
/**
* 场景 id,定义在各个 index 下不同,具体参见下方表格
*/
private int key;
/**
* 该场景 id 访问 pv
*/
private int value;
/**
* 该场景 id 访问 uv
*/
private int access_source_visit_uv;
public int getKey() {
return key;
}
public void setKey(int key) {
this.key = key;
}
public int getValue() {
return value;
}
public void setValue(int value) {
this.value = value;
}
public int getAccess_source_visit_uv() {
return access_source_visit_uv;
}
public void setAccess_source_visit_uv(int access_source_visit_uv) {
this.access_source_visit_uv = access_source_visit_uv;
}
}
package com.yanzuoguang.wxxcx.analysis.distribution;
/**
* 获取用户小程序访问分布数据 响应列表
*
* @author 李贤军
*/
public class WxXcxAnalysisGetVisitDistributionListRes {
/**
* 分布类型
* access_source_session_cnt 访问来源分布
* access_staytime_info 访问时长分布
* access_depth_info 访问深度的分布
*/
private String index;
/**
* 分布数据列表
*/
private WxXcxAnalysisGetVisitDistributionItemListRes item_list;
}
package com.yanzuoguang.wxxcx.analysis.distribution;
/**
* 获取用户小程序访问分布数据 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetVisitDistributionReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,限定查询 1 天数据,允许设置的最大值为昨日。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.distribution;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取用户小程序访问分布数据 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetVisitDistributionRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAnalysisGetVisitDistributionReq req;
public WxXcxAnalysisGetVisitDistributionRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAnalysisGetVisitDistributionReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetVisitDistribution() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAnalysisGetVisitDistributionRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAnalysisGetVisitDistributionRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAnalysisGetVisitDistributionRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.analysis.distribution;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 获取用户小程序访问分布数据 响应
*
* @author 李贤军
*/
public class WxXcxAnalysisGetVisitDistributionRes extends WxXcxResponseBaseError {
/**
* 日期,格式为 yyyymmdd
*/
private String ref_date;
/**
* 数据列表
*/
private WxXcxAnalysisGetVisitDistributionListRes list;
}
package com.yanzuoguang.wxxcx.analysis.page;
/**
* 访问页面 请求
* 目前只提供按 page_visit_pv 排序的 top200
*
* @author 李贤军
*/
public class WxXcxAnalysisGetVisitPageReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,限定查询1天数据,允许设置的最大值为昨日。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.page;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.analysis.portrait.WxXcxAnalysisGetUserPortraitReq;
import com.yanzuoguang.wxxcx.analysis.portrait.WxXcxAnalysisGetUserPortraitRes;
import com.yanzuoguang.wxxcx.base.*;
/**
* 访问页面 转换
* 目前只提供按 page_visit_pv 排序的 top200
*
* @author 李贤军
*/
public class WxXcxAnalysisGetVisitPageRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAnalysisGetVisitPageReq req;
public WxXcxAnalysisGetVisitPageRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAnalysisGetVisitPageReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetVisitPage() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAnalysisGetVisitPageRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAnalysisGetVisitPageRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAnalysisGetVisitPageRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.analysis.page;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 访问页面 响应
* 目前只提供按 page_visit_pv 排序的 top200
*
* @author 李贤军
*/
public class WxXcxAnalysisGetVisitPageRes extends WxXcxResponseBaseError {
/**
* 页面路径
*/
private String page_path;
/**
* 访问次数
*/
private int page_visit_pv;
/**
* 访问人数
*/
private int page_visit_uv;
/**
* 次均停留时长
*/
private int page_staytime_pv;
/**
* 进入页次数
*/
private int entrypage_pv;
/**
* 退出页次数
*/
private int exitpage_pv;
/**
* 转发次数
*/
private int page_share_pv;
/**
* 转发人数
*/
private int page_share_uv;
public String getPage_path() {
return page_path;
}
public void setPage_path(String page_path) {
this.page_path = page_path;
}
public int getPage_visit_pv() {
return page_visit_pv;
}
public void setPage_visit_pv(int page_visit_pv) {
this.page_visit_pv = page_visit_pv;
}
public int getPage_visit_uv() {
return page_visit_uv;
}
public void setPage_visit_uv(int page_visit_uv) {
this.page_visit_uv = page_visit_uv;
}
public int getPage_staytime_pv() {
return page_staytime_pv;
}
public void setPage_staytime_pv(int page_staytime_pv) {
this.page_staytime_pv = page_staytime_pv;
}
public int getEntrypage_pv() {
return entrypage_pv;
}
public void setEntrypage_pv(int entrypage_pv) {
this.entrypage_pv = entrypage_pv;
}
public int getExitpage_pv() {
return exitpage_pv;
}
public void setExitpage_pv(int exitpage_pv) {
this.exitpage_pv = exitpage_pv;
}
public int getPage_share_pv() {
return page_share_pv;
}
public void setPage_share_pv(int page_share_pv) {
this.page_share_pv = page_share_pv;
}
public int getPage_share_uv() {
return page_share_uv;
}
public void setPage_share_uv(int page_share_uv) {
this.page_share_uv = page_share_uv;
}
}
package com.yanzuoguang.wxxcx.analysis.portrait;
/**
* 获取小程序新增或活跃用户的画像分布数据 请求
* 时间范围支持昨天、最近7天、最近30天。其中,新增用户数为时间范围内首次访问小程序的去重用户数,活跃用户数为时间范围内访问过小程序的去重用户数
*
* @author 李贤军
*/
public class WxXcxAnalysisGetUserPortraitReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,开始日期与结束日期相差的天数限定为0/6/29,分别表示查询最近1/7/30天数据,允许设置的最大值为昨日。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.portrait;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.analysis.data.WxXcxAnalysisGetPerformanceDataReq;
import com.yanzuoguang.wxxcx.analysis.data.WxXcxAnalysisGetPerformanceDataRes;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取小程序新增或活跃用户的画像分布数据 转换
* 时间范围支持昨天、最近7天、最近30天。其中,新增用户数为时间范围内首次访问小程序的去重用户数,活跃用户数为时间范围内访问过小程序的去重用户数
*
* @author 李贤军
*/
public class WxXcxAnalysisGetUserPortraitRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAnalysisGetUserPortraitReq req;
public WxXcxAnalysisGetUserPortraitRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAnalysisGetUserPortraitReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetUserPortrait() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAnalysisGetUserPortraitRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAnalysisGetUserPortraitRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAnalysisGetUserPortraitRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.analysis.portrait;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 获取小程序新增或活跃用户的画像分布数据 响应
* 时间范围支持昨天、最近7天、最近30天。其中,新增用户数为时间范围内首次访问小程序的去重用户数,活跃用户数为时间范围内访问过小程序的去重用户数。
*
* @author 李贤军
*/
public class WxXcxAnalysisGetUserPortraitRes extends WxXcxResponseBaseError {
/**
* 时间范围,如:"20170611-20170617"
*/
private String ref_date;
/**
* 新用户画像
*/
private WxXcxAnalysisGetUserPortraitVisitUvNewRes visit_uv_new;
/**
* 活跃用户画像
*/
private WxXcxAnalysisGetUserPortraitVisitUvRes visit_uv;
public String getRef_date() {
return ref_date;
}
public void setRef_date(String ref_date) {
this.ref_date = ref_date;
}
public WxXcxAnalysisGetUserPortraitVisitUvNewRes getVisit_uv_new() {
return visit_uv_new;
}
public void setVisit_uv_new(WxXcxAnalysisGetUserPortraitVisitUvNewRes visit_uv_new) {
this.visit_uv_new = visit_uv_new;
}
public WxXcxAnalysisGetUserPortraitVisitUvRes getVisit_uv() {
return visit_uv;
}
public void setVisit_uv(WxXcxAnalysisGetUserPortraitVisitUvRes visit_uv) {
this.visit_uv = visit_uv;
}
}
package com.yanzuoguang.wxxcx.analysis.portrait;
/**
* 获取小程序新增或活跃用户的画像分布数据 新用户画像响应对象
* 时间范围支持昨天、最近7天、最近30天。其中,新增用户数为时间范围内首次访问小程序的去重用户数,活跃用户数为时间范围内访问过小程序的去重用户数。
*
* @author 李贤军
*/
public class WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes {
/**
*属性值id
*/
private int id;
/**
*属性值名称,与 id 对应。如属性为 province 时,返回的属性值名称包括「广东」等。
*/
private String name;
/**
*该场景访问uv
*/
private int access_source_visit_uv;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAccess_source_visit_uv() {
return access_source_visit_uv;
}
public void setAccess_source_visit_uv(int access_source_visit_uv) {
this.access_source_visit_uv = access_source_visit_uv;
}
}
package com.yanzuoguang.wxxcx.analysis.portrait;
/**
* 获取小程序新增或活跃用户的画像分布数据 新用户画像响应
* 时间范围支持昨天、最近7天、最近30天。其中,新增用户数为时间范围内首次访问小程序的去重用户数,活跃用户数为时间范围内访问过小程序的去重用户数。
*
* @author 李贤军
*/
public class WxXcxAnalysisGetUserPortraitVisitUvNewRes {
/**
* 分布类型
*/
private int index;
/**
* 省份,如北京、广东等
*/
private WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes province;
/**
* 城市,如北京、广州等
*/
private WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes city;
/**
* 性别,包括男、女、未知
*/
private WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes genders;
/**
* 终端类型,包括 iPhone,android,其他
*/
private WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes platforms;
/**
* 机型,如苹果 iPhone 6,OPPO R9 等
*/
private WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes devices;
/**
* 年龄,包括17岁以下、18-24岁等区间
*/
private WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes ages;
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes getProvince() {
return province;
}
public void setProvince(WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes province) {
this.province = province;
}
public WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes getCity() {
return city;
}
public void setCity(WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes city) {
this.city = city;
}
public WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes getGenders() {
return genders;
}
public void setGenders(WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes genders) {
this.genders = genders;
}
public WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes getPlatforms() {
return platforms;
}
public void setPlatforms(WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes platforms) {
this.platforms = platforms;
}
public WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes getDevices() {
return devices;
}
public void setDevices(WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes devices) {
this.devices = devices;
}
public WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes getAges() {
return ages;
}
public void setAges(WxXcxAnalysisGetUserPortraitVisitUvNewObjectRes ages) {
this.ages = ages;
}
}
package com.yanzuoguang.wxxcx.analysis.portrait;
/**
* 获取小程序新增或活跃用户的画像分布数据 活跃用户画像响应
* 时间范围支持昨天、最近7天、最近30天。其中,新增用户数为时间范围内首次访问小程序的去重用户数,活跃用户数为时间范围内访问过小程序的去重用户数。
*
* @author 李贤军
*/
public class WxXcxAnalysisGetUserPortraitVisitUvRes extends WxXcxAnalysisGetUserPortraitVisitUvNewRes{
}
package com.yanzuoguang.wxxcx.analysis.retain;
/**
* 获取用户访问小程序日留存 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailyRetainReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,限定查询1天数据,允许设置的最大值为昨日。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.retain;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.auth.user.WxXcxAuthCheckEncryptedDataReq;
import com.yanzuoguang.wxxcx.auth.user.WxXcxAuthCheckEncryptedDataRes;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取用户访问小程序日留存 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailyRetainRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAuthCheckEncryptedDataReq req;
public WxXcxAnalysisGetDailyRetainRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAuthCheckEncryptedDataReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetDailyRetain() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAuthCheckEncryptedDataRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAuthCheckEncryptedDataRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAuthCheckEncryptedDataRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.analysis.retain;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 获取用户访问小程序日留存 响应
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailyRetainRes extends WxXcxResponseBaseError {
/**
* 日期
*/
private String ref_date;
/**
* 新增用户留存
*/
private String visit_uv_new;
/**
* 活跃用户留存
*/
private String visit_uv;
public String getRef_date() {
return ref_date;
}
public void setRef_date(String ref_date) {
this.ref_date = ref_date;
}
public String getVisit_uv_new() {
return visit_uv_new;
}
public void setVisit_uv_new(String visit_uv_new) {
this.visit_uv_new = visit_uv_new;
}
public String getVisit_uv() {
return visit_uv;
}
public void setVisit_uv(String visit_uv) {
this.visit_uv = visit_uv;
}
}
package com.yanzuoguang.wxxcx.analysis.retain;
/**
* 获取用户访问小程序月留存 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetMonthlyRetainReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期,为自然月第一天。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,为自然月最后一天,限定查询一个月数据。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.retain;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.auth.user.WxXcxAuthCheckEncryptedDataReq;
import com.yanzuoguang.wxxcx.auth.user.WxXcxAuthCheckEncryptedDataRes;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取用户访问小程序月留存 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetMonthlyRetainRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAuthCheckEncryptedDataReq req;
public WxXcxAnalysisGetMonthlyRetainRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAuthCheckEncryptedDataReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetMonthlyRetain() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAuthCheckEncryptedDataRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAuthCheckEncryptedDataRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAuthCheckEncryptedDataRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.analysis.retain;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 获取用户访问小程序月留存 响应
*
* @author 李贤军
*/
public class WxXcxAnalysisGetMonthlyRetainRes extends WxXcxResponseBaseError {
/**
* 时间,如:"201702"
*/
private String ref_date;
/**
* 新增用户留存
*/
private String visit_uv_new;
/**
* 活跃用户留存
*/
private String visit_uv;
public String getRef_date() {
return ref_date;
}
public void setRef_date(String ref_date) {
this.ref_date = ref_date;
}
public String getVisit_uv_new() {
return visit_uv_new;
}
public void setVisit_uv_new(String visit_uv_new) {
this.visit_uv_new = visit_uv_new;
}
public String getVisit_uv() {
return visit_uv;
}
public void setVisit_uv(String visit_uv) {
this.visit_uv = visit_uv;
}
}
package com.yanzuoguang.wxxcx.analysis.retain;
/**
* 获取用户访问小程序周留存 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetWeeklyRetainReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期,为周一日期。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,为周日日期,限定查询一周数据。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.retain;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.auth.user.WxXcxAuthCheckEncryptedDataReq;
import com.yanzuoguang.wxxcx.auth.user.WxXcxAuthCheckEncryptedDataRes;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取用户访问小程序周留存 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetWeeklyRetainRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAuthCheckEncryptedDataReq req;
public WxXcxAnalysisGetWeeklyRetainRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAuthCheckEncryptedDataReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetWeeklyRetain() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAuthCheckEncryptedDataRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAuthCheckEncryptedDataRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAuthCheckEncryptedDataRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.analysis.retain;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 获取用户访问小程序周留存 响应
*
* @author 李贤军
*/
public class WxXcxAnalysisGetWeeklyRetainRes extends WxXcxResponseBaseError {
/**
* 时间,如:"20170306-20170312"
*/
private String ref_date;
/**
* 新增用户留存
*/
private String visit_uv_new;
/**
* 活跃用户留存
*/
private String visit_uv;
public String getRef_date() {
return ref_date;
}
public void setRef_date(String ref_date) {
this.ref_date = ref_date;
}
public String getVisit_uv_new() {
return visit_uv_new;
}
public void setVisit_uv_new(String visit_uv_new) {
this.visit_uv_new = visit_uv_new;
}
public String getVisit_uv() {
return visit_uv;
}
public void setVisit_uv(String visit_uv) {
this.visit_uv = visit_uv;
}
}
package com.yanzuoguang.wxxcx.analysis.summary;
/**
* 获取用户访问小程序数据概况 响应项
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailySummaryItemRes {
/**
* 日期,格式为 yyyymmdd
*/
private String refDate;
/**
* 累计用户数
*/
private int visitTotal;
/**
* 转发次数
*/
private int sharePv;
/**
* 转发人数
*/
private int shareUv;
public String getRefDate() {
return refDate;
}
public void setRefDate(String refDate) {
this.refDate = refDate;
}
public int getVisitTotal() {
return visitTotal;
}
public void setVisitTotal(int visitTotal) {
this.visitTotal = visitTotal;
}
public int getSharePv() {
return sharePv;
}
public void setSharePv(int sharePv) {
this.sharePv = sharePv;
}
public int getShareUv() {
return shareUv;
}
public void setShareUv(int shareUv) {
this.shareUv = shareUv;
}
}
package com.yanzuoguang.wxxcx.analysis.summary;
/**
* 获取用户访问小程序数据概况 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailySummaryReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,限定查询1天数据,允许设置的最大值为昨日。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.summary;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.auth.user.WxXcxAuthCheckEncryptedDataReq;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取用户访问小程序数据概况 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailySummaryRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAuthCheckEncryptedDataReq req;
public WxXcxAnalysisGetDailySummaryRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAuthCheckEncryptedDataReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetDailySummary() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAnalysisGetDailySummaryRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAnalysisGetDailySummaryRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAnalysisGetDailySummaryRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.analysis.summary;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
import java.util.List;
/**
* 获取用户访问小程序数据概况 响应列表
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailySummaryRes extends WxXcxResponseBaseError {
/**
* 获取用户访问小程序数据概况 响应项
*/
private List<WxXcxAnalysisGetDailySummaryItemRes> wxXcxAnalysisGetDailySummaryItemRes;
public List<WxXcxAnalysisGetDailySummaryItemRes> getWxXcxAnalysisGetDailySummaryItemRes() {
return wxXcxAnalysisGetDailySummaryItemRes;
}
public void setWxXcxAnalysisGetDailySummaryItemRes(List<WxXcxAnalysisGetDailySummaryItemRes> wxXcxAnalysisGetDailySummaryItemRes) {
this.wxXcxAnalysisGetDailySummaryItemRes = wxXcxAnalysisGetDailySummaryItemRes;
}
}
package com.yanzuoguang.wxxcx.analysis.trend;
/**
* 获取用户访问小程序数据日趋势 响应项
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailyVisitTrendItemRes {
/**
* 日期,格式为 yyyymmdd
*/
private String ref_date;
/**
* 打开次数
*/
private int session_cnt;
/**
* 访问次数
*/
private int visit_pv;
/**
* 访问人数
*/
private int visit_uv;
/**
* 新用户数
*/
private double visit_uv_new;
/**
* 人均停留时长 (浮点型,单位:秒)
*/
private double stay_time_uv;
/**
* 次均停留时长 (浮点型,单位:秒)
*/
private double stay_time_session;
/**
* 平均访问深度 (浮点型)
*/
private double visit_depth;
public String getRef_date() {
return ref_date;
}
public void setRef_date(String ref_date) {
this.ref_date = ref_date;
}
public int getSession_cnt() {
return session_cnt;
}
public void setSession_cnt(int session_cnt) {
this.session_cnt = session_cnt;
}
public int getVisit_pv() {
return visit_pv;
}
public void setVisit_pv(int visit_pv) {
this.visit_pv = visit_pv;
}
public int getVisit_uv() {
return visit_uv;
}
public void setVisit_uv(int visit_uv) {
this.visit_uv = visit_uv;
}
public double getVisit_uv_new() {
return visit_uv_new;
}
public void setVisit_uv_new(double visit_uv_new) {
this.visit_uv_new = visit_uv_new;
}
public double getStay_time_uv() {
return stay_time_uv;
}
public void setStay_time_uv(double stay_time_uv) {
this.stay_time_uv = stay_time_uv;
}
public double getStay_time_session() {
return stay_time_session;
}
public void setStay_time_session(double stay_time_session) {
this.stay_time_session = stay_time_session;
}
public double getVisit_depth() {
return visit_depth;
}
public void setVisit_depth(double visit_depth) {
this.visit_depth = visit_depth;
}
}
package com.yanzuoguang.wxxcx.analysis.trend;
/**
* 获取用户访问小程序数据日趋势 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailyVisitTrendReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,限定查询1天数据,允许设置的最大值为昨日。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.trend;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取用户访问小程序数据日趋势 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailyVisitTrendRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAnalysisGetDailyVisitTrendReq req;
public WxXcxAnalysisGetDailyVisitTrendRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAnalysisGetDailyVisitTrendReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetDailyVisitTrend() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAnalysisGetDailyVisitTrendRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAnalysisGetDailyVisitTrendRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAnalysisGetDailyVisitTrendRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.analysis.trend;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
import java.util.List;
/**
* 获取用户访问小程序数据日趋势 响应列表
*
* @author 李贤军
*/
public class WxXcxAnalysisGetDailyVisitTrendRes extends WxXcxResponseBaseError {
private List<WxXcxAnalysisGetDailyVisitTrendItemRes> wxXcxAnalysisGetDailyVisitTrendItemRes;
public List<WxXcxAnalysisGetDailyVisitTrendItemRes> getWxXcxAnalysisGetDailyVisitTrendItemRes() {
return wxXcxAnalysisGetDailyVisitTrendItemRes;
}
public void setWxXcxAnalysisGetDailyVisitTrendItemRes(List<WxXcxAnalysisGetDailyVisitTrendItemRes> wxXcxAnalysisGetDailyVisitTrendItemRes) {
this.wxXcxAnalysisGetDailyVisitTrendItemRes = wxXcxAnalysisGetDailyVisitTrendItemRes;
}
}
package com.yanzuoguang.wxxcx.analysis.trend;
/**
* 获取用户访问小程序数据月趋势(能查询到的最新数据为上一个自然月的数据) 响应项
*
* @author 李贤军
*/
public class WxXcxAnalysisGetMonthlyVisitTrendItemRes {
/**
* 时间,格式为 yyyymm,如:"201702"
*/
private String ref_date;
/**
* 打开次数(自然月内汇总)
*/
private int session_cnt;
/**
* 访问次数(自然月内汇总)
*/
private int visit_pv;
/**
* 访问人数(自然月内去重)
*/
private int visit_uv;
/**
* 新用户数(自然月内去重)
*/
private int visit_uv_new;
/**
* 人均停留时长 (浮点型,单位:秒)
*/
private double stay_time_uv;
/**
* 次均停留时长 (浮点型,单位:秒)
*/
private double stay_time_session;
/**
* 平均访问深度 (浮点型)
*/
private double visit_depth;
public String getRef_date() {
return ref_date;
}
public void setRef_date(String ref_date) {
this.ref_date = ref_date;
}
public int getSession_cnt() {
return session_cnt;
}
public void setSession_cnt(int session_cnt) {
this.session_cnt = session_cnt;
}
public int getVisit_pv() {
return visit_pv;
}
public void setVisit_pv(int visit_pv) {
this.visit_pv = visit_pv;
}
public int getVisit_uv() {
return visit_uv;
}
public void setVisit_uv(int visit_uv) {
this.visit_uv = visit_uv;
}
public int getVisit_uv_new() {
return visit_uv_new;
}
public void setVisit_uv_new(int visit_uv_new) {
this.visit_uv_new = visit_uv_new;
}
public double getStay_time_uv() {
return stay_time_uv;
}
public void setStay_time_uv(double stay_time_uv) {
this.stay_time_uv = stay_time_uv;
}
public double getStay_time_session() {
return stay_time_session;
}
public void setStay_time_session(double stay_time_session) {
this.stay_time_session = stay_time_session;
}
public double getVisit_depth() {
return visit_depth;
}
public void setVisit_depth(double visit_depth) {
this.visit_depth = visit_depth;
}
}
package com.yanzuoguang.wxxcx.analysis.trend;
/**
* 获取用户访问小程序数据月趋势(能查询到的最新数据为上一个自然月的数据) 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetMonthlyVisitTrendReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 开始日期,为自然月第一天。格式为 yyyymmdd
*/
private String begin_date;
/**
* 结束日期,为自然月最后一天,限定查询一个月的数据。格式为 yyyymmdd
*/
private String end_date;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getBegin_date() {
return begin_date;
}
public void setBegin_date(String begin_date) {
this.begin_date = begin_date;
}
public String getEnd_date() {
return end_date;
}
public void setEnd_date(String end_date) {
this.end_date = end_date;
}
}
package com.yanzuoguang.wxxcx.analysis.trend;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取用户访问小程序数据月趋势(能查询到的最新数据为上一个自然月的数据) 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetMonthlyVisitTrendRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAnalysisGetMonthlyVisitTrendReq req;
public WxXcxAnalysisGetMonthlyVisitTrendRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAnalysisGetMonthlyVisitTrendReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetMonthlyVisitTrend() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAnalysisGetMonthlyVisitTrendRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAnalysisGetMonthlyVisitTrendRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAnalysisGetMonthlyVisitTrendRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.analysis.trend;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
import java.util.List;
/**
* 获取用户访问小程序数据月趋势(能查询到的最新数据为上一个自然月的数据) 响应列表
*
* @author 李贤军
*/
public class WxXcxAnalysisGetMonthlyVisitTrendRes extends WxXcxResponseBaseError {
private List<WxXcxAnalysisGetMonthlyVisitTrendItemRes> wxXcxAnalysisGetMonthlyVisitTrendItemRes;
public List<WxXcxAnalysisGetMonthlyVisitTrendItemRes> getWxXcxAnalysisGetMonthlyVisitTrendItemRes() {
return wxXcxAnalysisGetMonthlyVisitTrendItemRes;
}
public void setWxXcxAnalysisGetMonthlyVisitTrendItemRes(List<WxXcxAnalysisGetMonthlyVisitTrendItemRes> wxXcxAnalysisGetMonthlyVisitTrendItemRes) {
this.wxXcxAnalysisGetMonthlyVisitTrendItemRes = wxXcxAnalysisGetMonthlyVisitTrendItemRes;
}
}
package com.yanzuoguang.wxxcx.analysis.trend;
import java.io.Serializable;
/**
* 获取用户访问小程序数据周趋势 响应项
*
* @author 李贤军
*/
public class WxXcxAnalysisGetWeeklyVisitTrendItemRes implements Serializable {
/**
* 时间,格式为 yyyymmdd-yyyymmdd,如:"20170306-20170312"
*/
private String ref_date;
/**
* 打开次数(自然周内汇总)
*/
private int session_cnt;
/**
* 访问次数(自然周内汇总)
*/
private int visit_pv;
/**
* 访问人数(自然周内去重)
*/
private int visit_uv;
/**
* 新用户数(自然周内去重)
*/
private int visit_uv_new;
/**
* 人均停留时长 (浮点型,单位:秒)
*/
private double stay_time_uv;
/**
* 次均停留时长 (浮点型,单位:秒)
*/
private double stay_time_session;
/**
* 平均访问深度 (浮点型)
*/
private double visit_depth;
public String getRef_date() {
return ref_date;
}
public void setRef_date(String ref_date) {
this.ref_date = ref_date;
}
public int getSession_cnt() {
return session_cnt;
}
public void setSession_cnt(int session_cnt) {
this.session_cnt = session_cnt;
}
public int getVisit_pv() {
return visit_pv;
}
public void setVisit_pv(int visit_pv) {
this.visit_pv = visit_pv;
}
public int getVisit_uv() {
return visit_uv;
}
public void setVisit_uv(int visit_uv) {
this.visit_uv = visit_uv;
}
public int getVisit_uv_new() {
return visit_uv_new;
}
public void setVisit_uv_new(int visit_uv_new) {
this.visit_uv_new = visit_uv_new;
}
public double getStay_time_uv() {
return stay_time_uv;
}
public void setStay_time_uv(double stay_time_uv) {
this.stay_time_uv = stay_time_uv;
}
public double getStay_time_session() {
return stay_time_session;
}
public void setStay_time_session(double stay_time_session) {
this.stay_time_session = stay_time_session;
}
public double getVisit_depth() {
return visit_depth;
}
public void setVisit_depth(double visit_depth) {
this.visit_depth = visit_depth;
}
}
package com.yanzuoguang.wxxcx.analysis.trend;
/**
* 获取用户访问小程序数据周趋势 请求
*
* @author 李贤军
*/
public class WxXcxAnalysisGetWeeklyVisitTrendReq {
}
package com.yanzuoguang.wxxcx.analysis.trend;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取用户访问小程序数据周趋势 转换
*
* @author 李贤军
*/
public class WxXcxAnalysisGetWeeklyVisitTrendRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAnalysisGetWeeklyVisitTrendReq req;
public WxXcxAnalysisGetWeeklyVisitTrendRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAnalysisGetWeeklyVisitTrendReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAnalysisGetWeeklyVisitTrend() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxAnalysisGetWeeklyVisitTrendRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAnalysisGetWeeklyVisitTrendRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAnalysisGetWeeklyVisitTrendRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.analysis.trend;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
import java.util.List;
/**
* 获取用户访问小程序数据周趋势 响应列表
*
* @author 李贤军
*/
public class WxXcxAnalysisGetWeeklyVisitTrendRes extends WxXcxResponseBaseError {
private List<WxXcxAnalysisGetWeeklyVisitTrendItemRes> wxXcxAnalysisGetWeeklyVisitTrendItemRes;
public List<WxXcxAnalysisGetWeeklyVisitTrendItemRes> getWxXcxAnalysisGetWeeklyVisitTrendItemRes() {
return wxXcxAnalysisGetWeeklyVisitTrendItemRes;
}
public void setWxXcxAnalysisGetWeeklyVisitTrendItemRes(List<WxXcxAnalysisGetWeeklyVisitTrendItemRes> wxXcxAnalysisGetWeeklyVisitTrendItemRes) {
this.wxXcxAnalysisGetWeeklyVisitTrendItemRes = wxXcxAnalysisGetWeeklyVisitTrendItemRes;
}
}
package com.yanzuoguang.wxxcx.auth.login; package com.yanzuoguang.wxxcx.auth.login;
/**
* 登录凭证校验
*
* @author 李贤军
*/
public class WxXcxAuthCode2SessionReq { public class WxXcxAuthCode2SessionReq {
/**
* 小程序 appId
*/
private String appid;
/**
* 小程序 appSecret
*/
private String secret;
/**
* 登录时获取的 code
*/
private String js_code;
/**
* 授权类型,此处只需填写 authorization_code
*/
private String grant_type;
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
public String getJs_code() {
return js_code;
}
public void setJs_code(String js_code) {
this.js_code = js_code;
}
public String getGrant_type() {
return grant_type;
}
public void setGrant_type(String grant_type) {
this.grant_type = grant_type;
}
} }
...@@ -6,7 +6,7 @@ import com.yanzuoguang.util.helper.JsonHelper; ...@@ -6,7 +6,7 @@ import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*; import com.yanzuoguang.wxxcx.base.*;
/** /**
* 登录凭证校验。通过 wx.login 接口获得临时登录凭证 code 后传到开发者服务器调用此接口完成登录流程。更多使用方法详见 小程序登录。 * 登录凭证校验参数转换
* *
* @author 颜佐光 * @author 颜佐光
*/ */
......
...@@ -2,5 +2,46 @@ package com.yanzuoguang.wxxcx.auth.login; ...@@ -2,5 +2,46 @@ package com.yanzuoguang.wxxcx.auth.login;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError; import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 登录凭证校验响应
*
* @author 李贤军
*/
public class WxXcxResponseAuthCode2SessionRes extends WxXcxResponseBaseError { public class WxXcxResponseAuthCode2SessionRes extends WxXcxResponseBaseError {
/**
* 用户唯一标识
*/
private String openid;
/**
* 会话密钥
*/
private String session_key;
/**
* 用户在开放平台的唯一标识符,若当前小程序已绑定到微信开放平台帐号下会返回,详见 UnionID 机制说明。
*/
private String unionid;
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
public String getSession_key() {
return session_key;
}
public void setSession_key(String session_key) {
this.session_key = session_key;
}
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid;
}
} }
package com.yanzuoguang.wxxcx.auth.user;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
public class WxAuthCheckEncryptedDataRes extends WxXcxResponseBaseError {
}
package com.yanzuoguang.wxxcx.auth.user; package com.yanzuoguang.wxxcx.auth.user;
import com.yanzuoguang.wxxcx.base.WxXcxAssert; /**
* 检查加密信息是否由微信生成 请求
public class WxAuthCheckEncryptedDataReq { *
* @@author 李贤军
*/
public class WxXcxAuthCheckEncryptedDataReq {
/**
* 加密数据的sha256,通过Hex(Base16)编码后的字符串
*/
private String encrypted_msg_hash; private String encrypted_msg_hash;
public String getEncrypted_msg_hash() { public String getEncrypted_msg_hash() {
......
...@@ -6,17 +6,18 @@ import com.yanzuoguang.util.helper.JsonHelper; ...@@ -6,17 +6,18 @@ import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*; import com.yanzuoguang.wxxcx.base.*;
/** /**
* 检查加密信息是否由微信生成(当前只支持手机号加密数据),只能检测最近3天生成的加密数据 * 检查加密信息是否由微信生成 转换
*
* @author 颜佐光 * @author 颜佐光
*/ */
public class WxAuthCheckEncryptedDataRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData { public class WxXcxAuthCheckEncryptedDataRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig; private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest; private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken; private final WxXcxAccessToken accessToken;
private final WxAuthCheckEncryptedDataReq req; private final WxXcxAuthCheckEncryptedDataReq req;
public WxAuthCheckEncryptedDataRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxAuthCheckEncryptedDataReq req) { public WxXcxAuthCheckEncryptedDataRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAuthCheckEncryptedDataReq req) {
this.wxXcxConfig = wxXcxConfig; this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest; this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken; this.accessToken = accessToken;
...@@ -38,11 +39,11 @@ public class WxAuthCheckEncryptedDataRequest implements WxXwxRequestUrl, WxXcxRe ...@@ -38,11 +39,11 @@ public class WxAuthCheckEncryptedDataRequest implements WxXwxRequestUrl, WxXcxRe
return HttpHelper.getUrlParameter(req); return HttpHelper.getUrlParameter(req);
} }
public WxAuthCheckEncryptedDataRes getResponse() { public WxXcxAuthCheckEncryptedDataRes getResponse() {
// todo: 检测参数是否合法 // todo: 检测参数是否合法
// Assert.assertEquals(); // Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> { return this.wxXcxRequest.request(this, response -> {
WxAuthCheckEncryptedDataRes ret = JsonHelper.deserialize(response, new TypeReference<WxAuthCheckEncryptedDataRes>() { WxXcxAuthCheckEncryptedDataRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAuthCheckEncryptedDataRes>() {
}); });
WxXcxAssert.assertBaseError(ret); WxXcxAssert.assertBaseError(ret);
return ret; return ret;
......
package com.yanzuoguang.wxxcx.auth.user;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 检查加密信息是否由微信生成 请求响应
*
* @author 李贤军
*/
public class WxXcxAuthCheckEncryptedDataRes extends WxXcxResponseBaseError {
/**
* 用户唯一标识
*/
private String vaild;
/**
* 用户唯一标识
*/
private double create_time;
public String getVaild() {
return vaild;
}
public void setVaild(String vaild) {
this.vaild = vaild;
}
public double getCreate_time() {
return create_time;
}
public void setCreate_time(double create_time) {
this.create_time = create_time;
}
}
package com.yanzuoguang.wxxcx.auth.user;
/**
* 获取小程序全局唯一后台接口调用凭据 请求
*
* @author 李贤军
*/
public class WxXcxAuthGetAccessTokenReq {
/**
* 填写 client_credential
*/
private String grant_type;
/**
* 小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
*/
private String appid;
/**
* 小程序唯一凭证密钥,即 AppSecret,获取方式同 appid
*/
private String secret;
public String getGrant_type() {
return grant_type;
}
public void setGrant_type(String grant_type) {
this.grant_type = grant_type;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
}
package com.yanzuoguang.wxxcx.auth.user;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.auth.login.WxXcxAuthCode2SessionReq;
import com.yanzuoguang.wxxcx.auth.login.WxXcxResponseAuthCode2SessionRes;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取小程序全局唯一后台接口调用凭据 转换
*
* @author 李贤军
*/
public class WxXcxAuthGetAccessTokenRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAuthCode2SessionReq req;
public WxXcxAuthGetAccessTokenRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAuthCode2SessionReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAuthGetAccessToken() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxResponseAuthCode2SessionRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxResponseAuthCode2SessionRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxResponseAuthCode2SessionRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.auth.user;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 获取小程序全局唯一后台接口调用凭据 响应
*
* @author 李贤军
*/
public class WxXcxAuthGetAccessTokenRes extends WxXcxResponseBaseError {
/**
* access_token
*/
private String access_token;
/**
* 凭证有效时间,单位:秒。目前是7200秒之内的值。
*/
private double expires_in;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public double getExpires_in() {
return expires_in;
}
public void setExpires_in(double expires_in) {
this.expires_in = expires_in;
}
}
package com.yanzuoguang.wxxcx.auth.user;
/**
* 用户支付完成后,获取该用户的 UnionId 请求
* 注意:调用前需要用户完成支付,且在支付后的五分钟内有效。
*
* @author 李贤军
*/
public class WxXcxAuthGetPaidUnionIdReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 支付用户唯一标识
*/
private String openid;
/**
* 微信支付订单号
*/
private String transaction_id;
/**
* 微信支付分配的商户号,和商户订单号配合使用
*/
private String mch_id;
/**
* 微信支付商户订单号,和商户号配合使用
*/
private String out_trade_no;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getOpenid() {
return openid;
}
public void setOpenid(String openid) {
this.openid = openid;
}
public String getTransaction_id() {
return transaction_id;
}
public void setTransaction_id(String transaction_id) {
this.transaction_id = transaction_id;
}
public String getMch_id() {
return mch_id;
}
public void setMch_id(String mch_id) {
this.mch_id = mch_id;
}
public String getOut_trade_no() {
return out_trade_no;
}
public void setOut_trade_no(String out_trade_no) {
this.out_trade_no = out_trade_no;
}
}
package com.yanzuoguang.wxxcx.auth.user;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 用户支付完成后,获取该用户的 UnionId 转换
* 注意:调用前需要用户完成支付,且在支付后的五分钟内有效。
*
* @author 李贤军
*/
public class WxXcxAuthGetPaidUnionIdRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAuthCheckEncryptedDataReq req;
public WxXcxAuthGetPaidUnionIdRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAuthCheckEncryptedDataReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAuthGetPaidUnionId() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
public WxXcxAuthCheckEncryptedDataRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxAuthCheckEncryptedDataRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxAuthCheckEncryptedDataRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.auth.user;
/**
* 用户支付完成后,获取该用户的 UnionId 响应
* 注意:调用前需要用户完成支付,且在支付后的五分钟内有效。
*
* @author 李贤军
*/
public class WxXcxAuthGetPaidUnionIdRes {
/**
* 用户唯一标识,调用成功后返回
*/
private String unionid;
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid;
}
}
package com.yanzuoguang.wxxcx.auth.user;
/**
* 通过 wx.pluginLogin 接口获得插件用户标志凭证 code 后传到开发者服务器 请求
*
* @author 李贤军
*/
public class WxXcxAuthGetPluginOpenPidReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 通过 wx.pluginLogin 获得的插件用户标志凭证 code,有效时间为5分钟,一个 code 只能获取一次 openpid
*/
private String code;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
package com.yanzuoguang.wxxcx.auth.user;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.auth.login.WxXcxAuthCode2SessionReq;
import com.yanzuoguang.wxxcx.auth.login.WxXcxResponseAuthCode2SessionRes;
import com.yanzuoguang.wxxcx.base.*;
/**
* 通过 wx.pluginLogin 接口获得插件用户标志凭证 code 后传到开发者服务器 转换
*
* @author 李贤军
*/
public class WxXcxAuthGetPluginOpenPidRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAuthCode2SessionReq req;
public WxXcxAuthGetPluginOpenPidRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAuthCode2SessionReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getAuthGetPluginOpenPId() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxResponseAuthCode2SessionRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxResponseAuthCode2SessionRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxResponseAuthCode2SessionRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.auth.user;
/**
* 通过 wx.pluginLogin 接口获得插件用户标志凭证 code 后传到开发者服务器 响应
*
* @author 李贤军
*/
public class WxXcxAuthGetPluginOpenPidRes {
/**
* 插件用户的唯一标识
*/
private String openpid;
public String getOpenpid() {
return openpid;
}
public void setOpenpid(String openpid) {
this.openpid = openpid;
}
}
package com.yanzuoguang.wxxcx.customer.gettempmedia;
/**
* 获取客服消息内的临时素材 请求
* 即下载临时的多媒体文件。目前小程序仅支持下载图片文件
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageGetTempMediaReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 媒体文件 ID
*/
private String media_id;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getMedia_id() {
return media_id;
}
public void setMedia_id(String media_id) {
this.media_id = media_id;
}
}
package com.yanzuoguang.wxxcx.customer.gettempmedia;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.auth.login.WxXcxAuthCode2SessionReq;
import com.yanzuoguang.wxxcx.auth.login.WxXcxResponseAuthCode2SessionRes;
import com.yanzuoguang.wxxcx.base.*;
/**
* 获取客服消息内的临时素材 转换
* 即下载临时的多媒体文件。目前小程序仅支持下载图片文件
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageGetTempMediaRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxCustomerServiceMessageGetTempMediaReq req;
public WxXcxCustomerServiceMessageGetTempMediaRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxCustomerServiceMessageGetTempMediaReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getCustomerServiceMessageGetTempMedia() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxCustomerServiceMessageGetTempMediaRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxCustomerServiceMessageGetTempMediaRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxCustomerServiceMessageGetTempMediaRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.customer.gettempmedia;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
import java.nio.Buffer;
/**
* 获取客服消息内的临时素材 响应
* 即下载临时的多媒体文件。目前小程序仅支持下载图片文件
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageGetTempMediaRes extends WxXcxResponseBaseError {
/**
* 数据类型 (MIME Type)
*/
private String contentType;
/**
* 数据 Buffer
*/
private Buffer buffer;
public String getContentType() {
return contentType;
}
public void setContentType(String contentType) {
this.contentType = contentType;
}
public Buffer getBuffer() {
return buffer;
}
public void setBuffer(Buffer buffer) {
this.buffer = buffer;
}
}
package com.yanzuoguang.wxxcx.customer.send;
/**
* 发送客服消息给用户 请求图片消息内容
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSendImageReq {
/**
* 发送的图片的媒体ID,通过 新增素材接口 上传图片文件获得
*/
private String media_id;
public String getMedia_id() {
return media_id;
}
public void setMedia_id(String media_id) {
this.media_id = media_id;
}
}
package com.yanzuoguang.wxxcx.customer.send;
/**
* 发送客服消息给用户 请求图文链接消息内容
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSendLinkReq {
/**
* 消息标题
*/
private String title;
/**
* 图文链接消息
*/
private String description;
/**
* 图文链接消息被点击后跳转的链接
*/
private String url;
/**
* 图文链接消息的图片链接,支持 JPG、PNG 格式,较好的效果为大图 640 X 320,小图 80 X 80
*/
private String thumbUrl;
}
package com.yanzuoguang.wxxcx.customer.send;
/**
* 发送客服消息给用户 请求小程序卡片内容
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSendMiniProgramPageReq {
/**
* 消息标题
*/
private String title;
/**
* 小程序的页面路径,跟 app.json 对齐,支持参数,比如pages/index/index?foo=bar
*/
private String pagepath;
/**
* 小程序消息卡片的封面, image 类型的 media_id,通过 新增素材接口 上传图片文件获得,建议大小为 520*416
*/
private String thumbMediaId;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getPagepath() {
return pagepath;
}
public void setPagepath(String pagepath) {
this.pagepath = pagepath;
}
public String getThumbMediaId() {
return thumbMediaId;
}
public void setThumbMediaId(String thumbMediaId) {
this.thumbMediaId = thumbMediaId;
}
}
package com.yanzuoguang.wxxcx.customer.send;
/**
* 发送客服消息给用户 请求
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSendReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 用户的 OpenID
*/
private String touser;
/**
* 消息类型
* text 文本消息
* image 图片消息
* link 图文链接
* miniprogrampage 小程序卡片
*/
private String msgtype;
/**
* 文本消息,msgtype="text" 时必填
*/
private WxXcxCustomerServiceMessageSendTextReq text;
/**
* 图片消息,msgtype="image" 时必填
*/
private WxXcxCustomerServiceMessageSendImageReq image;
/**
* 图文链接,msgtype="link" 时必填
*/
private WxXcxCustomerServiceMessageSendLinkReq link;
/**
* 小程序卡片,msgtype="miniprogrampage" 时必填
*/
private WxXcxCustomerServiceMessageSendMiniProgramPageReq miniprogrampage;
}
package com.yanzuoguang.wxxcx.customer.send;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.analysis.distribution.WxXcxAnalysisGetVisitDistributionReq;
import com.yanzuoguang.wxxcx.base.*;
/**
* 发送客服消息给用户 转换
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSendRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxAnalysisGetVisitDistributionReq req;
public WxXcxCustomerServiceMessageSendRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxAnalysisGetVisitDistributionReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getCustomerServiceMessageSend() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxCustomerServiceMessageSendRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxCustomerServiceMessageSendRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxCustomerServiceMessageSendRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.customer.send;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 发送客服消息给用户 响应
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSendRes extends WxXcxResponseBaseError {
}
package com.yanzuoguang.wxxcx.customer.send;
/**
* 发送客服消息给用户 请求文本消息内容
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSendTextReq {
/**
* 文本消息内容
*/
private String content;
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
}
package com.yanzuoguang.wxxcx.customer.settyping;
/**
* 下发客服当前输入状态给用户 请求
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSetTypingReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 用户的 OpenID
*/
private String touser;
/**
* 命令
* Typing 对用户下发"正在输入"状态
* CancelTyping 取消对用户的"正在输入"状态
*/
private String command;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getTouser() {
return touser;
}
public void setTouser(String touser) {
this.touser = touser;
}
public String getCommand() {
return command;
}
public void setCommand(String command) {
this.command = command;
}
}
package com.yanzuoguang.wxxcx.customer.settyping;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.analysis.distribution.WxXcxAnalysisGetVisitDistributionReq;
import com.yanzuoguang.wxxcx.base.*;
import com.yanzuoguang.wxxcx.customer.send.WxXcxCustomerServiceMessageSendRes;
/**
* 下发客服当前输入状态给用户 转换
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSetTypingRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxCustomerServiceMessageSetTypingReq req;
public WxXcxCustomerServiceMessageSetTypingRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxCustomerServiceMessageSetTypingReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getCustomerServiceMessageSetTyping() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxCustomerServiceMessageSetTypingRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxCustomerServiceMessageSetTypingRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxCustomerServiceMessageSetTypingRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.customer.settyping;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 下发客服当前输入状态给用户 响应
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageSetTypingRes extends WxXcxResponseBaseError {
}
package com.yanzuoguang.wxxcx.customer.uploadtempmedia;
/**
* 把媒体文件上传到微信服务器 请求
* 目前仅支持图片。用于发送客服消息或被动回复用户消息。
*
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageUploadTempMediaReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 文件类型
* image 图片
*/
private String type;
/**
* form-data 中媒体文件标识,有filename、filelength、content-type等信息
*/
private String media;
}
package com.yanzuoguang.wxxcx.customer.uploadtempmedia;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
import com.yanzuoguang.wxxcx.customer.settyping.WxXcxCustomerServiceMessageSetTypingReq;
import com.yanzuoguang.wxxcx.customer.settyping.WxXcxCustomerServiceMessageSetTypingRes;
/**
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageUploadTempMediaRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxCustomerServiceMessageUploadTempMediaReq req;
public WxXcxCustomerServiceMessageUploadTempMediaRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxCustomerServiceMessageUploadTempMediaReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getCustomerServiceMessageUploadTempMedia() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxCustomerServiceMessageUploadTempMediaRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxCustomerServiceMessageUploadTempMediaRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxCustomerServiceMessageUploadTempMediaRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.customer.uploadtempmedia;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* @author 李贤军
*/
public class WxXcxCustomerServiceMessageUploadTempMediaRes extends WxXcxResponseBaseError {
/**
* 文件类型
*/
private String type;
/**
* 媒体文件上传后,获取标识,3天内有效。
*/
private String media_id;
/**
* 媒体文件上传时间戳
*/
private double created_at;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getMedia_id() {
return media_id;
}
public void setMedia_id(String media_id) {
this.media_id = media_id;
}
public double getCreated_at() {
return created_at;
}
public void setCreated_at(double created_at) {
this.created_at = created_at;
}
}
package com.yanzuoguang.wxxcx.nearbypoi;
/**
* @author 李贤军
*/
public class WxXcxNearbyPoiAddReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 必填,写死为"1"
*/
private String is_comm_nearby;
/**
* 门店图片,最多9张,最少1张,上传门店图片如门店外景、环境设施、商品服务等,图片将展示在微信客户端的门店页。图片链接通过文档https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1444738729中的《上传图文消息内的图片获取URL》接口获取。必填,文件格式为bmp、png、jpeg、jpg或gif,大小不超过5M pic_list是字符串,内容是一个json
*/
private String pic_list;
/**
* 必服务标签列表 必填,需要填写
* 1、 服务标签ID
* 2、 服务类型tpye
* 3、 服务名称name
* 详细字段格式见下方《服务标签 id 编号、类型与服务名称表》
* 4、 APPID
* 5、 对应服务落地页的 path 路径:path路径页面要与对应的服务标签一致,例如选取外卖服务,path路径应该是小程序的外卖对应的那个页面,path路径获取咨询开发或者到小程序管理后台 - 工具 - 生成小程序码页面获取
* 6、新增服务描述desc:描述服务内容,例如满减、折扣等优惠信息或新品、爆品等商品信息,仅标准服务都可添加,10个字符以内。
* service_infos是字符串,内容是一个json
*/
private String service_infos;
/**
* 客服信息 选填,可自定义服务头像与昵称,具体填写字段见下方示例kf_info pic_list是字符串,内容是一个json
*/
private String kf_info;
/**
* 门店名字 必填,门店名称需按照所选地理位置自动拉取腾讯地图门店名称,不可修改,如需修改请重现选择地图地点或重新创建地点。
*/
private String store_name;
/**
* 营业时间,格式11:11-12:12 必填
*/
private String hour;
/**
* 地址 必填
*/
private String address;
/**
* 如果创建新的门店,poi_id字段为空 如果更新门店,poi_id参数则填对应门店的poi_id 选填
*/
private String poi_id;
/**
* 主体名字 必填
*/
private String company_name;
/**
* 门店电话 必填
*/
private String contract_phone;
/**
* 资质号 必填, 15位营业执照注册号或9位组织机构代码
*/
private String credential;
/**
* 证明材料 必填 如果company_name和该小程序主体不一致,需要填qualification_list,详细规则见附近的小程序使用指南 - 如何证明门店的经营主体跟公众号或小程序帐号主体相关http://kf.qq.com/faq/170401MbUnim17040122m2qY.html
*/
private String qualification_list;
/**
* 对应《在腾讯地图中搜索门店》中的sosomap_poi_uid字段 腾讯地图那边有些数据不一致,如果不填map_poi_id的话,小概率会提交失败!
* 注:
* poi_id与map_poi_id关系:
* map_poi_id是腾讯地图对于 poi 的唯一标识
* poi_id是门店进驻附近后的门店唯一标识
*/
private String map_poi_id;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getIs_comm_nearby() {
return is_comm_nearby;
}
public void setIs_comm_nearby(String is_comm_nearby) {
this.is_comm_nearby = is_comm_nearby;
}
public String getPic_list() {
return pic_list;
}
public void setPic_list(String pic_list) {
this.pic_list = pic_list;
}
public String getService_infos() {
return service_infos;
}
public void setService_infos(String service_infos) {
this.service_infos = service_infos;
}
public String getKf_info() {
return kf_info;
}
public void setKf_info(String kf_info) {
this.kf_info = kf_info;
}
public String getStore_name() {
return store_name;
}
public void setStore_name(String store_name) {
this.store_name = store_name;
}
public String getHour() {
return hour;
}
public void setHour(String hour) {
this.hour = hour;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getPoi_id() {
return poi_id;
}
public void setPoi_id(String poi_id) {
this.poi_id = poi_id;
}
public String getCompany_name() {
return company_name;
}
public void setCompany_name(String company_name) {
this.company_name = company_name;
}
public String getContract_phone() {
return contract_phone;
}
public void setContract_phone(String contract_phone) {
this.contract_phone = contract_phone;
}
public String getCredential() {
return credential;
}
public void setCredential(String credential) {
this.credential = credential;
}
public String getQualification_list() {
return qualification_list;
}
public void setQualification_list(String qualification_list) {
this.qualification_list = qualification_list;
}
public String getMap_poi_id() {
return map_poi_id;
}
public void setMap_poi_id(String map_poi_id) {
this.map_poi_id = map_poi_id;
}
}
package com.yanzuoguang.wxxcx.nearbypoi;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.analysis.distribution.WxXcxAnalysisGetVisitDistributionReq;
import com.yanzuoguang.wxxcx.base.*;
import com.yanzuoguang.wxxcx.customer.send.WxXcxCustomerServiceMessageSendRes;
/**
* @author 李贤军
*/
public class WxXcxNearbyPoiAddRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxNearbyPoiAddReq req;
public WxXcxNearbyPoiAddRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxNearbyPoiAddReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getNearbyPoiAdd() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxNearbyPoiAddRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxNearbyPoiAddRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxNearbyPoiAddRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.nearbypoi;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* @author 李贤军
*/
public class WxXcxNearbyPoiAddRes extends WxXcxResponseBaseError {
/**
* 审核单id
*/
private String audit_id;
/**
* 审核状态(3:审核通过,2:审核失败)
*/
private String status;
/**
* 如果 status 为2,会返回审核失败的原因
*/
private String reason;
/**
* poi_id
*/
private String poi_id;
public String getAudit_id() {
return audit_id;
}
public void setAudit_id(String audit_id) {
this.audit_id = audit_id;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getPoi_id() {
return poi_id;
}
public void setPoi_id(String poi_id) {
this.poi_id = poi_id;
}
}
package com.yanzuoguang.wxxcx.nearbypoi;
/**
* 删除地点 请求
*
* @author 李贤军
*/
public class WxXcxNearbyPoiDeleteReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 附近地点 ID
*/
private String poi_id;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getPoi_id() {
return poi_id;
}
public void setPoi_id(String poi_id) {
this.poi_id = poi_id;
}
}
package com.yanzuoguang.wxxcx.nearbypoi;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 删除地点 转换
*
* @author 李贤军
*/
public class WxXcxNearbyPoiDeleteRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxNearbyPoiDeleteReq req;
public WxXcxNearbyPoiDeleteRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxNearbyPoiDeleteReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getNearbyPoiDelete() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxNearbyPoiDeleteRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxNearbyPoiDeleteRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxNearbyPoiDeleteRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.nearbypoi;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 删除地点 响应
*
* @author 李贤军
*/
public class WxXcxNearbyPoiDeleteRes extends WxXcxResponseBaseError {
}
package com.yanzuoguang.wxxcx.nearbypoi;
/**
* 查看地点列表 请求
*
* @author 李贤军
*/
public class WxXcxNearbyPoiGetListReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 起始页id(从1开始计数)
*/
private int page;
/**
* 每页展示个数(最多1000个)
*/
private int page_rows;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getPage_rows() {
return page_rows;
}
public void setPage_rows(int page_rows) {
this.page_rows = page_rows;
}
}
package com.yanzuoguang.wxxcx.nearbypoi;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 查看地点列表 转换
*
* @author 李贤军
*/
public class WxXcxNearbyPoiGetListRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxNearbyPoiGetListReq req;
public WxXcxNearbyPoiGetListRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxNearbyPoiGetListReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getNearbyPoiGetList() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxNearbyPoiGetListRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxNearbyPoiGetListRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxNearbyPoiGetListRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
\ No newline at end of file
package com.yanzuoguang.wxxcx.nearbypoi;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 查看地点列表 响应
*
* @author 李贤军
*/
public class WxXcxNearbyPoiGetListRes extends WxXcxResponseBaseError {
/**
* 剩余可添加地点个数
*/
private String left_apply_num;
/**
* 最大可添加地点个数
*/
private String max_apply_num;
/**
* 地址列表的 JSON 格式字符串
*/
private String data;
public String getLeft_apply_num() {
return left_apply_num;
}
public void setLeft_apply_num(String left_apply_num) {
this.left_apply_num = left_apply_num;
}
public String getMax_apply_num() {
return max_apply_num;
}
public void setMax_apply_num(String max_apply_num) {
this.max_apply_num = max_apply_num;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
}
package com.yanzuoguang.wxxcx.pluginmanager;
/**
* 向插件开发者发起使用插件的申请 请求
*
* @author 李贤军
*/
public class WxXcxPluginManagerApplyPluginReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 接口调用凭证
*/
private String cloudbase_access_token;
/**
* 此接口下填写 "apply"
*/
private String action;
/**
* 插件 appId
*/
private String plugin_appid;
/**
* 申请使用理由
*/
private String reason;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getCloudbase_access_token() {
return cloudbase_access_token;
}
public void setCloudbase_access_token(String cloudbase_access_token) {
this.cloudbase_access_token = cloudbase_access_token;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public String getPlugin_appid() {
return plugin_appid;
}
public void setPlugin_appid(String plugin_appid) {
this.plugin_appid = plugin_appid;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
}
package com.yanzuoguang.wxxcx.pluginmanager;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 向插件开发者发起使用插件的申请 转换
*
* @author 李贤军
*/
public class WxXcxPluginManagerApplyPluginRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxPluginManagerApplyPluginReq req;
public WxXcxPluginManagerApplyPluginRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxPluginManagerApplyPluginReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getPluginManagerApplyPlugin() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxPluginManagerApplyPluginRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxPluginManagerApplyPluginRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxPluginManagerApplyPluginRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.pluginmanager;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
/**
* 向插件开发者发起使用插件的申请 响应
*
* @author 李贤军
*/
public class WxXcxPluginManagerApplyPluginRes extends WxXcxResponseBaseError {
}
package com.yanzuoguang.wxxcx.pluginmanager;
/**
* 查询已添加的插件 响应项
*
* @author 李贤军
*/
public class WxXcxPluginManagerGetPluginListPluginListRes {
/**
* 插件 appId
*/
private String appid;
/**
* 插件状态
* 1 申请中
* 2 申请通过
* 3 已拒绝
* 4 已超时
*/
private int status;
/**
* 插件昵称
*/
private String nickname;
/**
* 插件头像
*/
private String headimgurl;
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getHeadimgurl() {
return headimgurl;
}
public void setHeadimgurl(String headimgurl) {
this.headimgurl = headimgurl;
}
}
package com.yanzuoguang.wxxcx.pluginmanager;
/**
* 查询已添加的插件 请求
*
* @author 李贤军
*/
public class WxXcxPluginManagerGetPluginListReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 此接口下填写 "list"
*/
private String action;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
}
package com.yanzuoguang.wxxcx.pluginmanager;
import com.alibaba.fastjson.TypeReference;
import com.yanzuoguang.util.helper.HttpHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.wxxcx.base.*;
/**
* 查询已添加的插件 转换
*
* @author 李贤军
*/
public class WxXcxPluginManagerGetPluginListRequest implements WxXwxRequestUrl, WxXcxRequestUrlPara, WxXcxRequestPostFormData {
private final WxXcxConfig wxXcxConfig;
private final WxXcxRequest wxXcxRequest;
private final WxXcxAccessToken accessToken;
private final WxXcxPluginManagerGetPluginListReq req;
public WxXcxPluginManagerGetPluginListRequest(WxXcxConfig wxXcxConfig, WxXcxRequest wxXcxRequest, WxXcxAccessToken accessToken, WxXcxPluginManagerGetPluginListReq req) {
this.wxXcxConfig = wxXcxConfig;
this.wxXcxRequest = wxXcxRequest;
this.accessToken = accessToken;
this.req = req;
}
@Override
public String getUrl() {
return wxXcxConfig.getBaseUrl() + wxXcxConfig.getPluginManagerGetPluginList() + "?" + this.getUrlPara();
}
@Override
public String getUrlPara() {
return HttpHelper.getUrlParameter(accessToken);
}
@Override
public String getPost() {
return HttpHelper.getUrlParameter(req);
}
public WxXcxPluginManagerGetPluginListRes getResponse() {
// todo: 检测参数是否合法
// Assert.assertEquals();
return this.wxXcxRequest.request(this, response -> {
WxXcxPluginManagerGetPluginListRes ret = JsonHelper.deserialize(response, new TypeReference<WxXcxPluginManagerGetPluginListRes>() {
});
WxXcxAssert.assertBaseError(ret);
return ret;
});
}
}
package com.yanzuoguang.wxxcx.pluginmanager;
import com.yanzuoguang.wxxcx.base.WxXcxResponseBaseError;
import java.util.List;
/**
* 查询已添加的插件 响应
*
* @author 李贤军
*/
public class WxXcxPluginManagerGetPluginListRes extends WxXcxResponseBaseError {
/**
* 查询已添加的插件 响应列表
*/
private List<WxXcxPluginManagerGetPluginListPluginListRes> plugin_list;
public List<WxXcxPluginManagerGetPluginListPluginListRes> getPlugin_list() {
return plugin_list;
}
public void setPlugin_list(List<WxXcxPluginManagerGetPluginListPluginListRes> plugin_list) {
this.plugin_list = plugin_list;
}
}
package com.yanzuoguang.wxxcx.pluginmanager;
/**
* 修改插件使用申请的状态(供插件开发者调用) 请求
*
* @author 李贤军
*/
public class WxXcxPluginManagerSetDevPluginApplyStatusReq {
/**
* 接口调用凭证
*/
private String access_token;
/**
* 修改操作
* dev_agree 同意申请
* dev_refuse 拒绝申请
* dev_delete 删除已拒绝的申请者
*/
private String action;
/**
* 使用者的 appid。同意申请时填写。
*/
private String appid;
/**
* 拒绝理由。拒绝申请时填写。
*/
private String reason;
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getAction() {
return action;
}
public void setAction(String action) {
this.action = action;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment