mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 小程序代码提交审核代码重构优化,删除重复定义类
This commit is contained in:
@@ -39,7 +39,7 @@ public interface WxMaCodeService {
|
||||
* @return List<WxMaCategory>
|
||||
* @throws WxErrorException 获取失败时返回,具体错误码请看此接口的注释文档
|
||||
*/
|
||||
List<WxMaCategory> getCategory() throws WxErrorException;
|
||||
List<WxMaCodeSubmitAuditItem> getCategory() throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取小程序的第三方提交代码的页面配置(仅供第三方开发者代小程序调用).
|
||||
|
||||
@@ -67,13 +67,13 @@ public class WxMaCodeServiceImpl implements WxMaCodeService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WxMaCategory> getCategory() throws WxErrorException {
|
||||
public List<WxMaCodeSubmitAuditItem> getCategory() throws WxErrorException {
|
||||
String responseContent = this.service.get(GET_CATEGORY_URL, null);
|
||||
JsonObject jsonObject = GsonParser.parse(responseContent);
|
||||
boolean hasCategoryList = jsonObject.has("category_list");
|
||||
if (hasCategoryList) {
|
||||
return WxMaGsonBuilder.create().fromJson(jsonObject.getAsJsonArray("category_list"),
|
||||
new TypeToken<List<WxMaCategory>>() {
|
||||
new TypeToken<List<WxMaCodeSubmitAuditItem>>() {
|
||||
}.getType());
|
||||
} else {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user