mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-23 13:06:54 +08:00
优化方法名
This commit is contained in:
parent
e92e417a14
commit
cab663629a
@ -347,7 +347,7 @@ public interface WxMpService {
|
||||
* @param mpId 公众号标识
|
||||
* @return 切换成功,则返回当前对象,方便链式调用,否则抛出异常
|
||||
*/
|
||||
WxMpService switchover1(String mpId);
|
||||
WxMpService switchoverTo(String mpId);
|
||||
|
||||
/**
|
||||
* 返回客服接口方法实现类,以方便调用其各个接口.
|
||||
|
@ -377,7 +377,7 @@ public abstract class BaseWxMpServiceImpl<H, P> implements WxMpService, RequestH
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxMpService switchover1(String mpId) {
|
||||
public WxMpService switchoverTo(String mpId) {
|
||||
if (this.configStorageMap.containsKey(mpId)) {
|
||||
WxMpConfigStorageHolder.set(mpId);
|
||||
return this;
|
||||
|
@ -33,8 +33,8 @@ public class BaseWxMpServiceImplTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSwitchover1() throws WxErrorException {
|
||||
assertThat(this.wxService.switchover1("another").getAccessToken()).isNotEmpty();
|
||||
public void testSwitchoverTo() throws WxErrorException {
|
||||
assertThat(this.wxService.switchoverTo("another").getAccessToken()).isNotEmpty();
|
||||
assertThat(WxMpConfigStorageHolder.get()).isEqualTo("another");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user