1
0
mirror of synced 2026-04-10 10:38:36 +08:00

🆕 #3427【视频号】新增罗盘商家版API、微信小店合作账号API相关接口以及订单待发货消息回调

This commit is contained in:
Zeyes Lee
2024-12-01 23:22:26 +08:00
committed by GitHub
parent f72f748cda
commit fae5cad694
62 changed files with 1869 additions and 34 deletions

View File

@@ -0,0 +1,125 @@
package me.chanjar.weixin.channel.api.impl;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import com.google.inject.Inject;
import me.chanjar.weixin.channel.api.WxChannelCompassShopService;
import me.chanjar.weixin.channel.api.WxChannelService;
import me.chanjar.weixin.channel.bean.compass.shop.FinderAuthListResponse;
import me.chanjar.weixin.channel.bean.compass.shop.FinderListResponse;
import me.chanjar.weixin.channel.bean.compass.shop.FinderOverallResponse;
import me.chanjar.weixin.channel.bean.compass.shop.FinderProductListResponse;
import me.chanjar.weixin.channel.bean.compass.shop.FinderProductOverallResponse;
import me.chanjar.weixin.channel.bean.compass.shop.ShopLiveListResponse;
import me.chanjar.weixin.channel.bean.compass.shop.ShopOverallResponse;
import me.chanjar.weixin.channel.bean.compass.shop.ShopProductDataResponse;
import me.chanjar.weixin.channel.bean.compass.shop.ShopProductListResponse;
import me.chanjar.weixin.channel.bean.compass.shop.ShopSaleProfileDataResponse;
import me.chanjar.weixin.channel.test.ApiTestModule;
import me.chanjar.weixin.common.error.WxErrorException;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
/**
* @author <a href="https://github.com/lixize">Zeyes</a>
*/
@Guice(modules = ApiTestModule.class)
public class WxChannelCompassShopServiceImplTest {
@Inject
private WxChannelService channelService;
@Test
public void testGetShopOverall() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "20240306";
ShopOverallResponse response = service.getShopOverall(ds);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetFinderAuthorizationList() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
FinderAuthListResponse response = service.getFinderAuthorizationList();
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetFinderList() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "20240306";
FinderListResponse response = service.getFinderList(ds);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetFinderOverall() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "20240306";
FinderOverallResponse response = service.getFinderOverall(ds);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetFinderProductList() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "";
String finderId = "";
FinderProductListResponse response = service.getFinderProductList(ds, finderId);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetFinderProductOverall() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "";
String finderId = "";
FinderProductOverallResponse response = service.getFinderProductOverall(ds, finderId);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetShopLiveList() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "";
String finderId = "";
ShopLiveListResponse response = service.getShopLiveList(ds, finderId);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetShopProductData() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "20240306";
String productId = "";
ShopProductDataResponse response = service.getShopProductData(ds, productId);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetShopProductList() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "20240306";
ShopProductListResponse response = service.getShopProductList(ds);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGetShopSaleProfileData() throws WxErrorException {
WxChannelCompassShopService service = channelService.getCompassShopService();
String ds = "20240306";
ShopSaleProfileDataResponse response = service.getShopSaleProfileData(ds, 3);
assertNotNull(response);
assertTrue(response.isSuccess());
}
}

View File

@@ -0,0 +1,66 @@
package me.chanjar.weixin.channel.api.impl;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
import com.google.inject.Inject;
import me.chanjar.weixin.channel.api.WxChannelService;
import me.chanjar.weixin.channel.api.WxStoreCooperationService;
import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;
import me.chanjar.weixin.channel.test.ApiTestModule;
import me.chanjar.weixin.channel.util.JsonUtils;
import me.chanjar.weixin.common.error.WxErrorException;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
/**
* @author <a href="https://github.com/lixize">Zeyes</a>
*/
@Guice(modules = ApiTestModule.class)
public class WxStoreCooperationServiceImplTest {
@Inject
private WxChannelService channelService;
@Test
public void testListCooperation() throws WxErrorException {
WxStoreCooperationService service = channelService.getCooperationService();
Integer sharerType = 3;
WxChannelBaseResponse response = service.listCooperation(sharerType);
assertNotNull(response);
assertTrue(response.isSuccess());
System.out.println(JsonUtils.encode(response));
}
@Test
public void testGetCooperationStatus() throws WxErrorException {
WxStoreCooperationService service = channelService.getCooperationService();
WxChannelBaseResponse response = service.getCooperationStatus("sph3FZbOEY64mWQ", 2);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testGenerateQrCode() throws WxErrorException {
WxStoreCooperationService service = channelService.getCooperationService();
WxChannelBaseResponse response = service.generateQrCode("sph3FZbOEY64mWQ", 2);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testCancelInvitation() throws WxErrorException {
WxStoreCooperationService service = channelService.getCooperationService();
WxChannelBaseResponse response = service.cancelInvitation("sph3FZbOEY64mWQ", 2);
assertNotNull(response);
assertTrue(response.isSuccess());
}
@Test
public void testUnbind() throws WxErrorException {
WxStoreCooperationService service = channelService.getCooperationService();
WxChannelBaseResponse response = service.unbind("sph3FZbOEY64mWQ", 2);
assertNotNull(response);
assertTrue(response.isSuccess());
}
}

View File

@@ -6,8 +6,7 @@ import me.chanjar.weixin.channel.bean.message.order.OrderPayMessage;
import org.testng.annotations.Test;
/**
* @author LiXiZe
* @since 2023-04-20
* @author <a href="https://github.com/lixize">Zeyes</a>
*/
public class WxChannelMessageRouterRuleTest {

View File

@@ -22,8 +22,7 @@ import org.testng.annotations.Guice;
import org.testng.annotations.Test;
/**
* @author LiXiZe
* @since 2023-04-21
* @author <a href="https://github.com/lixize">Zeyes</a>
*/
@Slf4j
@Guice(modules = ApiTestModule.class)