|
@@ -0,0 +1,44 @@
|
|
|
+package com.miaxis.test;
|
|
|
+
|
|
|
+import com.miaxis.NbjkApplication;
|
|
|
+import com.miaxis.wx.dto.WxMaterial;
|
|
|
+import com.miaxis.wx.dto.WxMaterialList;
|
|
|
+import com.miaxis.wx.service.IWxGzhService;
|
|
|
+import com.miaxis.wx.service.WxService;
|
|
|
+import org.junit.Test;
|
|
|
+import org.junit.runner.RunWith;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.boot.test.context.SpringBootTest;
|
|
|
+import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+
|
|
|
+import java.io.IOException;
|
|
|
+
|
|
|
+@SpringBootTest(classes = NbjkApplication.class)
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+public class WxGzhTest {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IWxGzhService wxGzhServicee;
|
|
|
+ @Autowired
|
|
|
+ private WxService wxService;
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void getUserInfo() throws IOException {
|
|
|
+ String token = wxGzhServicee.getGzhToken();
|
|
|
+ WxMaterialList wxMaterialList = new WxMaterialList();
|
|
|
+ wxMaterialList.setType("image");
|
|
|
+ wxMaterialList.setOffset("60");
|
|
|
+ wxMaterialList.setCount("20");
|
|
|
+ String result = wxService.getBatchMateria(token,wxMaterialList);
|
|
|
+ System.out.println(result);
|
|
|
+// WxMaterial wxMaterial = new WxMaterial();
|
|
|
+// wxMaterial.setMedia_id("kD88pyQSlAfJYQIBpBp75Wjs3tWIgKQI6jw--s8kDrZ0AuuQDMyA89LU5CX8UMFY");
|
|
|
+// String result2 = wxService.getMateria(token,wxMaterial);
|
|
|
+
|
|
|
+// System.out.println(result2);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|