1
0
mirror of synced 2025-12-20 15:48:01 +08:00

🆕 #2243 【小程序】增加自定义组件申请接入相关接口

This commit is contained in:
liming1019
2021-08-06 10:33:32 +08:00
committed by GitHub
parent 2d36b4d6d2
commit 60663f2f7a
10 changed files with 254 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import java.io.File;
import java.math.BigDecimal;
import java.util.Arrays;
import static org.testng.Assert.assertNotNull;
@@ -34,8 +35,8 @@ public class WxMaLiveGoodsServiceImplTest {
WxMaLiveGoodInfo goods = new WxMaLiveGoodInfo();
goods.setCoverImgUrl(mediaUpload.getMediaId());
goods.setName("宫廷奢华真丝四件套");
goods.setPrice("1599");
goods.setPrice2("0");
goods.setPrice(new BigDecimal("1599"));
goods.setPrice2(new BigDecimal("0"));
goods.setPriceType(1);
goods.setUrl("pages/goods/goods?id=b7c4fbf95493bd294054fe4296d0d9ad");
WxMaLiveResult liveResult = this.wxService.getLiveGoodsService().addGoods(goods);
@@ -68,8 +69,8 @@ public class WxMaLiveGoodsServiceImplTest {
goods.setGoodsId(8);
goods.setName("宫廷奢华真丝四件套");
goods.setCoverImgUrl("http://mmbiz.qpic.cn/mmbiz_png/omYktZNGamuUQE0WPVfqdnLV61JDhluXOac7PiaoZeticFpcR7wvicC0aXUC2VXkl7r1gN0QSKosv2satn6oCFeiaQ/0");
goods.setPrice("2299");
goods.setPrice2("0");
goods.setPrice(new BigDecimal("2299"));
goods.setPrice2(new BigDecimal("0"));
goods.setPriceType(1);
goods.setUrl("pages/goods/goods?id=b7c4fbf95493bd294054fe4296d0d9ad");
boolean maLiveInfo = this.wxService.getLiveGoodsService().updateGoods(goods);

View File

@@ -0,0 +1,51 @@
package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopRegisterApplySceneRequest;
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaShopRegisterFinishAccessInfoRequest;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopBaseResponse;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaShopRegisterCheckResponse;
import cn.binarywang.wx.miniapp.test.ApiTestModule;
import com.google.inject.Inject;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author liming1019
*/
@Test
@Guice(modules = ApiTestModule.class)
public class WxMaShopRegisterServiceImplTest {
@Inject
private WxMaService wxService;
@Test
public void testRegisterApply() throws Exception {
WxMaShopBaseResponse response = this.wxService.getShopRegisterService().registerApply();
assertThat(response).isNotNull();
}
@Test
public void testRegisterCheck() throws Exception {
WxMaShopRegisterCheckResponse response = this.wxService.getShopRegisterService().registerCheck();
assertThat(response).isNotNull();
}
@Test
public void testRegisterFinishAccessInfo() throws Exception {
WxMaShopRegisterFinishAccessInfoRequest request = new WxMaShopRegisterFinishAccessInfoRequest();
request.setAccessInfoItem(6L);
WxMaShopBaseResponse response = this.wxService.getShopRegisterService().registerFinishAccessInfo(request);
assertThat(response).isNotNull();
}
@Test
public void testRegisterApplyScene() throws Exception {
WxMaShopRegisterApplySceneRequest request = new WxMaShopRegisterApplySceneRequest();
request.setSceneGroupId(1L);
WxMaShopBaseResponse response = this.wxService.getShopRegisterService().registerApplyScene(request);
assertThat(response).isNotNull();
}
}