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