mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 02:28:25 +08:00 
			
		
		
		
	🎨 移除多余TicketType,移到common模块进行共享使用
This commit is contained in:
		| @ -3,8 +3,8 @@ package me.chanjar.weixin.cp.api.impl; | ||||
| import jodd.http.HttpConnectionProvider; | ||||
| import jodd.http.HttpRequest; | ||||
| import jodd.http.HttpResponse; | ||||
| import jodd.http.JoddHttp; | ||||
| import jodd.http.ProxyInfo; | ||||
| import jodd.http.net.SocketHttpConnectionProvider; | ||||
| import me.chanjar.weixin.common.WxType; | ||||
| import me.chanjar.weixin.common.bean.WxAccessToken; | ||||
| import me.chanjar.weixin.common.error.WxError; | ||||
| @ -68,7 +68,7 @@ public class WxCpServiceJoddHttpImpl extends BaseWxCpServiceImpl<HttpConnectionP | ||||
|         configStorage.getHttpProxyPort(), configStorage.getHttpProxyUsername(), configStorage.getHttpProxyPassword()); | ||||
|     } | ||||
|  | ||||
|     httpClient = JoddHttp.httpConnectionProvider; | ||||
|     httpClient = new SocketHttpConnectionProvider(); | ||||
|   } | ||||
|  | ||||
|   @Override | ||||
|  | ||||
| @ -133,7 +133,7 @@ public class BaseWxCpTpServiceImplTest { | ||||
|     assertThat(tpCorp.getPermanentCode()).isEqualTo("xxxx"); | ||||
|  | ||||
|     final WxCpTpPermanentCodeInfo tpPermanentCodeInfo = tpService.getPermanentCodeInfo(authCode); | ||||
|     assertThat(tpPermanentCodeInfo.getAuthInfo().getAgent().get(0).getAgentid()).isEqualTo(1); | ||||
|     assertThat(tpPermanentCodeInfo.getAuthInfo().getAgents().get(0).getAgentId()).isEqualTo(1); | ||||
|  | ||||
|   } | ||||
|  | ||||
| @ -193,8 +193,8 @@ public class BaseWxCpTpServiceImplTest { | ||||
|     jsonObject.addProperty("auth_code", authCode); | ||||
|     doReturn(returnJson).when(tpService).post(configStorage.getApiUrl(GET_PERMANENT_CODE), jsonObject.toString()); | ||||
|     final WxCpTpPermanentCodeInfo tpPermanentCodeInfo = tpService.getPermanentCodeInfo(authCode); | ||||
|     assertThat(tpPermanentCodeInfo.getAuthInfo().getAgent().get(0).getAgentid()).isEqualTo(1000012); | ||||
|     assertNotNull(tpPermanentCodeInfo.getAuthInfo().getAgent().get(0).getSquareLogoUrl()); | ||||
|     assertThat(tpPermanentCodeInfo.getAuthInfo().getAgents().get(0).getAgentId()).isEqualTo(1000012); | ||||
|     assertNotNull(tpPermanentCodeInfo.getAuthInfo().getAgents().get(0).getSquareLogoUrl()); | ||||
|     assertNotNull(tpPermanentCodeInfo.getAuthCorpInfo().getCorpSquareLogoUrl()); | ||||
|   } | ||||
|  | ||||
|  | ||||
| @ -70,9 +70,9 @@ public class WxCpXmlMessageTest { | ||||
|     assertEquals(wxMessage.getMediaId(), "media_id"); | ||||
|     assertEquals(wxMessage.getFormat(), "Format"); | ||||
|     assertEquals(wxMessage.getThumbMediaId(), "thumb_media_id"); | ||||
|     assertEquals(wxMessage.getLocationX(), 23.134521d); | ||||
|     assertEquals(wxMessage.getLocationY(), 113.358803d); | ||||
|     assertEquals(wxMessage.getScale(), 20d); | ||||
|     assertEquals(wxMessage.getLocationX().doubleValue(), 23.134521d); | ||||
|     assertEquals(wxMessage.getLocationY().doubleValue(), 113.358803d); | ||||
|     assertEquals(wxMessage.getScale().doubleValue(), 20d); | ||||
|     assertEquals(wxMessage.getLabel(), "位置信息"); | ||||
|     assertEquals(wxMessage.getDescription(), "公众平台官网链接"); | ||||
|     assertEquals(wxMessage.getUrl(), "url"); | ||||
| @ -80,9 +80,9 @@ public class WxCpXmlMessageTest { | ||||
|     assertEquals(wxMessage.getEvent(), "subscribe"); | ||||
|     assertEquals(wxMessage.getEventKey(), "qrscene_123123"); | ||||
|     assertEquals(wxMessage.getTicket(), "TICKET"); | ||||
|     assertEquals(wxMessage.getLatitude(), 23.137466); | ||||
|     assertEquals(wxMessage.getLongitude(), 113.352425); | ||||
|     assertEquals(wxMessage.getPrecision(), 119.385040); | ||||
|     assertEquals(wxMessage.getLatitude().doubleValue(), 23.137466); | ||||
|     assertEquals(wxMessage.getLongitude().doubleValue(), 113.352425); | ||||
|     assertEquals(wxMessage.getPrecision().doubleValue(), 119.385040); | ||||
|     assertEquals(wxMessage.getScanCodeInfo().getScanType(), "qrcode"); | ||||
|     assertEquals(wxMessage.getScanCodeInfo().getScanResult(), "1"); | ||||
|     assertEquals(wxMessage.getSendPicsInfo().getCount(), new Long(1)); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang