mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-23 23:58:44 +08:00
fix some format
This commit is contained in:
parent
8c862d8a48
commit
d49c3dce60
@ -1,6 +1,24 @@
|
||||
package me.chanjar.weixin.mp.api.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Guice;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
|
||||
import me.chanjar.weixin.common.exception.WxErrorException;
|
||||
@ -9,17 +27,11 @@ import me.chanjar.weixin.mp.api.ApiTestModule;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterial;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialArticleUpdate;
|
||||
import me.chanjar.weixin.mp.bean.WxMpMaterialNews;
|
||||
import me.chanjar.weixin.mp.bean.result.*;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.DataProvider;
|
||||
import org.testng.annotations.Guice;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 素材管理相关接口的测试
|
||||
@ -199,6 +211,7 @@ public class WxMpMaterialServiceImplTest {
|
||||
@Test(dependsOnMethods = {"testUpdateNewsInfo"})
|
||||
public void testMaterialNewsList() throws WxErrorException {
|
||||
WxMpMaterialNewsBatchGetResult wxMpMaterialNewsBatchGetResult = this.wxService.getMaterialService().materialNewsBatchGet(0, 20);
|
||||
Assert.assertNotNull(wxMpMaterialNewsBatchGetResult);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -207,6 +220,10 @@ public class WxMpMaterialServiceImplTest {
|
||||
WxMpMaterialFileBatchGetResult wxMpMaterialVoiceBatchGetResult = this.wxService.getMaterialService().materialFileBatchGet(WxConsts.MATERIAL_VOICE, 0, 20);
|
||||
WxMpMaterialFileBatchGetResult wxMpMaterialVideoBatchGetResult = this.wxService.getMaterialService().materialFileBatchGet(WxConsts.MATERIAL_VIDEO, 0, 20);
|
||||
WxMpMaterialFileBatchGetResult wxMpMaterialImageBatchGetResult = this.wxService.getMaterialService().materialFileBatchGet(WxConsts.MATERIAL_IMAGE, 0, 20);
|
||||
|
||||
Assert.assertNotNull(wxMpMaterialVoiceBatchGetResult);
|
||||
Assert.assertNotNull(wxMpMaterialVideoBatchGetResult);
|
||||
Assert.assertNotNull(wxMpMaterialImageBatchGetResult);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
package me.chanjar.weixin.mp.demo;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import me.chanjar.weixin.common.util.StringUtils;
|
||||
import me.chanjar.weixin.mp.api.WxMpConfigStorage;
|
||||
import me.chanjar.weixin.mp.api.WxMpMessageRouter;
|
||||
@ -7,16 +14,11 @@ import me.chanjar.weixin.mp.api.WxMpService;
|
||||
import me.chanjar.weixin.mp.bean.WxMpXmlMessage;
|
||||
import me.chanjar.weixin.mp.bean.WxMpXmlOutMessage;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author Daniel Qian
|
||||
*/
|
||||
public class WxMpEndpointServlet extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected WxMpConfigStorage wxMpConfigStorage;
|
||||
protected WxMpService wxMpService;
|
||||
@ -29,7 +31,8 @@ public class WxMpEndpointServlet extends HttpServlet {
|
||||
this.wxMpMessageRouter = wxMpMessageRouter;
|
||||
}
|
||||
|
||||
@Override protected void service(HttpServletRequest request, HttpServletResponse response)
|
||||
@Override
|
||||
protected void service(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
|
@ -12,6 +12,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
public class WxMpOAuth2Servlet extends HttpServlet {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
protected WxMpService wxMpService;
|
||||
|
||||
@ -19,7 +20,8 @@ public class WxMpOAuth2Servlet extends HttpServlet {
|
||||
this.wxMpService = wxMpService;
|
||||
}
|
||||
|
||||
@Override protected void service(HttpServletRequest request, HttpServletResponse response)
|
||||
@Override
|
||||
protected void service(HttpServletRequest request, HttpServletResponse response)
|
||||
throws ServletException, IOException {
|
||||
|
||||
response.setContentType("text/html;charset=utf-8");
|
||||
|
Loading…
Reference in New Issue
Block a user