1use std::any::Any;
28use std::sync::Arc;
29
30use async_trait::async_trait;
31
32use wx_rust_common::bean::oauth2::WxOAuth2AccessToken;
33use wx_rust_common::bean::result::WxMinishopImageUploadResult;
34use wx_rust_common::error::WxErrorException;
35
36use crate::api::WxOpenService;
37use crate::bean::message::WxOpenXmlMessage;
38use crate::bean::{
39 GetShareCloudBaseEnvResponse, GetTcbEnvListResponse, LimitDiscountGoods, MinishopBrandList,
40 MinishopBusiLicense, MinishopCategories, MinishopDeliveryTemplateResult, MinishopIdcardInfo,
41 MinishopNameInfo, MinishopOrganizationCodeInfo, MinishopReturnInfo, MinishopShopCatList,
42 MinishopSuperAdministratorInfo, ShareCloudBaseEnvRequest, ShareCloudBaseEnvResponse,
43 WxMinishopAddGoodsSpuResult, WxMinishopCoupon, WxMinishopCouponStock, WxMinishopSku,
44 WxMinishopSpu, WxOpenAuthorizerInfoResult, WxOpenAuthorizerListResult,
45 WxOpenAuthorizerOptionResult, WxOpenCreateResult, WxOpenGetResult, WxOpenHaveResult,
46 WxOpenMaApplyOrderPathInfo, WxOpenMaCodeTemplate, WxOpenMaDomainConfirmFileResult,
47 WxOpenMaDomainResult, WxOpenMaWebDomainResult, WxOpenQueryAuthResult,
48 WxOpenRegisterBetaWeappResult, WxOpenRegisterPersonalWeappResult, WxOpenResult,
49};
50use crate::config::WxOpenConfigStorage;
51
52#[async_trait]
54pub trait WxOpenComponentService: Send + Sync {
55 fn wx_open_service(&self) -> Option<Arc<dyn WxOpenService>>;
60
61 fn check_signature(&self, timestamp: &str, nonce: &str, signature: &str) -> bool {
66 use wx_rust_common::util::crypto::Sha1;
67 match self.wx_open_service() {
68 Some(svc) => {
69 let config = svc.wx_open_config_storage();
70 let token = config.component_token().unwrap_or_default();
71 match Sha1::digest(&[token.as_str(), timestamp, nonce]) {
72 Ok(s) => s == signature,
73 Err(_) => false,
74 }
75 }
76 None => false,
77 }
78 }
79
80 async fn start_push_ticket(&self) -> Result<(), WxErrorException> {
82 Err(WxErrorException::from_code(
83 -99,
84 "start_push_ticket 未实现(Wave 2)",
85 ))
86 }
87
88 async fn get_component_access_token(
95 &self,
96 _force_refresh: bool,
97 ) -> Result<String, WxErrorException> {
98 Err(WxErrorException::from_code(
99 -99,
100 "get_component_access_token 未实现(Wave 2)",
101 ))
102 }
103
104 async fn post(&self, _uri: &str, _post_data: &str) -> Result<String, WxErrorException> {
107 Err(WxErrorException::from_code(-99, "post 未实现(Wave 2)"))
108 }
109
110 async fn post_with_key(
113 &self,
114 _uri: &str,
115 _post_data: &str,
116 _access_token_key: &str,
117 ) -> Result<String, WxErrorException> {
118 Err(WxErrorException::from_code(
119 -99,
120 "post_with_key 未实现(Wave 2)",
121 ))
122 }
123
124 async fn post_with_token(
127 &self,
128 _uri: &str,
129 _post_data: &str,
130 _access_token_key: &str,
131 _access_token: &str,
132 ) -> Result<String, WxErrorException> {
133 Err(WxErrorException::from_code(
134 -99,
135 "post_with_token 未实现(Wave 2)",
136 ))
137 }
138
139 async fn get(&self, _uri: &str) -> Result<String, WxErrorException> {
142 Err(WxErrorException::from_code(-99, "get 未实现(Wave 2)"))
143 }
144
145 async fn get_with_key(
147 &self,
148 _uri: &str,
149 _access_token_key: &str,
150 ) -> Result<String, WxErrorException> {
151 Err(WxErrorException::from_code(
152 -99,
153 "get_with_key 未实现(Wave 2)",
154 ))
155 }
156
157 async fn get_pre_auth_code(&self) -> Result<String, WxErrorException> {
160 Err(WxErrorException::from_code(
161 -99,
162 "get_pre_auth_code 未实现(Wave 2)",
163 ))
164 }
165
166 async fn get_pre_auth_url(&self, _redirect_uri: &str) -> Result<String, WxErrorException> {
168 Err(WxErrorException::from_code(
169 -99,
170 "get_pre_auth_url 未实现(Wave 2)",
171 ))
172 }
173
174 async fn get_pre_auth_url_with(
177 &self,
178 _redirect_uri: &str,
179 _auth_type: Option<&str>,
180 _biz_appid: Option<&str>,
181 ) -> Result<String, WxErrorException> {
182 Err(WxErrorException::from_code(
183 -99,
184 "get_pre_auth_url_with 未实现(Wave 2)",
185 ))
186 }
187
188 async fn get_mobile_pre_auth_url(
190 &self,
191 _redirect_uri: &str,
192 ) -> Result<String, WxErrorException> {
193 Err(WxErrorException::from_code(
194 -99,
195 "get_mobile_pre_auth_url 未实现(Wave 2)",
196 ))
197 }
198
199 async fn get_mobile_pre_auth_url_with(
202 &self,
203 _redirect_uri: &str,
204 _auth_type: Option<&str>,
205 _biz_appid: Option<&str>,
206 ) -> Result<String, WxErrorException> {
207 Err(WxErrorException::from_code(
208 -99,
209 "get_mobile_pre_auth_url_with 未实现(Wave 2)",
210 ))
211 }
212
213 async fn get_authorizer_access_token(
217 &self,
218 _app_id: &str,
219 _force_refresh: bool,
220 ) -> Result<String, WxErrorException> {
221 Err(WxErrorException::from_code(
222 -99,
223 "get_authorizer_access_token 未实现(Wave 2)",
224 ))
225 }
226
227 async fn route(&self, _message: &WxOpenXmlMessage) -> Result<String, WxErrorException> {
234 Err(WxErrorException::from_code(-99, "route 未实现(Wave 2)"))
235 }
236
237 fn wx_open_config_storage(&self) -> Option<Arc<dyn WxOpenConfigStorage>> {
243 self.wx_open_service()
244 .map(|svc| svc.wx_open_config_storage())
245 }
246
247 fn get_wx_mp_service_by_appid(&self, _app_id: &str) -> Option<Arc<dyn Any + Send + Sync>> {
256 None
257 }
258
259 fn get_wx_ma_service_by_appid(&self, _app_id: &str) -> Option<Arc<dyn Any + Send + Sync>> {
265 None
266 }
267
268 fn get_wx_fast_ma_service_by_appid(&self, _app_id: &str) -> Option<Arc<dyn Any + Send + Sync>> {
275 None
276 }
277
278 fn get_wx_minishop_service_by_appid(
286 &self,
287 _app_id: &str,
288 ) -> Option<Arc<dyn Any + Send + Sync>> {
289 None
290 }
291
292 async fn get_query_auth(
300 &self,
301 _authorization_code: &str,
302 ) -> Result<WxOpenQueryAuthResult, WxErrorException> {
303 Err(WxErrorException::from_code(
304 -99,
305 "get_query_auth 未实现(Wave 2)",
306 ))
307 }
308
309 async fn get_authorizer_info(
312 &self,
313 _authorizer_appid: &str,
314 ) -> Result<WxOpenAuthorizerInfoResult, WxErrorException> {
315 Err(WxErrorException::from_code(
316 -99,
317 "get_authorizer_info 未实现(Wave 2)",
318 ))
319 }
320
321 async fn get_authorizer_list(
326 &self,
327 _begin: i32,
328 _len: i32,
329 ) -> Result<WxOpenAuthorizerListResult, WxErrorException> {
330 Err(WxErrorException::from_code(
331 -99,
332 "get_authorizer_list 未实现(Wave 2)",
333 ))
334 }
335
336 async fn get_authorizer_option(
340 &self,
341 _authorizer_appid: &str,
342 _option_name: &str,
343 ) -> Result<WxOpenAuthorizerOptionResult, WxErrorException> {
344 Err(WxErrorException::from_code(
345 -99,
346 "get_authorizer_option 未实现(Wave 2)",
347 ))
348 }
349
350 async fn set_authorizer_option(
354 &self,
355 _authorizer_appid: &str,
356 _option_name: &str,
357 _option_value: &str,
358 ) -> Result<(), WxErrorException> {
359 Err(WxErrorException::from_code(
360 -99,
361 "set_authorizer_option 未实现(Wave 2)",
362 ))
363 }
364
365 fn check_signature_with_appid(
370 &self,
371 _app_id: &str,
372 _timestamp: &str,
373 _nonce: &str,
374 _signature: &str,
375 ) -> bool {
376 false
377 }
378
379 async fn oauth2_get_access_token(
387 &self,
388 _app_id: &str,
389 _code: &str,
390 ) -> Result<WxOAuth2AccessToken, WxErrorException> {
391 Err(WxErrorException::from_code(
392 -99,
393 "oauth2_get_access_token 未实现(Wave 2)",
394 ))
395 }
396
397 async fn oauth2_refresh_access_token(
400 &self,
401 _app_id: &str,
402 _refresh_token: &str,
403 ) -> Result<WxOAuth2AccessToken, WxErrorException> {
404 Err(WxErrorException::from_code(
405 -99,
406 "oauth2_refresh_access_token 未实现(Wave 2)",
407 ))
408 }
409
410 fn oauth2_build_authorization_url(
416 &self,
417 app_id: &str,
418 redirect_uri: &str,
419 scope: &str,
420 state: &str,
421 ) -> String {
422 use percent_encoding::{NON_ALPHANUMERIC, utf8_percent_encode};
423 let component_app_id = self
424 .wx_open_config_storage()
425 .and_then(|c| c.component_app_id())
426 .unwrap_or_default();
427 let encoded_redirect = utf8_percent_encode(redirect_uri, NON_ALPHANUMERIC).to_string();
428 format!(
429 "https://open.weixin.qq.com/connect/oauth2/authorize?appid={}&redirect_uri={}&response_type=code&scope={}&state={}&component_appid={}#wechat_redirect",
430 app_id,
431 encoded_redirect,
432 scope,
433 state.trim(),
434 component_app_id
435 )
436 }
437
438 async fn miniapp_jscode2_session(
445 &self,
446 _app_id: &str,
447 _js_code: &str,
448 ) -> Result<serde_json::Value, WxErrorException> {
449 Err(WxErrorException::from_code(
450 -99,
451 "miniapp_jscode2_session 未实现(Wave 2)",
452 ))
453 }
454
455 async fn get_template_draft_list(
462 &self,
463 ) -> Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException> {
464 Err(WxErrorException::from_code(
465 -99,
466 "get_template_draft_list 未实现(Wave 2)",
467 ))
468 }
469
470 async fn get_template_list(
473 &self,
474 ) -> Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException> {
475 Err(WxErrorException::from_code(
476 -99,
477 "get_template_list 未实现(Wave 2)",
478 ))
479 }
480
481 async fn get_template_list_with_type(
485 &self,
486 _template_type: Option<i32>,
487 ) -> Result<Option<Vec<WxOpenMaCodeTemplate>>, WxErrorException> {
488 Err(WxErrorException::from_code(
489 -99,
490 "get_template_list_with_type 未实现(Wave 2)",
491 ))
492 }
493
494 async fn add_to_template(&self, _draft_id: i64) -> Result<(), WxErrorException> {
498 Err(WxErrorException::from_code(
499 -99,
500 "add_to_template 未实现(Wave 2)",
501 ))
502 }
503
504 async fn add_to_template_with_type(
507 &self,
508 _draft_id: i64,
509 _template_type: i32,
510 ) -> Result<(), WxErrorException> {
511 Err(WxErrorException::from_code(
512 -99,
513 "add_to_template_with_type 未实现(Wave 2)",
514 ))
515 }
516
517 async fn delete_template(&self, _template_id: i64) -> Result<(), WxErrorException> {
519 Err(WxErrorException::from_code(
520 -99,
521 "delete_template 未实现(Wave 2)",
522 ))
523 }
524
525 async fn create_open_account(
535 &self,
536 _app_id: &str,
537 _app_id_type: &str,
538 ) -> Result<WxOpenCreateResult, WxErrorException> {
539 Err(WxErrorException::from_code(
540 -99,
541 "create_open_account 未实现(Wave 2,待代 mp/ma 接线)",
542 ))
543 }
544
545 async fn bind_open_account(
550 &self,
551 _app_id: &str,
552 _app_id_type: &str,
553 _open_appid: &str,
554 ) -> Result<bool, WxErrorException> {
555 Err(WxErrorException::from_code(
556 -99,
557 "bind_open_account 未实现(Wave 2,待代 mp/ma 接线)",
558 ))
559 }
560
561 async fn unbind_open_account(
566 &self,
567 _app_id: &str,
568 _app_id_type: &str,
569 _open_appid: &str,
570 ) -> Result<bool, WxErrorException> {
571 Err(WxErrorException::from_code(
572 -99,
573 "unbind_open_account 未实现(Wave 2,待代 mp/ma 接线)",
574 ))
575 }
576
577 async fn get_open_account(
582 &self,
583 _app_id: &str,
584 _app_id_type: &str,
585 ) -> Result<WxOpenGetResult, WxErrorException> {
586 Err(WxErrorException::from_code(
587 -99,
588 "get_open_account 未实现(Wave 2,待代 mp/ma 接线)",
589 ))
590 }
591
592 async fn have_open(&self) -> Result<WxOpenHaveResult, WxErrorException> {
595 Err(WxErrorException::from_code(
596 -99,
597 "have_open 未实现(Wave 2)",
598 ))
599 }
600
601 async fn fast_register_weapp(
607 &self,
608 _name: &str,
609 _code: &str,
610 _code_type: &str,
611 _legal_persona_wechat: &str,
612 _legal_persona_name: &str,
613 _component_phone: &str,
614 ) -> Result<WxOpenResult, WxErrorException> {
615 Err(WxErrorException::from_code(
616 -99,
617 "fast_register_weapp 未实现(Wave 2)",
618 ))
619 }
620
621 async fn fast_register_weapp_search(
625 &self,
626 _name: &str,
627 _legal_persona_wechat: &str,
628 _legal_persona_name: &str,
629 ) -> Result<WxOpenResult, WxErrorException> {
630 Err(WxErrorException::from_code(
631 -99,
632 "fast_register_weapp_search 未实现(Wave 2)",
633 ))
634 }
635
636 async fn fast_register_personal_weapp(
639 &self,
640 _idname: &str,
641 _wxuser: &str,
642 _component_phone: &str,
643 ) -> Result<WxOpenRegisterPersonalWeappResult, WxErrorException> {
644 Err(WxErrorException::from_code(
645 -99,
646 "fast_register_personal_weapp 未实现(Wave 2)",
647 ))
648 }
649
650 async fn fast_register_personal_weapp_search(
653 &self,
654 _taskid: &str,
655 ) -> Result<WxOpenRegisterPersonalWeappResult, WxErrorException> {
656 Err(WxErrorException::from_code(
657 -99,
658 "fast_register_personal_weapp_search 未实现(Wave 2)",
659 ))
660 }
661
662 async fn fast_register_beta_weapp(
665 &self,
666 _name: &str,
667 _openid: &str,
668 ) -> Result<WxOpenRegisterBetaWeappResult, WxErrorException> {
669 Err(WxErrorException::from_code(
670 -99,
671 "fast_register_beta_weapp 未实现(Wave 2)",
672 ))
673 }
674
675 async fn register_shop(
681 &self,
682 _wx_name: &str,
683 _id_card_name: &str,
684 _id_card_number: &str,
685 _channel_id: Option<&str>,
686 _api_openstore_type: Option<i32>,
687 _auth_page_url: Option<&str>,
688 ) -> Result<WxOpenResult, WxErrorException> {
689 Err(WxErrorException::from_code(
690 -99,
691 "register_shop 未实现(Wave 2)",
692 ))
693 }
694
695 async fn check_audit_status(&self, _wx_name: &str) -> Result<String, WxErrorException> {
698 Err(WxErrorException::from_code(
699 -99,
700 "check_audit_status 未实现(Wave 2)",
701 ))
702 }
703
704 async fn check_audit_status_with_appid(
707 &self,
708 _app_id: &str,
709 _wx_name: &str,
710 ) -> Result<String, WxErrorException> {
711 Err(WxErrorException::from_code(
712 -99,
713 "check_audit_status_with_appid 未实现(Wave 2)",
714 ))
715 }
716
717 async fn submit_merchant_info(
724 &self,
725 _app_id: &str,
726 _subject_type: &str,
727 _busi_license: &MinishopBusiLicense,
728 _organization_code_info: Option<&MinishopOrganizationCodeInfo>,
729 _idcard_info: Option<&MinishopIdcardInfo>,
730 _super_administrator_info: Option<&MinishopSuperAdministratorInfo>,
731 _merchant_shortname: Option<&str>,
732 ) -> Result<WxOpenResult, WxErrorException> {
733 Err(WxErrorException::from_code(
734 -99,
735 "submit_merchant_info 未实现(Wave 2)",
736 ))
737 }
738
739 async fn submit_basic_info(
743 &self,
744 _app_id: &str,
745 _name_info: &MinishopNameInfo,
746 _return_info: &MinishopReturnInfo,
747 ) -> Result<WxOpenResult, WxErrorException> {
748 Err(WxErrorException::from_code(
749 -99,
750 "submit_basic_info 未实现(Wave 2)",
751 ))
752 }
753
754 async fn upload_minishop_image_pic_file(
761 &self,
762 _app_id: &str,
763 _height: i32,
764 _width: i32,
765 _file_path: &str,
766 ) -> Result<WxMinishopImageUploadResult, WxErrorException> {
767 Err(WxErrorException::from_code(
768 -99,
769 "upload_minishop_image_pic_file 未实现(Wave 2)",
770 ))
771 }
772
773 async fn get_minishop_categories(
776 &self,
777 _app_id: &str,
778 _f_cat_id: i32,
779 ) -> Result<MinishopCategories, WxErrorException> {
780 Err(WxErrorException::from_code(
781 -99,
782 "get_minishop_categories 未实现(Wave 2)",
783 ))
784 }
785
786 async fn get_minishop_brands(
788 &self,
789 _app_id: &str,
790 ) -> Result<MinishopBrandList, WxErrorException> {
791 Err(WxErrorException::from_code(
792 -99,
793 "get_minishop_brands 未实现(Wave 2)",
794 ))
795 }
796
797 async fn get_minishop_delivery_template(
800 &self,
801 _app_id: &str,
802 ) -> Result<MinishopDeliveryTemplateResult, WxErrorException> {
803 Err(WxErrorException::from_code(
804 -99,
805 "get_minishop_delivery_template 未实现(Wave 2)",
806 ))
807 }
808
809 async fn get_minishop_cat_list(
811 &self,
812 _app_id: &str,
813 ) -> Result<MinishopShopCatList, WxErrorException> {
814 Err(WxErrorException::from_code(
815 -99,
816 "get_minishop_cat_list 未实现(Wave 2)",
817 ))
818 }
819
820 async fn get_minishop_delivery_company(
826 &self,
827 _app_id: &str,
828 ) -> Result<WxMinishopAddGoodsSpuResult, WxErrorException> {
829 Err(WxErrorException::from_code(
830 -99,
831 "get_minishop_delivery_company 未实现(Wave 2)",
832 ))
833 }
834
835 async fn minishop_create_coupon(
838 &self,
839 _app_id: &str,
840 _coupon_info: &WxMinishopCoupon,
841 ) -> Result<i32, WxErrorException> {
842 Err(WxErrorException::from_code(
843 -99,
844 "minishop_create_coupon 未实现(Wave 2)",
845 ))
846 }
847
848 async fn minishop_get_coupon_list(
854 &self,
855 _app_id: &str,
856 _start_create_time: &str,
857 _end_create_time: &str,
858 _status: i32,
859 _page: i32,
860 _page_size: i32,
861 ) -> Result<Option<WxMinishopCouponStock>, WxErrorException> {
862 Err(WxErrorException::from_code(
863 -99,
864 "minishop_get_coupon_list 未实现(Wave 2)",
865 ))
866 }
867
868 async fn minishop_push_coupon_to_user(
871 &self,
872 _app_id: &str,
873 _open_id: &str,
874 _coupon_id: i32,
875 ) -> Result<WxOpenResult, WxErrorException> {
876 Err(WxErrorException::from_code(
877 -99,
878 "minishop_push_coupon_to_user 未实现(Wave 2)",
879 ))
880 }
881
882 async fn minishop_update_coupon(
885 &self,
886 _app_id: &str,
887 _coupon_info: &WxMinishopCoupon,
888 ) -> Result<i32, WxErrorException> {
889 Err(WxErrorException::from_code(
890 -99,
891 "minishop_update_coupon 未实现(Wave 2)",
892 ))
893 }
894
895 async fn minishop_update_coupon_status(
898 &self,
899 _app_id: &str,
900 _coupon_id: i32,
901 _status: i32,
902 ) -> Result<WxOpenResult, WxErrorException> {
903 Err(WxErrorException::from_code(
904 -99,
905 "minishop_update_coupon_status 未实现(Wave 2)",
906 ))
907 }
908
909 async fn minishop_goods_add_spu(
912 &self,
913 _app_id: &str,
914 _spu: &WxMinishopSpu,
915 ) -> Result<WxMinishopAddGoodsSpuResult, WxErrorException> {
916 Err(WxErrorException::from_code(
917 -99,
918 "minishop_goods_add_spu 未实现(Wave 2)",
919 ))
920 }
921
922 async fn minishop_goods_del_spu(
925 &self,
926 _app_id: &str,
927 _product_id: i64,
928 _out_product_id: i64,
929 ) -> Result<WxOpenResult, WxErrorException> {
930 Err(WxErrorException::from_code(
931 -99,
932 "minishop_goods_del_spu 未实现(Wave 2)",
933 ))
934 }
935
936 async fn minishop_goods_update_spu(
939 &self,
940 _app_id: &str,
941 _spu: &WxMinishopSpu,
942 ) -> Result<WxMinishopAddGoodsSpuResult, WxErrorException> {
943 Err(WxErrorException::from_code(
944 -99,
945 "minishop_goods_update_spu 未实现(Wave 2)",
946 ))
947 }
948
949 async fn minishop_goods_listing_spu(
952 &self,
953 _app_id: &str,
954 _product_id: i64,
955 _out_product_id: i64,
956 ) -> Result<WxOpenResult, WxErrorException> {
957 Err(WxErrorException::from_code(
958 -99,
959 "minishop_goods_listing_spu 未实现(Wave 2)",
960 ))
961 }
962
963 async fn minishop_goods_delisting_spu(
966 &self,
967 _app_id: &str,
968 _product_id: i64,
969 _out_product_id: i64,
970 ) -> Result<WxOpenResult, WxErrorException> {
971 Err(WxErrorException::from_code(
972 -99,
973 "minishop_goods_delisting_spu 未实现(Wave 2)",
974 ))
975 }
976
977 async fn minishop_goods_add_sku(
980 &self,
981 _app_id: &str,
982 _sku: &WxMinishopSku,
983 ) -> Result<WxMinishopAddGoodsSpuResult, WxErrorException> {
984 Err(WxErrorException::from_code(
985 -99,
986 "minishop_goods_add_sku 未实现(Wave 2)",
987 ))
988 }
989
990 async fn minishop_goods_batch_add_sku(
993 &self,
994 _app_id: &str,
995 _sku_list: &[WxMinishopSku],
996 ) -> Result<WxOpenResult, WxErrorException> {
997 Err(WxErrorException::from_code(
998 -99,
999 "minishop_goods_batch_add_sku 未实现(Wave 2)",
1000 ))
1001 }
1002
1003 async fn minishop_goods_del_sku(
1006 &self,
1007 _app_id: &str,
1008 _product_id: i64,
1009 _out_product_id: i64,
1010 _out_sku_id: &str,
1011 _sku_id: i64,
1012 ) -> Result<WxOpenResult, WxErrorException> {
1013 Err(WxErrorException::from_code(
1014 -99,
1015 "minishop_goods_del_sku 未实现(Wave 2)",
1016 ))
1017 }
1018
1019 async fn minishop_goods_update_sku(
1022 &self,
1023 _app_id: &str,
1024 _sku: &WxMinishopSku,
1025 ) -> Result<WxOpenResult, WxErrorException> {
1026 Err(WxErrorException::from_code(
1027 -99,
1028 "minishop_goods_update_sku 未实现(Wave 2)",
1029 ))
1030 }
1031
1032 async fn minishop_goods_update_sku_price(
1039 &self,
1040 _app_id: &str,
1041 _product_id: i64,
1042 _out_product_id: i64,
1043 _out_sku_id: &str,
1044 _sku_id: i64,
1045 _sale_price: i64,
1046 _market_price: i64,
1047 ) -> Result<WxOpenResult, WxErrorException> {
1048 Err(WxErrorException::from_code(
1049 -99,
1050 "minishop_goods_update_sku_price 未实现(Wave 2)",
1051 ))
1052 }
1053
1054 async fn minishop_goods_update_sku_stock(
1058 &self,
1059 _app_id: &str,
1060 _product_id: i64,
1061 _out_product_id: i64,
1062 _out_sku_id: &str,
1063 _sku_id: i64,
1064 r#_type: i32,
1065 _stock_num: i32,
1066 ) -> Result<WxOpenResult, WxErrorException> {
1067 Err(WxErrorException::from_code(
1068 -99,
1069 "minishop_goods_update_sku_stock 未实现(Wave 2)",
1070 ))
1071 }
1072
1073 async fn minishop_common_post(
1078 &self,
1079 _app_id: &str,
1080 _url: &str,
1081 _request_param: &str,
1082 ) -> Result<Option<String>, WxErrorException> {
1083 Err(WxErrorException::from_code(
1084 -99,
1085 "minishop_common_post 未实现(Wave 2)",
1086 ))
1087 }
1088
1089 async fn add_limit_discount_goods(
1092 &self,
1093 _app_id: &str,
1094 _limit_discount_goods: &LimitDiscountGoods,
1095 ) -> Result<i32, WxErrorException> {
1096 Err(WxErrorException::from_code(
1097 -99,
1098 "add_limit_discount_goods 未实现(Wave 2)",
1099 ))
1100 }
1101
1102 async fn get_limit_discount_list(
1105 &self,
1106 _app_id: &str,
1107 _status: Option<i32>,
1108 ) -> Result<Vec<LimitDiscountGoods>, WxErrorException> {
1109 Err(WxErrorException::from_code(
1110 -99,
1111 "get_limit_discount_list 未实现(Wave 2)",
1112 ))
1113 }
1114
1115 async fn update_limit_discount_status(
1118 &self,
1119 _app_id: &str,
1120 _task_id: i64,
1121 _status: i32,
1122 ) -> Result<WxOpenResult, WxErrorException> {
1123 Err(WxErrorException::from_code(
1124 -99,
1125 "update_limit_discount_status 未实现(Wave 2)",
1126 ))
1127 }
1128
1129 async fn get_share_cloud_base_env(
1134 &self,
1135 _appids: &[String],
1136 ) -> Result<GetShareCloudBaseEnvResponse, WxErrorException> {
1137 Err(WxErrorException::from_code(
1138 -99,
1139 "get_share_cloud_base_env 未实现(Wave 2)",
1140 ))
1141 }
1142
1143 async fn get_tcb_env_list(&self) -> Result<GetTcbEnvListResponse, WxErrorException> {
1145 Err(WxErrorException::from_code(
1146 -99,
1147 "get_tcb_env_list 未实现(Wave 2)",
1148 ))
1149 }
1150
1151 async fn change_tcb_env(&self, _env: &str) -> Result<WxOpenResult, WxErrorException> {
1153 Err(WxErrorException::from_code(
1154 -99,
1155 "change_tcb_env 未实现(Wave 2)",
1156 ))
1157 }
1158
1159 async fn share_cloud_base_env(
1162 &self,
1163 _request: &ShareCloudBaseEnvRequest,
1164 ) -> Result<ShareCloudBaseEnvResponse, WxErrorException> {
1165 Err(WxErrorException::from_code(
1166 -99,
1167 "share_cloud_base_env 未实现(Wave 2)",
1168 ))
1169 }
1170
1171 async fn clear_quota_v2(&self, _appid: &str) -> Result<WxOpenResult, WxErrorException> {
1174 Err(WxErrorException::from_code(
1175 -99,
1176 "clear_quota_v2 未实现(Wave 2)",
1177 ))
1178 }
1179
1180 async fn apply_set_order_path_info(
1185 &self,
1186 _info: &WxOpenMaApplyOrderPathInfo,
1187 ) -> Result<WxOpenResult, WxErrorException> {
1188 Err(WxErrorException::from_code(
1189 -99,
1190 "apply_set_order_path_info 未实现(Wave 2)",
1191 ))
1192 }
1193
1194 async fn modify_wxa_server_domain(
1198 &self,
1199 _action: &str,
1200 _request_domains: &[String],
1201 _ws_request_domains: &[String],
1202 _upload_domains: &[String],
1203 _download_domains: &[String],
1204 _udp_domains: &[String],
1205 _tcp_domains: &[String],
1206 ) -> Result<WxOpenMaDomainResult, WxErrorException> {
1207 Err(WxErrorException::from_code(
1208 -99,
1209 "modify_wxa_server_domain 未实现(Wave 2)",
1210 ))
1211 }
1212
1213 async fn get_domain_confirm_file(
1215 &self,
1216 ) -> Result<WxOpenMaDomainConfirmFileResult, WxErrorException> {
1217 Err(WxErrorException::from_code(
1218 -99,
1219 "get_domain_confirm_file 未实现(Wave 2)",
1220 ))
1221 }
1222
1223 async fn modify_wxa_jump_domain(
1226 &self,
1227 _action: &str,
1228 _domain_list: &[String],
1229 ) -> Result<String, WxErrorException> {
1230 Err(WxErrorException::from_code(
1231 -99,
1232 "modify_wxa_jump_domain 未实现(Wave 2)",
1233 ))
1234 }
1235
1236 async fn modify_wxa_jump_domain_info(
1239 &self,
1240 _action: &str,
1241 _domain_list: &[String],
1242 ) -> Result<WxOpenMaWebDomainResult, WxErrorException> {
1243 Err(WxErrorException::from_code(
1244 -99,
1245 "modify_wxa_jump_domain_info 未实现(Wave 2)",
1246 ))
1247 }
1248}