Skip to content

Commit d638b20

Browse files
committed
🎨 批量格式化部分代码
1 parent 8ab4af0 commit d638b20

26 files changed

+281
-366
lines changed

weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenFastMaService.java

Lines changed: 57 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,38 @@
1818
* @date 2019/01/23
1919
*/
2020
public interface WxOpenFastMaService extends WxMaService {
21-
2221
/**
23-
* 1 获取帐号基本信息
22+
* 1 获取帐号基本信息.
2423
*/
2524
String OPEN_GET_ACCOUNT_BASIC_INFO = "https://api.weixin.qq.com/cgi-bin/account/getaccountbasicinfo";
2625

2726
/**
28-
* 2 小程序名称设置及改名
27+
* 2 小程序名称设置及改名.
2928
*/
3029
String OPEN_SET_NICKNAME = "https://api.weixin.qq.com/wxa/setnickname";
3130

3231
/**
33-
* 3 小程序改名审核状态查询
32+
* 3 小程序改名审核状态查询.
3433
*/
3534
String OPEN_API_WXA_QUERYNICKNAME = "https://api.weixin.qq.com/wxa/api_wxa_querynickname";
3635

3736
/**
38-
* 4 微信认证名称检测
37+
* 4 微信认证名称检测.
3938
*/
4039
String OPEN_CHECK_WX_VERIFY_NICKNAME = "https://api.weixin.qq.com/cgi-bin/wxverify/checkwxverifynickname";
4140

4241
/**
43-
* 5 修改头像
42+
* 5 修改头像.
4443
*/
4544
String OPEN_MODIFY_HEADIMAGE = "https://api.weixin.qq.com/cgi-bin/account/modifyheadimage";
4645

4746
/**
48-
* 6修改功能介绍
47+
* 6修改功能介绍.
4948
*/
5049
String OPEN_MODIFY_SIGNATURE = "https://api.weixin.qq.com/cgi-bin/account/modifysignature";
5150

5251
/**
53-
* 7 换绑小程序管理员接口
52+
* 7 换绑小程序管理员接口.
5453
*/
5554
String OPEN_COMPONENT_REBIND_ADMIN = "https://api.weixin.qq.com/cgi-bin/account/componentrebindadmin";
5655

@@ -79,37 +78,43 @@ public interface WxOpenFastMaService extends WxMaService {
7978
/**
8079
* 1.获取小程序的信息
8180
*
82-
* @return
83-
* @throws WxErrorException
81+
* @return .
82+
* @throws WxErrorException .
8483
*/
8584
WxFastMaAccountBasicInfoResult getAccountBasicInfo() throws WxErrorException;
8685

8786
/**
8887
* 2.小程序名称设置及改名
89-
* <pre>
88+
* <pre>
9089
* 若接口未返回audit_id,说明名称已直接设置成功,无需审核;若返回audit_id则名称正在审核中。
9190
* </pre>
92-
* @param nickname 昵称
93-
* @param idCard 身份证照片–临时素材mediaid(个人号必填)
94-
* @param license 组织机构代码证或营业执照–临时素材mediaid(组织号必填)
91+
*
92+
* @param nickname 昵称
93+
* @param idCard 身份证照片–临时素材mediaid(个人号必填)
94+
* @param license 组织机构代码证或营业执照–临时素材mediaid(组织号必填)
9595
* @param namingOtherStuff1 其他证明材料---临时素材 mediaid
9696
* @param namingOtherStuff2 其他证明材料---临时素材 mediaid
97-
* @throws WxErrorException
97+
* @return .
98+
* @throws WxErrorException .
9899
*/
99-
WxFastMaSetNickameResult setNickname(String nickname, String idCard, String license, String namingOtherStuff1, String namingOtherStuff2) throws WxErrorException;
100+
WxFastMaSetNickameResult setNickname(String nickname, String idCard, String license, String namingOtherStuff1,
101+
String namingOtherStuff2) throws WxErrorException;
100102

101103
/**
102104
* 3 小程序改名审核状态查询
105+
*
103106
* @param auditId 审核单id
104-
* @return
105-
* @throws WxErrorException
107+
* @return .
108+
* @throws WxErrorException .
106109
*/
107110
WxFastMaQueryNicknameStatusResult querySetNicknameStatus(String auditId) throws WxErrorException;
108111

109112
/**
110113
* 4. 微信认证名称检测
114+
*
111115
* @param nickname 名称
112-
* @throws WxErrorException
116+
* @return .
117+
* @throws WxErrorException .
113118
*/
114119
WxFastMaCheckNickameResult checkWxVerifyNickname(String nickname) throws WxErrorException;
115120

@@ -119,29 +124,34 @@ public interface WxOpenFastMaService extends WxMaService {
119124
* 图片格式只支持:BMP、JPEG、JPG、GIF、PNG,大小不超过2M
120125
* 注:实际头像始终为正方形
121126
* </pre>
127+
*
122128
* @param headImgMediaId 头像素材media_id
123-
* @param x1 裁剪框左上角x坐标(取值范围:[0, 1])
124-
* @param y1 裁剪框左上角y坐标(取值范围:[0, 1])
125-
* @param x2 裁剪框右下角x坐标(取值范围:[0, 1])
126-
* @param y2 裁剪框右下角y坐标(取值范围:[0, 1])
127-
* @throws WxErrorException
129+
* @param x1 裁剪框左上角x坐标(取值范围:[0, 1])
130+
* @param y1 裁剪框左上角y坐标(取值范围:[0, 1])
131+
* @param x2 裁剪框右下角x坐标(取值范围:[0, 1])
132+
* @param y2 裁剪框右下角y坐标(取值范围:[0, 1])
133+
* @return .
134+
* @throws WxErrorException .
128135
*/
129136
WxOpenResult modifyHeadImage(String headImgMediaId, float x1, float y1, float x2, float y2) throws WxErrorException;
130137

131138
/**
132139
* 6.修改功能介绍
140+
*
133141
* @param signature 简介:4-120字
134-
* @throws WxErrorException
142+
* @return .
143+
* @throws WxErrorException .
135144
*/
136145
WxOpenResult modifySignature(String signature) throws WxErrorException;
137146

138147
/**
139148
* 7.3 管理员换绑
140-
* @param taskid 换绑管理员任务序列号(公众平台最终点击提交回跳到第三方平台时携带)
141-
* @return
142-
* @throws WxErrorException
149+
*
150+
* @param taskId 换绑管理员任务序列号(公众平台最终点击提交回跳到第三方平台时携带)
151+
* @return .
152+
* @throws WxErrorException .
143153
*/
144-
WxOpenResult componentRebindAdmin(String taskid) throws WxErrorException;
154+
WxOpenResult componentRebindAdmin(String taskId) throws WxErrorException;
145155

146156
/**
147157
* 8.1 获取账号可以设置的所有类目
@@ -150,38 +160,45 @@ public interface WxOpenFastMaService extends WxMaService {
150160
* 目前没有完整的类目信息数据
151161
* 为保证兼容性,放弃将response转换为实体
152162
* </pre>
153-
* @return
163+
*
164+
* @return .
165+
* @throws WxErrorException .
154166
*/
155167
String getAllCategories() throws WxErrorException;
156168

157169
/**
158-
*8.2添加类目
159-
* @return
160-
* @throws WxErrorException
170+
* 8.2添加类目
171+
*
172+
* @param categoryList 类目列表
173+
* @return .
174+
* @throws WxErrorException .
161175
*/
162176
WxOpenResult addCategory(List<WxFastMaCategory> categoryList) throws WxErrorException;
163177

164178
/**
165179
* 8.3删除类目
166-
* @param first 一级类目ID
180+
*
181+
* @param first 一级类目ID
167182
* @param second 二级类目ID
168-
* @return
169-
* @throws WxErrorException
183+
* @return .
184+
* @throws WxErrorException .
170185
*/
171186
WxOpenResult deleteCategory(int first, int second) throws WxErrorException;
172187

173188
/**
174189
* 8.4获取账号已经设置的所有类目
175-
* @return
176-
* @throws WxErrorException
190+
*
191+
* @return .
192+
* @throws WxErrorException .
177193
*/
178194
WxFastMaBeenSetCategoryResult getCategory() throws WxErrorException;
179195

180196
/**
181197
* 8.5修改类目
198+
*
182199
* @param category 实体
183-
* @return
184-
* @throws WxErrorException
200+
* @return .
201+
* @throws WxErrorException .
185202
*/
186203
WxOpenResult modifyCategory(WxFastMaCategory category) throws WxErrorException;
187204
}

weixin-java-open/src/main/java/me/chanjar/weixin/open/api/WxOpenMaService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public interface WxOpenMaService extends WxMaService {
9898
String API_UPDATE_SHOW_WXA_ITEM = "https://api.weixin.qq.com/wxa/updateshowwxaitem";
9999

100100

101-
102101
/**
103102
* 以下接口为三方平台代小程序实现的代码管理功能
104103
* <p>
@@ -268,7 +267,6 @@ public interface WxOpenMaService extends WxMaService {
268267
WxOpenMaTesterListResult getTesterList() throws WxErrorException;
269268

270269

271-
272270
/**
273271
* 设置小程序隐私设置(是否可被搜索)
274272
*

weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ public String route(final WxOpenXmlMessage wxMessage) throws WxErrorException {
265265
return "success";
266266
}
267267
//快速创建小程序
268-
if (StringUtils.equalsIgnoreCase(wxMessage.getInfoType(), "notify_third_fasteregister") && wxMessage.getStatus () == 0) {
269-
WxOpenQueryAuthResult queryAuth = wxOpenService.getWxOpenComponentService().getQueryAuth(wxMessage.getAuthCode ());
268+
if (StringUtils.equalsIgnoreCase(wxMessage.getInfoType(), "notify_third_fasteregister") && wxMessage.getStatus() == 0) {
269+
WxOpenQueryAuthResult queryAuth = wxOpenService.getWxOpenComponentService().getQueryAuth(wxMessage.getAuthCode());
270270
if (queryAuth == null || queryAuth.getAuthorizationInfo() == null || queryAuth.getAuthorizationInfo().getAuthorizerAppid() == null) {
271271
throw new NullPointerException("getQueryAuth");
272272
}
@@ -318,11 +318,11 @@ public WxOpenAuthorizerListResult getAuthorizerList(int begin, int len) throws W
318318
jsonObject.addProperty("count", len);
319319
String responseContent = post(url, jsonObject.toString());
320320
WxOpenAuthorizerListResult ret = WxOpenGsonBuilder.create().fromJson(responseContent, WxOpenAuthorizerListResult.class);
321-
if(ret != null && ret.getList() != null){
322-
for(Map<String, String> data : ret.getList()){
321+
if (ret != null && ret.getList() != null) {
322+
for (Map<String, String> data : ret.getList()) {
323323
String authorizerAppid = data.get("authorizer_appid");
324324
String refreshToken = data.get("refresh_token");
325-
if(authorizerAppid != null && refreshToken != null){
325+
if (authorizerAppid != null && refreshToken != null) {
326326
this.getWxOpenConfigStorage().setAuthorizerRefreshToken(authorizerAppid, refreshToken);
327327
}
328328
}
@@ -451,25 +451,25 @@ public WxOpenCreateResult createOpenAccount(String appId) throws WxErrorExceptio
451451
}
452452

453453
@Override
454-
public WxOpenResult fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone) throws WxErrorException{
454+
public WxOpenResult fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone) throws WxErrorException {
455455
JsonObject jsonObject = new JsonObject();
456-
jsonObject.addProperty("name",name);
456+
jsonObject.addProperty("name", name);
457457
jsonObject.addProperty("code", code);
458458
jsonObject.addProperty("code_type", codeType);
459459
jsonObject.addProperty("legal_persona_wechat", legalPersonaWechat);
460460
jsonObject.addProperty("legal_persona_name", legalPersonaName);
461461
jsonObject.addProperty("component_phone", componentPhone);
462-
String response = post(FAST_REGISTER_WEAPP_URL, jsonObject.toString (), "component_access_token");
463-
return WxOpenGsonBuilder.create ().fromJson (response, WxOpenResult.class);
462+
String response = post(FAST_REGISTER_WEAPP_URL, jsonObject.toString(), "component_access_token");
463+
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
464464
}
465465

466466
@Override
467-
public WxOpenResult fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName) throws WxErrorException{
467+
public WxOpenResult fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName) throws WxErrorException {
468468
JsonObject jsonObject = new JsonObject();
469-
jsonObject.addProperty("name",name);
469+
jsonObject.addProperty("name", name);
470470
jsonObject.addProperty("legal_persona_wechat", legalPersonaWechat);
471471
jsonObject.addProperty("legal_persona_name", legalPersonaName);
472-
String response = post(FAST_REGISTER_WEAPP_SEARCH_URL, jsonObject.toString (), "component_access_token");
473-
return WxOpenGsonBuilder.create ().fromJson (response, WxOpenResult.class);
472+
String response = post(FAST_REGISTER_WEAPP_SEARCH_URL, jsonObject.toString(), "component_access_token");
473+
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
474474
}
475475
}

0 commit comments

Comments
 (0)