🆕 #2642【企业微信】增加客户群加入群聊管理相关接口
This commit is contained in:
@@ -12,14 +12,13 @@ import me.chanjar.weixin.cp.bean.external.contact.WxCpExternalContactInfo;
|
||||
import me.chanjar.weixin.cp.bean.external.msg.Attachment;
|
||||
import me.chanjar.weixin.cp.bean.external.msg.Image;
|
||||
import me.chanjar.weixin.cp.bean.external.msg.Video;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.testng.annotations.Guice;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import org.testng.collections.CollectionUtils;
|
||||
|
||||
import static org.testng.Assert.assertNotNull;
|
||||
@@ -337,4 +336,51 @@ public class WxCpExternalContactServiceImplTest {
|
||||
assertNotNull(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAddJoinWay() throws WxErrorException {
|
||||
|
||||
|
||||
WxCpGroupJoinWayInfo.JoinWay joinWay = new WxCpGroupJoinWayInfo.JoinWay();
|
||||
joinWay.setChatIdList(Arrays.asList("wrfpBaCwAAxR-iIqIUa5vvbpZQcAexJA"));
|
||||
joinWay.setScene(2);
|
||||
joinWay.setAutoCreateRoom(1);
|
||||
joinWay.setRemark("CreateDate:" + DateFormatUtils.ISO_8601_EXTENDED_DATETIME_FORMAT.format(new Date()));
|
||||
|
||||
WxCpGroupJoinWayInfo info = new WxCpGroupJoinWayInfo();
|
||||
info.setJoinWay(joinWay);
|
||||
this.wxCpService.getExternalContactService().addJoinWay(info);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUpdateJoinWay() throws WxErrorException {
|
||||
|
||||
final String configId = "";
|
||||
|
||||
WxCpGroupJoinWayInfo.JoinWay joinWay = new WxCpGroupJoinWayInfo.JoinWay();
|
||||
joinWay.setConfigId(configId);
|
||||
joinWay.setChatIdList(Arrays.asList("wrfpBaCwAAxR-iIqIUa5vvbpZQcAexJA"));
|
||||
joinWay.setScene(2);
|
||||
joinWay.setAutoCreateRoom(1);
|
||||
joinWay.setRemark("CreateDate:" + DateFormatUtils.ISO_8601_EXTENDED_DATETIME_FORMAT.format(new Date()));
|
||||
|
||||
WxCpGroupJoinWayInfo info = new WxCpGroupJoinWayInfo();
|
||||
info.setJoinWay(joinWay);
|
||||
this.wxCpService.getExternalContactService().updateJoinWay(info);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDelJoinWay() throws WxErrorException {
|
||||
|
||||
final String configId = "";
|
||||
|
||||
this.wxCpService.getExternalContactService().delJoinWay(configId);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetJoinWay() throws WxErrorException {
|
||||
|
||||
final String configId = "";
|
||||
|
||||
this.wxCpService.getExternalContactService().getJoinWay(configId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user