|
5 | 5 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.CANCEL_AUDIT_URL; |
6 | 6 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.DELETE_LIMIT_TASK_URL; |
7 | 7 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.LIST_LIMIT_TASK_URL; |
| 8 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_ADD_PRODUCT_THIRD_PARTY_SOURCE_URL; |
8 | 9 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_ADD_URL; |
9 | 10 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_AUDIT_FREE_UPDATE_URL; |
| 11 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_AUDIT_STRATEGY_GET_URL; |
| 12 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_AUDIT_STRATEGY_SET_URL; |
| 13 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_BEGIN_TIMING_SALE_URL; |
| 14 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_CANCEL_TIMING_SALE_URL; |
| 15 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_CATEGORY_CLASSIFY_URL; |
| 16 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_CATEGORY_PRE_CHECK_URL; |
10 | 17 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_DELISTING_URL; |
11 | 18 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_DEL_URL; |
| 19 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_EXTERNAL_PRODUCT_MAPPING_NEW_URL; |
| 20 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_EXTERNAL_PRODUCT_MAPPING_URL; |
| 21 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_AUDIT_QUOTA_URL; |
12 | 22 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_BATCH_URL; |
| 23 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_FLOW_URL; |
13 | 24 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_STOCK_URL; |
14 | 25 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_GET_URL; |
15 | 26 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_H5URL_URL; |
16 | 27 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_LISTING_URL; |
17 | 28 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_LIST_URL; |
| 29 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_PRODUCT_BRAND_RECOMMEND_URL; |
18 | 30 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_QRCODE_URL; |
| 31 | +import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_SCHEME_URL; |
19 | 32 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_TAGLINK_URL; |
20 | 33 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_UPDATE_STOCK_URL; |
21 | 34 | import static me.chanjar.weixin.channel.constant.WxChannelApiUrlConstants.Spu.SPU_UPDATE_URL; |
|
29 | 42 | import me.chanjar.weixin.channel.bean.limit.LimitTaskListParam; |
30 | 43 | import me.chanjar.weixin.channel.bean.limit.LimitTaskListResponse; |
31 | 44 | import me.chanjar.weixin.channel.bean.limit.LimitTaskParam; |
| 45 | +import me.chanjar.weixin.channel.bean.product.AddProductThirdPartySourceParam; |
| 46 | +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingNewParam; |
| 47 | +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingNewResponse; |
| 48 | +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingParam; |
| 49 | +import me.chanjar.weixin.channel.bean.product.ExternalProductMappingResponse; |
| 50 | +import me.chanjar.weixin.channel.bean.product.ProductAuditQuotaResponse; |
| 51 | +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategyResponse; |
| 52 | +import me.chanjar.weixin.channel.bean.product.ProductAuditStrategySetParam; |
| 53 | +import me.chanjar.weixin.channel.bean.product.ProductBrandRecommendParam; |
| 54 | +import me.chanjar.weixin.channel.bean.product.ProductBrandRecommendResponse; |
| 55 | +import me.chanjar.weixin.channel.bean.product.ProductCategoryClassifyParam; |
| 56 | +import me.chanjar.weixin.channel.bean.product.ProductCategoryClassifyResponse; |
| 57 | +import me.chanjar.weixin.channel.bean.product.ProductCategoryPreCheckParam; |
| 58 | +import me.chanjar.weixin.channel.bean.product.ProductCategoryPreCheckResponse; |
| 59 | +import me.chanjar.weixin.channel.bean.product.ProductSchemeParam; |
| 60 | +import me.chanjar.weixin.channel.bean.product.ProductSchemeResponse; |
| 61 | +import me.chanjar.weixin.channel.bean.product.ProductStockFlowParam; |
| 62 | +import me.chanjar.weixin.channel.bean.product.ProductStockFlowResponse; |
| 63 | +import me.chanjar.weixin.channel.bean.product.ProductTimingSaleParam; |
32 | 64 | import me.chanjar.weixin.channel.bean.product.SkuStockBatchParam; |
33 | 65 | import me.chanjar.weixin.channel.bean.product.SkuStockBatchResponse; |
34 | 66 | import me.chanjar.weixin.channel.bean.product.SkuStockParam; |
@@ -211,6 +243,101 @@ public ProductTagLinkResponse getProductTagLink(String productId) throws WxError |
211 | 243 | return ResponseUtils.decode(resJson, ProductTagLinkResponse.class); |
212 | 244 | } |
213 | 245 |
|
| 246 | + @Override |
| 247 | + public ProductSchemeResponse getProductScheme(ProductSchemeParam param) throws WxErrorException { |
| 248 | + String reqJson = JsonUtils.encode(param); |
| 249 | + String resJson = shopService.post(SPU_SCHEME_URL, reqJson); |
| 250 | + return ResponseUtils.decode(resJson, ProductSchemeResponse.class); |
| 251 | + } |
| 252 | + |
| 253 | + @Override |
| 254 | + public ProductCategoryClassifyResponse classifyProductCategory(ProductCategoryClassifyParam param) |
| 255 | + throws WxErrorException { |
| 256 | + String reqJson = JsonUtils.encode(param); |
| 257 | + String resJson = shopService.post(SPU_CATEGORY_CLASSIFY_URL, reqJson); |
| 258 | + return ResponseUtils.decode(resJson, ProductCategoryClassifyResponse.class); |
| 259 | + } |
| 260 | + |
| 261 | + @Override |
| 262 | + public WxChannelBaseResponse beginTimingSale(ProductTimingSaleParam param) throws WxErrorException { |
| 263 | + String reqJson = JsonUtils.encode(param); |
| 264 | + String resJson = shopService.post(SPU_BEGIN_TIMING_SALE_URL, reqJson); |
| 265 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 266 | + } |
| 267 | + |
| 268 | + @Override |
| 269 | + public WxChannelBaseResponse cancelTimingSale(String productId) throws WxErrorException { |
| 270 | + String reqJson = "{\"product_id\":\"" + productId + "\"}"; |
| 271 | + String resJson = shopService.post(SPU_CANCEL_TIMING_SALE_URL, reqJson); |
| 272 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 273 | + } |
| 274 | + |
| 275 | + @Override |
| 276 | + public ExternalProductMappingResponse externalProductMapping(ExternalProductMappingParam param) |
| 277 | + throws WxErrorException { |
| 278 | + String reqJson = JsonUtils.encode(param); |
| 279 | + String resJson = shopService.post(SPU_EXTERNAL_PRODUCT_MAPPING_URL, reqJson); |
| 280 | + return ResponseUtils.decode(resJson, ExternalProductMappingResponse.class); |
| 281 | + } |
| 282 | + |
| 283 | + @Override |
| 284 | + public ProductCategoryPreCheckResponse categoryPreCheck(ProductCategoryPreCheckParam param) |
| 285 | + throws WxErrorException { |
| 286 | + String reqJson = JsonUtils.encode(param); |
| 287 | + String resJson = shopService.post(SPU_CATEGORY_PRE_CHECK_URL, reqJson); |
| 288 | + return ResponseUtils.decode(resJson, ProductCategoryPreCheckResponse.class); |
| 289 | + } |
| 290 | + |
| 291 | + @Override |
| 292 | + public ProductAuditStrategyResponse getProductAuditStrategy() throws WxErrorException { |
| 293 | + String resJson = shopService.post(SPU_AUDIT_STRATEGY_GET_URL, "{}"); |
| 294 | + return ResponseUtils.decode(resJson, ProductAuditStrategyResponse.class); |
| 295 | + } |
| 296 | + |
| 297 | + @Override |
| 298 | + public WxChannelBaseResponse setProductAuditStrategy(ProductAuditStrategySetParam param) throws WxErrorException { |
| 299 | + String reqJson = JsonUtils.encode(param); |
| 300 | + String resJson = shopService.post(SPU_AUDIT_STRATEGY_SET_URL, reqJson); |
| 301 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 302 | + } |
| 303 | + |
| 304 | + @Override |
| 305 | + public ProductAuditQuotaResponse getProductAuditQuota() throws WxErrorException { |
| 306 | + String resJson = shopService.post(SPU_GET_AUDIT_QUOTA_URL, "{}"); |
| 307 | + return ResponseUtils.decode(resJson, ProductAuditQuotaResponse.class); |
| 308 | + } |
| 309 | + |
| 310 | + @Override |
| 311 | + public ExternalProductMappingNewResponse externalProductMappingNew(ExternalProductMappingNewParam param) |
| 312 | + throws WxErrorException { |
| 313 | + String reqJson = JsonUtils.encode(param); |
| 314 | + String resJson = shopService.post(SPU_EXTERNAL_PRODUCT_MAPPING_NEW_URL, reqJson); |
| 315 | + return ResponseUtils.decode(resJson, ExternalProductMappingNewResponse.class); |
| 316 | + } |
| 317 | + |
| 318 | + @Override |
| 319 | + public ProductBrandRecommendResponse productBrandRecommend(ProductBrandRecommendParam param) |
| 320 | + throws WxErrorException { |
| 321 | + String reqJson = JsonUtils.encode(param); |
| 322 | + String resJson = shopService.post(SPU_PRODUCT_BRAND_RECOMMEND_URL, reqJson); |
| 323 | + return ResponseUtils.decode(resJson, ProductBrandRecommendResponse.class); |
| 324 | + } |
| 325 | + |
| 326 | + @Override |
| 327 | + public WxChannelBaseResponse addProductThirdPartySource(AddProductThirdPartySourceParam param) |
| 328 | + throws WxErrorException { |
| 329 | + String reqJson = JsonUtils.encode(param); |
| 330 | + String resJson = shopService.post(SPU_ADD_PRODUCT_THIRD_PARTY_SOURCE_URL, reqJson); |
| 331 | + return ResponseUtils.decode(resJson, WxChannelBaseResponse.class); |
| 332 | + } |
| 333 | + |
| 334 | + @Override |
| 335 | + public ProductStockFlowResponse getStockFlow(ProductStockFlowParam param) throws WxErrorException { |
| 336 | + String reqJson = JsonUtils.encode(param); |
| 337 | + String resJson = shopService.post(SPU_GET_STOCK_FLOW_URL, reqJson); |
| 338 | + return ResponseUtils.decode(resJson, ProductStockFlowResponse.class); |
| 339 | + } |
| 340 | + |
214 | 341 | @Override |
215 | 342 | public LimitTaskAddResponse addLimitTask(LimitTaskParam param) throws WxErrorException { |
216 | 343 | String reqJson = JsonUtils.encode(param); |
|
0 commit comments