mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
素材相关代码补充完善javadoc注释,并重构包结构
This commit is contained in:
@@ -5,7 +5,7 @@ import me.chanjar.weixin.common.exception.WxErrorException;
|
||||
import me.chanjar.weixin.common.util.http.RequestExecutor;
|
||||
import me.chanjar.weixin.common.util.http.Utf8ResponseHandler;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
|
||||
@@ -5,8 +5,8 @@ import me.chanjar.weixin.common.exception.WxErrorException;
|
||||
import me.chanjar.weixin.common.util.http.RequestExecutor;
|
||||
import me.chanjar.weixin.common.util.http.Utf8ResponseHandler;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterial;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterial;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialUploadResult;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
@@ -37,7 +37,7 @@ public class MaterialUploadRequestExecutor implements RequestExecutor<WxMpMateri
|
||||
if (file == null || !file.exists()) {
|
||||
throw new FileNotFoundException();
|
||||
}
|
||||
|
||||
|
||||
MultipartEntityBuilder multipartEntityBuilder = MultipartEntityBuilder.create();
|
||||
multipartEntityBuilder
|
||||
.addBinaryBody("media", file)
|
||||
@@ -46,7 +46,7 @@ public class MaterialUploadRequestExecutor implements RequestExecutor<WxMpMateri
|
||||
if (material.getForm() != null) {
|
||||
multipartEntityBuilder.addTextBody("description", WxGsonBuilder.create().toJson(form));
|
||||
}
|
||||
|
||||
|
||||
httpPost.setEntity(multipartEntityBuilder.build());
|
||||
httpPost.setHeader("Content-Type", ContentType.MULTIPART_FORM_DATA.toString());
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import me.chanjar.weixin.common.exception.WxErrorException;
|
||||
import me.chanjar.weixin.common.util.http.RequestExecutor;
|
||||
import me.chanjar.weixin.common.util.http.Utf8ResponseHandler;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialVideoInfoResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialVideoInfoResult;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
|
||||
@@ -4,7 +4,7 @@ import me.chanjar.weixin.common.bean.result.WxError;
|
||||
import me.chanjar.weixin.common.exception.WxErrorException;
|
||||
import me.chanjar.weixin.common.util.http.RequestExecutor;
|
||||
import me.chanjar.weixin.common.util.http.Utf8ResponseHandler;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMediaImgUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMediaImgUploadResult;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
|
||||
@@ -2,7 +2,7 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMediaImgUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMediaImgUploadResult;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
@@ -10,19 +10,19 @@ import me.chanjar.weixin.mp.bean.WxMpMassOpenIdsMessage;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMassPreviewMessage;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMassTagMessage;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMassVideo;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialArticleUpdate;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialArticleUpdate;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserCumulate;
|
||||
import me.chanjar.weixin.mp.bean.datacube.WxDataCubeUserSummary;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMediaImgUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMediaImgUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpCardResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMassSendResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMassUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialCountResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialFileBatchGetResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialNewsBatchGetResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialVideoInfoResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialCountResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialFileBatchGetResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNewsBatchGetResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialVideoInfoResult;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpOAuth2AccessToken;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpQrCodeTicket;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpSemanticQueryResult;
|
||||
|
||||
@@ -12,8 +12,8 @@ import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonSerializationContext;
|
||||
import com.google.gson.JsonSerializer;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialArticleUpdate;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialArticleUpdate;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNews;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialCountResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialCountResult;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialFileBatchGetResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialFileBatchGetResult;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -10,7 +10,7 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialFileBatchGetResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialFileBatchGetResult;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -10,7 +10,7 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNews;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialNewsBatchGetResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNewsBatchGetResult;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -10,8 +10,8 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialNewsBatchGetResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNewsBatchGetResult;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialNews;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialUploadResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialUploadResult;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ package me.chanjar.weixin.mp.util.json;
|
||||
|
||||
import com.google.gson.*;
|
||||
import me.chanjar.weixin.common.util.json.GsonHelper;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpMaterialVideoInfoResult;
|
||||
import me.chanjar.weixin.mp.bean.material.WxMpMaterialVideoInfoResult;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user