|
1 | 1 | package me.chanjar.weixin.channel.api.impl; |
2 | 2 |
|
3 | | -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.ADD_CATEGORY_URL; |
4 | | -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.AVAILABLE_CATEGORY_URL; |
5 | | -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.CANCEL_CATEGORY_AUDIT_URL; |
6 | | -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.GET_CATEGORY_AUDIT_URL; |
7 | | -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.GET_CATEGORY_DETAIL_URL; |
8 | | -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.LIST_ALL_CATEGORY_URL; |
9 | | -import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.LIST_PASS_CATEGORY_URL; |
10 | | - |
11 | 3 | import java.util.Collections; |
12 | 4 | import java.util.List; |
13 | 5 | import lombok.extern.slf4j.Slf4j; |
|
17 | 9 | import me.chanjar.weixin.channel.bean.audit.CategoryAuditInfo; |
18 | 10 | import me.chanjar.weixin.channel.bean.audit.CategoryAuditRequest; |
19 | 11 | import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse; |
20 | | -import me.chanjar.weixin.channel.bean.category.CategoryDetailResult; |
21 | | -import me.chanjar.weixin.channel.bean.category.CategoryQualificationResponse; |
22 | | -import me.chanjar.weixin.channel.bean.category.PassCategoryResponse; |
23 | | -import me.chanjar.weixin.channel.bean.category.ShopCategory; |
24 | | -import me.chanjar.weixin.channel.bean.category.ShopCategoryResponse; |
| 12 | +import me.chanjar.weixin.channel.bean.category.*; |
25 | 13 | import me.chanjar.weixin.channel.util.JsonUtils; |
26 | 14 | import me.chanjar.weixin.channel.util.ResponseUtils; |
27 | 15 | import me.chanjar.weixin.common.error.WxErrorException; |
28 | 16 | import me.chanjar.weixin.common.util.http.SimpleGetRequestExecutor; |
29 | 17 | import me.chanjar.weixin.common.util.http.SimplePostRequestExecutor; |
30 | 18 |
|
| 19 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Category.*; |
| 20 | + |
31 | 21 | /** |
32 | 22 | * 视频号小店 商品类目相关接口 |
33 | 23 | * |
@@ -135,4 +125,15 @@ public PassCategoryResponse listPassCategory() throws WxErrorException { |
135 | 125 | return ResponseUtils.decode(resJson, PassCategoryResponse.class); |
136 | 126 | } |
137 | 127 |
|
| 128 | + @Override |
| 129 | + public RelationCategoryResponse listRelationCategory(Boolean isFilterStatus, Integer status) throws WxErrorException { |
| 130 | + RelationCategoryRequest request = new RelationCategoryRequest( |
| 131 | + isFilterStatus != null ? isFilterStatus : false, |
| 132 | + status != null ? status : 0 |
| 133 | + ); |
| 134 | + String reqJson = JsonUtils.encode(request); |
| 135 | + String resJson = shopService.post(LIST_RELATION_CATEGORY_URL, reqJson); |
| 136 | + return ResponseUtils.decode(resJson, RelationCategoryResponse.class); |
| 137 | + } |
| 138 | + |
138 | 139 | } |
0 commit comments