Skip to main content

WxOpenComponentService

Trait WxOpenComponentService 

Source
pub trait WxOpenComponentService: Send + Sync {
Show 88 methods // Required method fn wx_open_service(&self) -> Option<Arc<dyn WxOpenService>>; // Provided methods fn check_signature( &self, timestamp: &str, nonce: &str, signature: &str, ) -> bool { ... } fn start_push_ticket<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_component_access_token<'life0, 'async_trait>( &'life0 self, _force_refresh: bool, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn post<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _uri: &'life1 str, _post_data: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn post_with_key<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _uri: &'life1 str, _post_data: &'life2 str, _access_token_key: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn post_with_token<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _uri: &'life1 str, _post_data: &'life2 str, _access_token_key: &'life3 str, _access_token: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn get<'life0, 'life1, 'async_trait>( &'life0 self, _uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_with_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _uri: &'life1 str, _access_token_key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn get_pre_auth_code<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_pre_auth_url<'life0, 'life1, 'async_trait>( &'life0 self, _redirect_uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_pre_auth_url_with<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _redirect_uri: &'life1 str, _auth_type: Option<&'life2 str>, _biz_appid: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn get_mobile_pre_auth_url<'life0, 'life1, 'async_trait>( &'life0 self, _redirect_uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_mobile_pre_auth_url_with<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _redirect_uri: &'life1 str, _auth_type: Option<&'life2 str>, _biz_appid: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn get_authorizer_access_token<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _force_refresh: bool, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn route<'life0, 'life1, 'async_trait>( &'life0 self, _message: &'life1 WxOpenXmlMessage, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn wx_open_config_storage(&self) -> Option<Arc<dyn WxOpenConfigStorage>> { ... } fn get_wx_mp_service_by_appid( &self, _app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>> { ... } fn get_wx_ma_service_by_appid( &self, _app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>> { ... } fn get_wx_fast_ma_service_by_appid( &self, _app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>> { ... } fn get_wx_minishop_service_by_appid( &self, _app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>> { ... } fn get_query_auth<'life0, 'life1, 'async_trait>( &'life0 self, _authorization_code: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenQueryAuthResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_authorizer_info<'life0, 'life1, 'async_trait>( &'life0 self, _authorizer_appid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerInfoResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_authorizer_list<'life0, 'async_trait>( &'life0 self, _begin: i32, _len: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerListResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_authorizer_option<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _authorizer_appid: &'life1 str, _option_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerOptionResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn set_authorizer_option<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _authorizer_appid: &'life1 str, _option_name: &'life2 str, _option_value: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn check_signature_with_appid( &self, _app_id: &str, _timestamp: &str, _nonce: &str, _signature: &str, ) -> bool { ... } fn oauth2_get_access_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _code: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOAuth2AccessToken, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn oauth2_refresh_access_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _refresh_token: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOAuth2AccessToken, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn oauth2_build_authorization_url( &self, app_id: &str, redirect_uri: &str, scope: &str, state: &str, ) -> String { ... } fn miniapp_jscode2_session<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _js_code: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Value, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn get_template_draft_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_template_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_template_list_with_type<'life0, 'async_trait>( &'life0 self, _template_type: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn add_to_template<'life0, 'async_trait>( &'life0 self, _draft_id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn add_to_template_with_type<'life0, 'async_trait>( &'life0 self, _draft_id: i64, _template_type: i32, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn delete_template<'life0, 'async_trait>( &'life0 self, _template_id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn create_open_account<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _app_id_type: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenCreateResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn bind_open_account<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _app_id_type: &'life2 str, _open_appid: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<bool, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn unbind_open_account<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _app_id_type: &'life2 str, _open_appid: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<bool, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn get_open_account<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _app_id_type: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenGetResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn have_open<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<WxOpenHaveResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fast_register_weapp<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, _name: &'life1 str, _code: &'life2 str, _code_type: &'life3 str, _legal_persona_wechat: &'life4 str, _legal_persona_name: &'life5 str, _component_phone: &'life6 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait { ... } fn fast_register_weapp_search<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _name: &'life1 str, _legal_persona_wechat: &'life2 str, _legal_persona_name: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn fast_register_personal_weapp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _idname: &'life1 str, _wxuser: &'life2 str, _component_phone: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenRegisterPersonalWeappResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn fast_register_personal_weapp_search<'life0, 'life1, 'async_trait>( &'life0 self, _taskid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenRegisterPersonalWeappResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn fast_register_beta_weapp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _name: &'life1 str, _openid: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenRegisterBetaWeappResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn register_shop<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, _wx_name: &'life1 str, _id_card_name: &'life2 str, _id_card_number: &'life3 str, _channel_id: Option<&'life4 str>, _api_openstore_type: Option<i32>, _auth_page_url: Option<&'life5 str>, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait { ... } fn check_audit_status<'life0, 'life1, 'async_trait>( &'life0 self, _wx_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn check_audit_status_with_appid<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _wx_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn submit_merchant_info<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>( &'life0 self, _app_id: &'life1 str, _subject_type: &'life2 str, _busi_license: &'life3 MinishopBusiLicense, _organization_code_info: Option<&'life4 MinishopOrganizationCodeInfo>, _idcard_info: Option<&'life5 MinishopIdcardInfo>, _super_administrator_info: Option<&'life6 MinishopSuperAdministratorInfo>, _merchant_shortname: Option<&'life7 str>, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait, 'life7: 'async_trait { ... } fn submit_basic_info<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _name_info: &'life2 MinishopNameInfo, _return_info: &'life3 MinishopReturnInfo, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn upload_minishop_image_pic_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _height: i32, _width: i32, _file_path: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopImageUploadResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn get_minishop_categories<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _f_cat_id: i32, ) -> Pin<Box<dyn Future<Output = Result<MinishopCategories, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_minishop_brands<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopBrandList, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_minishop_delivery_template<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopDeliveryTemplateResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_minishop_cat_list<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopShopCatList, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_minishop_delivery_company<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn minishop_create_coupon<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _coupon_info: &'life2 WxMinishopCoupon, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_get_coupon_list<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _start_create_time: &'life2 str, _end_create_time: &'life3 str, _status: i32, _page: i32, _page_size: i32, ) -> Pin<Box<dyn Future<Output = Result<Option<WxMinishopCouponStock>, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn minishop_push_coupon_to_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _open_id: &'life2 str, _coupon_id: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_update_coupon<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _coupon_info: &'life2 WxMinishopCoupon, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_update_coupon_status<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _coupon_id: i32, _status: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn minishop_goods_add_spu<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _spu: &'life2 WxMinishopSpu, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_goods_del_spu<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn minishop_goods_update_spu<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _spu: &'life2 WxMinishopSpu, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_goods_listing_spu<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn minishop_goods_delisting_spu<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn minishop_goods_add_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _sku: &'life2 WxMinishopSku, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_goods_batch_add_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _sku_list: &'life2 [WxMinishopSku], ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_goods_del_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, _out_sku_id: &'life2 str, _sku_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_goods_update_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _sku: &'life2 WxMinishopSku, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_goods_update_sku_price<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, _out_sku_id: &'life2 str, _sku_id: i64, _sale_price: i64, _market_price: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_goods_update_sku_stock<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, _out_sku_id: &'life2 str, _sku_id: i64, _type: i32, _stock_num: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn minishop_common_post<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _url: &'life2 str, _request_param: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn add_limit_discount_goods<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _limit_discount_goods: &'life2 LimitDiscountGoods, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn get_limit_discount_list<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _status: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<LimitDiscountGoods>, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn update_limit_discount_status<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _task_id: i64, _status: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_share_cloud_base_env<'life0, 'life1, 'async_trait>( &'life0 self, _appids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<GetShareCloudBaseEnvResponse, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_tcb_env_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetTcbEnvListResponse, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn change_tcb_env<'life0, 'life1, 'async_trait>( &'life0 self, _env: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn share_cloud_base_env<'life0, 'life1, 'async_trait>( &'life0 self, _request: &'life1 ShareCloudBaseEnvRequest, ) -> Pin<Box<dyn Future<Output = Result<ShareCloudBaseEnvResponse, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn clear_quota_v2<'life0, 'life1, 'async_trait>( &'life0 self, _appid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn apply_set_order_path_info<'life0, 'life1, 'async_trait>( &'life0 self, _info: &'life1 WxOpenMaApplyOrderPathInfo, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn modify_wxa_server_domain<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>( &'life0 self, _action: &'life1 str, _request_domains: &'life2 [String], _ws_request_domains: &'life3 [String], _upload_domains: &'life4 [String], _download_domains: &'life5 [String], _udp_domains: &'life6 [String], _tcp_domains: &'life7 [String], ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaDomainResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait, 'life7: 'async_trait { ... } fn get_domain_confirm_file<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaDomainConfirmFileResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn modify_wxa_jump_domain<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _action: &'life1 str, _domain_list: &'life2 [String], ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn modify_wxa_jump_domain_info<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _action: &'life1 str, _domain_list: &'life2 [String], ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaWebDomainResult, WxErrorException>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... }
}
Expand description

开放平台组件服务(第三方平台核心子服务)。

Required Methods§

Source

fn wx_open_service(&self) -> Option<Arc<dyn WxOpenService>>

持有的门面服务(对应 Java getWxOpenService())。

Rust 以弱引用打破循环(Java new WxOpenComponentServiceImpl(this)), 升级失败(门面已释放)时返回 None

Provided Methods§

Source

fn check_signature(&self, timestamp: &str, nonce: &str, signature: &str) -> bool

校验消息签名(对应 Java checkSignature(String, String, String))。

SHA1(componentToken + timestamp + nonce 排序后无分隔符拼接)与 signature 比较;验签失败或门面缺失时返回 false。

Source

fn start_push_ticket<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

启动 verify ticket 推送服务(对应 Java startPushTicket())。

Source

fn get_component_access_token<'life0, 'async_trait>( &'life0 self, _force_refresh: bool, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取 component_access_token(对应 Java getComponentAccessToken(boolean forceRefresh),开放平台接口调用凭据)。

双检锁缓存:未过期直接返回;否则持锁以 component_appid/component_appsecret/component_verify_ticket 调 api_component_token 刷新。

Source

fn post<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _uri: &'life1 str, _post_data: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

POST 请求(对应 Java post(String, String),默认注入键 component_access_token)。

Source

fn post_with_key<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _uri: &'life1 str, _post_data: &'life2 str, _access_token_key: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

POST 请求(对应 Java post(String, String, String accessTokenKey), 自定义 token 注入键)。

Source

fn post_with_token<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _uri: &'life1 str, _post_data: &'life2 str, _access_token_key: &'life3 str, _access_token: &'life4 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

POST 请求(对应 Java post(String, String, String accessTokenKey, String accessToken),调用方显式传 token,不做自动刷新)。

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, _uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

GET 请求(对应 Java get(String uri),默认注入键 component_access_token)。

Source

fn get_with_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _uri: &'life1 str, _access_token_key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

GET 请求(对应 Java get(String uri, String accessTokenKey))。

Source

fn get_pre_auth_code<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取预授权码(对应 Java WxOpenComponentServiceImpl.createPreAuthUrl 内部 POST API_CREATE_PREAUTHCODE_URLpre_auth_code 字段)。

Source

fn get_pre_auth_url<'life0, 'life1, 'async_trait>( &'life0 self, _redirect_uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取网页授权预授权链接(对应 Java getPreAuthUrl(String redirectUri))。

Source

fn get_pre_auth_url_with<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _redirect_uri: &'life1 str, _auth_type: Option<&'life2 str>, _biz_appid: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

获取网页授权预授权链接(对应 Java getPreAuthUrl(String redirectUri, String authType, String bizAppid))。

Source

fn get_mobile_pre_auth_url<'life0, 'life1, 'async_trait>( &'life0 self, _redirect_uri: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取移动端预授权链接(对应 Java getMobilePreAuthUrl(String redirectUri))。

Source

fn get_mobile_pre_auth_url_with<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _redirect_uri: &'life1 str, _auth_type: Option<&'life2 str>, _biz_appid: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

获取移动端预授权链接(对应 Java getMobilePreAuthUrl(String redirectUri, String authType, String bizAppid))。

Source

fn get_authorizer_access_token<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _force_refresh: bool, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取(刷新)授权方 access_token(对应 Java getAuthorizerAccessToken(String appid, boolean forceRefresh), 三方 token 刷新链:refresh_token 换新 token)。

Source

fn route<'life0, 'life1, 'async_trait>( &'life0 self, _message: &'life1 WxOpenXmlMessage, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

路由第三方平台推送的加密回调消息(对应 Java route(WxOpenXmlMessage wxMessage),POST 回调消息解密 + 分发)。

入参为解密后的 WxOpenXmlMessage(解密经 WxOpenXmlMessage::from_encrypted_xml 完成,对应 Java 调用方先用 fromEncryptedXml 解密再 route 的流程);Wave 2 实现。

Source

fn wx_open_config_storage(&self) -> Option<Arc<dyn WxOpenConfigStorage>>

配置存储(对应 Java getWxOpenConfigStorage(),委托门面)。

门面已释放时返回 None(Java 强引用不可能为空,ADAPTED)。

Source

fn get_wx_mp_service_by_appid( &self, _app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>>

获取指定 appid 的开放平台公众号服务(对应 Java getWxMpServiceByAppid(String appid),双检锁缓存按 appid 装配 WxOpenMpServiceImpl)。

ADAPTED(待依赖接线):wx-rust-open 尚未依赖 wx-rust-mp,恒返回 None;Wave 2+ 接线方案:Cargo.toml 引入 wx-rust-mp 后以 Arc<dyn WxMpService> 装配 WxOpenMpService,调用方 downcast_arc::<dyn WxMpService>() 取服务,本签名不变。

Source

fn get_wx_ma_service_by_appid( &self, _app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>>

获取指定 appid 的开放平台小程序服务(对应 Java getWxMaServiceByAppid(String appid),继承一般小程序服务能力)。

接线说明同 Self::get_wx_mp_service_by_appid(待依赖接线, 恒返回 None)。

Source

fn get_wx_fast_ma_service_by_appid( &self, _app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>>

获取指定 appid 的快速创建的小程序服务(对应 Java getWxFastMaServiceByAppid(String appid))。

Java @Deprecated(2021-06-23:本接口原有方法并非仅快速创建小程序的 专用接口,请使用 WxOpenMaService.getBasicService())。接线说明同 Self::get_wx_mp_service_by_appid(恒返回 None)。

Source

fn get_wx_minishop_service_by_appid( &self, _app_id: &str, ) -> Option<Arc<dyn Any + Send + Sync>>

获取指定 appid 的小商店服务(对应 Java getWxMinishopServiceByAppid(String appid))。

Wave 5 已接线:实现侧按 appid 双检锁缓存装配 [crate::api::r#impl::WxOpenMinishopServiceImpl](镜像 Java 静态 WX_OPEN_MINISHOP_SERVICE_MAP);返回值经 downcast 下转(本 trait 默认实现仍为 None,由组件实现覆写)。

Source

fn get_query_auth<'life0, 'life1, 'async_trait>( &'life0 self, _authorization_code: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenQueryAuthResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

使用授权码换取公众号或小程序的接口调用凭据和授权信息(对应 Java getQueryAuth(String authorizationCode))。

成功后回写授权方 access_token/refresh_token 到配置存储 (updateAuthorizerAccessToken/updateAuthorizerRefreshToken)。

Source

fn get_authorizer_info<'life0, 'life1, 'async_trait>( &'life0 self, _authorizer_appid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerInfoResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取授权方的帐号基本信息(对应 Java getAuthorizerInfo(String authorizerAppid))。

Source

fn get_authorizer_list<'life0, 'async_trait>( &'life0 self, _begin: i32, _len: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerListResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取所有授权方列表(对应 Java getAuthorizerList(int begin, int len))。

成功后将列表中的 authorizer_appid/refresh_token 回写配置存储。

Source

fn get_authorizer_option<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _authorizer_appid: &'life1 str, _option_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenAuthorizerOptionResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

获取授权方的选项设置信息(对应 Java getAuthorizerOption(String authorizerAppid, String optionName), 以授权方 access_token 为 key 调用)。

Source

fn set_authorizer_option<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _authorizer_appid: &'life1 str, _option_name: &'life2 str, _option_value: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

设置授权方的选项信息(对应 Java setAuthorizerOption(String authorizerAppid, String optionName, String optionValue))。

Source

fn check_signature_with_appid( &self, _app_id: &str, _timestamp: &str, _nonce: &str, _signature: &str, ) -> bool

校验消息签名(对应 Java checkSignature(String appid, String timestamp, String nonce, String signature))。

Java 实现恒返回 false(appid 维度签名未实现),原样镜像。

Source

fn oauth2_get_access_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _code: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOAuth2AccessToken, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

用 code 换取 oauth2 的 access token(对应 Java oauth2getAccessToken (String appid, String code))。

Java @Deprecated(2021-05-21:请使用 getWxMpServiceByAppid(mpAppId).getOAuth2Service().getAccessToken(code))。

Source

fn oauth2_refresh_access_token<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _refresh_token: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOAuth2AccessToken, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

刷新 oauth2 的 access token(对应 Java oauth2refreshAccessToken(String appid, String refreshToken))。

Source

fn oauth2_build_authorization_url( &self, app_id: &str, redirect_uri: &str, scope: &str, state: &str, ) -> String

构建 oauth2 授权链接(对应 Java oauth2buildAuthorizationUrl(String appid, String redirectUri, String scope, String state))。

Java @Deprecated(2021-05-21,见 Self::oauth2_get_access_token)。 纯字符串构建(redirect_uri 经 encodeURIComponent 语义编码),不抛错。

Source

fn miniapp_jscode2_session<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _js_code: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Value, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小程序登录 code 换 session(对应 Java miniappJscode2Session(String appId, String jsCode))。

ADAPTED:Java 返回 WxMaJscode2SessionResult(wx-rust-miniapp 的 bean,open 模块暂不依赖),Rust 返回解析后的 serde_json::Value,接线后换型。

Source

fn get_template_draft_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取草稿箱内的所有临时代码草稿(对应 Java getTemplateDraftList())。

Java 无 draft_list 字段时返回 null → Ok(None) 镜像。

Source

fn get_template_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取代码模版库中的所有小程序代码模版(对应 Java getTemplateList(), Java @Deprecated,请使用 Self::get_template_list_with_type)。

Source

fn get_template_list_with_type<'life0, 'async_trait>( &'life0 self, _template_type: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取代码模版库中的所有小程序代码模版(对应 Java getTemplateList(Integer templateType)template_type 可空, 默认全部,0 普通模板,1 标准模板)。

Source

fn add_to_template<'life0, 'async_trait>( &'life0 self, _draft_id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

将草稿箱的草稿选为小程序代码模版(对应 Java addToTemplate(long draftId),Java @Deprecated,请使用 Self::add_to_template_with_type)。

Source

fn add_to_template_with_type<'life0, 'async_trait>( &'life0 self, _draft_id: i64, _template_type: i32, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

将草稿添加到代码模板库(对应 Java addToTemplate(long draftId, int templateType)template_type:普通模板 0,标准模板 1)。

Source

fn delete_template<'life0, 'async_trait>( &'life0 self, _template_id: i64, ) -> Pin<Box<dyn Future<Output = Result<(), WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

删除指定小程序代码模版(对应 Java deleteTemplate(long templateId))。

Source

fn create_open_account<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _app_id_type: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenCreateResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

创建开放平台帐号并绑定公众号/小程序(对应 Java createOpenAccount(String appId, String appIdType)app_id_type:mp-公众号 / mini-小程序)。

待接线:Java 经 openAccountServicePost 走代 mp/ma 子服务的 post (getWxMpServiceByAppid/getWxMaServiceByAppid),Rust 侧子服务 桥接尚未接线(恒 None)→ 返回未实现错误。

Source

fn bind_open_account<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _app_id_type: &'life2 str, _open_appid: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<bool, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

将公众号/小程序绑定到开放平台帐号下(对应 Java bindOpenAccount(String appId, String appIdType, String openAppid))。

接线说明同 Self::create_open_account

Source

fn unbind_open_account<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _app_id_type: &'life2 str, _open_appid: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<bool, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

将公众号/小程序从开放平台帐号下解绑(对应 Java unbindOpenAccount(String appId, String appIdType, String openAppid))。

接线说明同 Self::create_open_account

Source

fn get_open_account<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _app_id_type: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenGetResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

获取公众号/小程序所绑定的开放平台帐号(对应 Java getOpenAccount(String appId, String appIdType))。

接线说明同 Self::create_open_account

Source

fn have_open<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<WxOpenHaveResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

查询公众号/小程序是否绑定 open 帐号(对应 Java haveOpen(), 走 component_access_token,注入键 “access_token”)。

Source

fn fast_register_weapp<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>( &'life0 self, _name: &'life1 str, _code: &'life2 str, _code_type: &'life3 str, _legal_persona_wechat: &'life4 str, _legal_persona_name: &'life5 str, _component_phone: &'life6 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait,

第三方平台快速创建小程序(对应 Java fastRegisterWeapp(String name, String code, String codeType, String legalPersonaWechat, String legalPersonaName, String componentPhone))。

查询第三方平台快速创建小程序的任务状态(对应 Java fastRegisterWeappSearch(String name, String legalPersonaWechat, String legalPersonaName))。

Source

fn fast_register_personal_weapp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _idname: &'life1 str, _wxuser: &'life2 str, _component_phone: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenRegisterPersonalWeappResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

快速创建个人小程序(对应 Java fastRegisterPersonalWeapp(String idname, String wxuser, String componentPhone))。

查询个人小程序注册任务状态(对应 Java fastRegisterPersonalWeappSearch(String taskid))。

Source

fn fast_register_beta_weapp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _name: &'life1 str, _openid: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenRegisterBetaWeappResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

注册试用小程序(对应 Java fastRegisterBetaWeapp(String name, String openid);注入键 “access_token”)。

Source

fn register_shop<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, _wx_name: &'life1 str, _id_card_name: &'life2 str, _id_card_number: &'life3 str, _channel_id: Option<&'life4 str>, _api_openstore_type: Option<i32>, _auth_page_url: Option<&'life5 str>, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

注册小商店账号(对应 Java registerShop(String wxName, String idCardName, String idCardNumber, String channelId, Integer apiOpenstoreType, String authPageUrl))。

Source

fn check_audit_status<'life0, 'life1, 'async_trait>( &'life0 self, _wx_name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

异步状态查询(对应 Java checkAuditStatus(String wxName), component_access_token 查询小商店注册状态)。

Source

fn check_audit_status_with_appid<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _wx_name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

已获取小商店 appId 后以授权方 access_token 查询状态(对应 Java checkAuditStatus(String appId, String wxName))。

Source

fn submit_merchant_info<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>( &'life0 self, _app_id: &'life1 str, _subject_type: &'life2 str, _busi_license: &'life3 MinishopBusiLicense, _organization_code_info: Option<&'life4 MinishopOrganizationCodeInfo>, _idcard_info: Option<&'life5 MinishopIdcardInfo>, _super_administrator_info: Option<&'life6 MinishopSuperAdministratorInfo>, _merchant_shortname: Option<&'life7 str>, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait, 'life7: 'async_trait,

提交小商店商户信息(对应 Java submitMerchantInfo(String appId, String subjectType, MinishopBusiLicense busiLicense, MinishopOrganizationCodeInfo organizationCodeInfo, MinishopIdcardInfo idcardInfo, MinishopSuperAdministratorInfo superAdministratorInfo, String merchantShoprtName),授权方 access_token)。

Source

fn submit_basic_info<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _name_info: &'life2 MinishopNameInfo, _return_info: &'life3 MinishopReturnInfo, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

提交小商店基础信息(对应 Java submitBasicInfo(String appId, MinishopNameInfo nameInfo, MinishopReturnInfo returnInfo), 授权方 access_token)。

Source

fn upload_minishop_image_pic_file<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _height: i32, _width: i32, _file_path: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopImageUploadResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

上传小商店图片素材(对应 Java uploadMinishopImagePicFile(String appId, Integer height, Integer width, File file))。

ADAPTED:Java File 入参 → Rust 文件路径 &str;实际 multipart 上传经门面 crate::api::WxOpenService::upload_minishop_media_file (MinishopUploadRequestExecutor)。

Source

fn get_minishop_categories<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _f_cat_id: i32, ) -> Pin<Box<dyn Future<Output = Result<MinishopCategories, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店的类目详情(对应 Java getMinishopCategories(String appId, Integer fCatId)f_cat_id 可先填 0 获取根部类目)。

Source

fn get_minishop_brands<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopBrandList, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店品牌信息(对应 Java getMinishopBrands(String appId))。

Source

fn get_minishop_delivery_template<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopDeliveryTemplateResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店运费模版信息(对应 Java getMinishopDeliveryTemplate(String appId))。

Source

fn get_minishop_cat_list<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<MinishopShopCatList, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店商品分类信息(对应 Java getMinishopCatList(String appId))。

Source

fn get_minishop_delivery_company<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取小商店的快递公司列表(对应 Java getMinishopDeliveryCompany(String appId),返回 WxMinishopAddGoodsSpuResult<List<WxMinishopDeliveryCompany>>; Rust 侧 WxMinishopAddGoodsSpuResult.dataserde_json::Value 承载 company_list 数组,ADAPTED)。

Source

fn minishop_create_coupon<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _coupon_info: &'life2 WxMinishopCoupon, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

创建小商店优惠券(对应 Java minishopCreateCoupon(String appId, WxMinishopCoupon couponInfo),返回 couponId)。

Source

fn minishop_get_coupon_list<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _start_create_time: &'life2 str, _end_create_time: &'life3 str, _status: i32, _page: i32, _page_size: i32, ) -> Pin<Box<dyn Future<Output = Result<Option<WxMinishopCouponStock>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

获取小商店的优惠券信息(对应 Java minishopGetCouponList(String appId, String startCreateTime, String endCreateTime, Integer status, Integer page, Integer pageSize))。

Java 实现恒 return nullOk(None) 镜像。

Source

fn minishop_push_coupon_to_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _open_id: &'life2 str, _coupon_id: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

将优惠券发送给某人(对应 Java minishopPushCouponToUser(String appid, String openId, Integer couponId))。

Source

fn minishop_update_coupon<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _coupon_info: &'life2 WxMinishopCoupon, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

更新商城优惠券(对应 Java minishopUpdateCoupon(String appId, WxMinishopCoupon couponInfo),返回 couponId)。

Source

fn minishop_update_coupon_status<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _coupon_id: i32, _status: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

更新优惠券状态(对应 Java minishopUpdateCouponStatus(String appId, Integer couponId, Integer status);1 创建 2 生效 4 作废 5 删除)。

Source

fn minishop_goods_add_spu<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _spu: &'life2 WxMinishopSpu, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店添加商品(对应 Java minishopGoodsAddSpu(String appId, WxMinishopSpu spu),添加后需上架并过审才展示)。

Source

fn minishop_goods_del_spu<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

小商店删除商品(对应 Java minishopGoodsDelSpu(String appId, Long productId, Long outProductId),直接删除不进回收站)。

Source

fn minishop_goods_update_spu<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _spu: &'life2 WxMinishopSpu, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店更新商品(对应 Java minishopGoodsUpdateSpu(String appId, WxMinishopSpu spu),更新入草稿箱,需上架过审)。

Source

fn minishop_goods_listing_spu<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

上架商品(对应 Java minishopGoodsListingSpu(String appId, Long productId, Long outProductId))。

Source

fn minishop_goods_delisting_spu<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

下架商品(对应 Java minishopGoodsDelistingSpu(String appId, Long productId, Long outProductId))。

Source

fn minishop_goods_add_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _sku: &'life2 WxMinishopSku, ) -> Pin<Box<dyn Future<Output = Result<WxMinishopAddGoodsSpuResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店新增 sku 信息(对应 Java minishiopGoodsAddSku(String appId, WxMinishopSku sku),Java 方法名拼写为 minishop + Goods 少 i)。

Source

fn minishop_goods_batch_add_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _sku_list: &'life2 [WxMinishopSku], ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店批量新增 sku 信息(对应 Java minishopGoodsBatchAddSku(String appId, List<WxMinishopSku> skuList))。

Source

fn minishop_goods_del_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, _out_sku_id: &'life2 str, _sku_id: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店删除 sku 信息(对应 Java minishopGoodsDelSku(String appId, Long productId, Long outProductId, String outSkuId, Long skuId))。

Source

fn minishop_goods_update_sku<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _sku: &'life2 WxMinishopSku, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店更新 sku(对应 Java minishopGoodsUpdateSku(String appId, WxMinishopSku sku))。

Source

fn minishop_goods_update_sku_price<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, _out_sku_id: &'life2 str, _sku_id: i64, _sale_price: i64, _market_price: i64, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店更新 sku 价格(对应 Java minishopGoodsUpdateSkuPrice(String appId, Long productId, Long outProductId, String outSkuId, Long skuId, Long salePrice, Long marketPrice))。

注意:Java 实现将 sale_price/market_price 均写成 outSkuId (WxJava 上游 bug),严格镜像(见 impl 注释)。

Source

fn minishop_goods_update_sku_stock<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _product_id: i64, _out_product_id: i64, _out_sku_id: &'life2 str, _sku_id: i64, _type: i32, _stock_num: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

小商店更新 sku 库存(对应 Java minishopGoodsUpdateSkuStock(String appId, Long productId, Long outProductId, String outSkuId, Long skuId, Integer type, Integer stockNum))。

Source

fn minishop_common_post<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _app_id: &'life1 str, _url: &'life2 str, _request_param: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Option<String>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

小商店通用 Post 接口(对应 Java minishopCommonPost(String appId, String url, String requestParam))。

Java 实现恒 return nullOk(None) 镜像。

Source

fn add_limit_discount_goods<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _app_id: &'life1 str, _limit_discount_goods: &'life2 LimitDiscountGoods, ) -> Pin<Box<dyn Future<Output = Result<i32, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

添加抢购任务(对应 Java addLimitDiscountGoods(String appId, LimitDiscountGoods limitDiscountGoods),返回 taskId)。

Source

fn get_limit_discount_list<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _status: Option<i32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<LimitDiscountGoods>, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

获取抢购任务列表(对应 Java getLimitDiscountList(String appId, Integer status);status 0 未结束 1 已结束,不填则都拉取)。

Source

fn update_limit_discount_status<'life0, 'life1, 'async_trait>( &'life0 self, _app_id: &'life1 str, _task_id: i64, _status: i32, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

修改抢购任务状态(对应 Java updateLimitDiscountStatus(String appId, Long taskId, Integer status),结束后不可再开启)。

Source

fn get_share_cloud_base_env<'life0, 'life1, 'async_trait>( &'life0 self, _appids: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<GetShareCloudBaseEnvResponse, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

查询环境共享信息(对应 Java getShareCloudBaseEnv(List<String> appids))。

Source

fn get_tcb_env_list<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetTcbEnvListResponse, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取环境信息(对应 Java getTcbEnvList())。

Source

fn change_tcb_env<'life0, 'life1, 'async_trait>( &'life0 self, _env: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

转换云环境(对应 Java changeTcbEnv(String env))。

Source

fn share_cloud_base_env<'life0, 'life1, 'async_trait>( &'life0 self, _request: &'life1 ShareCloudBaseEnvRequest, ) -> Pin<Box<dyn Future<Output = Result<ShareCloudBaseEnvResponse, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

环境共享(对应 Java shareCloudBaseEnv(ShareCloudBaseEnvRequest request))。

Source

fn clear_quota_v2<'life0, 'life1, 'async_trait>( &'life0 self, _appid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

使用 AppSecret 重置第三方平台 API 调用次数(对应 Java clearQuotaV2(String appid),裸 post 不经 token 注入)。

Source

fn apply_set_order_path_info<'life0, 'life1, 'async_trait>( &'life0 self, _info: &'life1 WxOpenMaApplyOrderPathInfo, ) -> Pin<Box<dyn Future<Output = Result<WxOpenResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

申请设置订单页 path 信息(对应 Java applySetOrderPathInfo(WxOpenMa ApplyOrderPathInfo info),一次提交不超过 100 个 appid)。

Source

fn modify_wxa_server_domain<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>( &'life0 self, _action: &'life1 str, _request_domains: &'life2 [String], _ws_request_domains: &'life3 [String], _upload_domains: &'life4 [String], _download_domains: &'life5 [String], _udp_domains: &'life6 [String], _tcp_domains: &'life7 [String], ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaDomainResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait, 'life6: 'async_trait, 'life7: 'async_trait,

设置第三方平台服务器域名(对应 Java modifyWxaServerDomain(String action, List<String> requestDomains, ...);action:add 添加 / delete 删除 / set 覆盖 / get 获取,get 时不需要域名参数)。

Source

fn get_domain_confirm_file<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaDomainConfirmFileResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

获取第三方平台业务域名校验文件(对应 Java getDomainConfirmFile())。

Source

fn modify_wxa_jump_domain<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _action: &'life1 str, _domain_list: &'life2 [String], ) -> Pin<Box<dyn Future<Output = Result<String, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

设置第三方平台业务域名(对应 Java modifyWxaJumpDomain(String action, List<String> domainList),直接返回字符串)。

Source

fn modify_wxa_jump_domain_info<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _action: &'life1 str, _domain_list: &'life2 [String], ) -> Pin<Box<dyn Future<Output = Result<WxOpenMaWebDomainResult, WxErrorException>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

设置第三方平台业务域名(对应 Java modifyWxaJumpDomainInfo(String action, List<String> domainList),解析为 webview domain 信息)。

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§