|
15 | 15 | import me.chanjar.weixin.open.bean.minishop.goods.*; |
16 | 16 | import me.chanjar.weixin.open.bean.minishop.limitdiscount.LimitDiscountGoods; |
17 | 17 | import me.chanjar.weixin.open.bean.result.*; |
| 18 | +import org.jetbrains.annotations.Nullable; |
18 | 19 |
|
19 | 20 | import java.io.File; |
20 | 21 | import java.util.List; |
@@ -169,7 +170,6 @@ public interface WxOpenComponentService { |
169 | 170 | String MINISHOP_GET_DELIVERY_COMPANY_URL = "https://api.weixin.qq.com/product/delivery/get_company_list"; |
170 | 171 |
|
171 | 172 |
|
172 | | - |
173 | 173 | /** |
174 | 174 | * Gets wx mp service by appid. |
175 | 175 | * |
@@ -456,11 +456,23 @@ public interface WxOpenComponentService { |
456 | 456 | * |
457 | 457 | * @return 小程序代码模版列表 (templateId) |
458 | 458 | * @throws WxErrorException 获取失败时返回,具体错误码请看此接口的注释文档 |
| 459 | + * @see #getTemplateList(Integer) |
459 | 460 | */ |
| 461 | + @Deprecated |
460 | 462 | List<WxOpenMaCodeTemplate> getTemplateList() throws WxErrorException; |
461 | 463 |
|
462 | 464 | /** |
463 | | - * 请参考并使用 {@link #addToTemplate(long,int)}. |
| 465 | + * 获取代码模版库中的所有小程序代码模版. |
| 466 | + * 文档:https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/code_template/gettemplatelist.html |
| 467 | + * |
| 468 | + * @param templateType 模板类型,可空,默认全部,填0普通模,1标准模板 |
| 469 | + * @return 小程序代码模版列表 (templateId) |
| 470 | + * @throws WxErrorException 获取失败时返回,具体错误码请看此接口的注释文档 |
| 471 | + */ |
| 472 | + List<WxOpenMaCodeTemplate> getTemplateList(@Nullable Integer templateType) throws WxErrorException; |
| 473 | + |
| 474 | + /** |
| 475 | + * 请参考并使用 {@link #addToTemplate(long, int)}. |
464 | 476 | * 将草稿箱的草稿选为小程序代码模版. |
465 | 477 | * |
466 | 478 | * @param draftId 草稿ID,本字段可通过“获取草稿箱内的所有临时代码草稿”接口获得 |
@@ -474,7 +486,7 @@ public interface WxOpenComponentService { |
474 | 486 | * https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/code_template/addtotemplate.html |
475 | 487 | * 将草稿添加到代码模板库. |
476 | 488 | * |
477 | | - * @param draftId 草稿ID,本字段可通过“获取草稿箱内的所有临时代码草稿”接口获得 |
| 489 | + * @param draftId 草稿ID,本字段可通过“获取草稿箱内的所有临时代码草稿”接口获得 |
478 | 490 | * @param templateType 代码模版类型,【普通模板:0, 标准模板:1】 |
479 | 491 | * @throws WxErrorException 操作失败时抛出,具体错误码请看此接口的注释文档 |
480 | 492 | * @see #getTemplateDraftList #getTemplateDraftList |
@@ -573,12 +585,12 @@ public interface WxOpenComponentService { |
573 | 585 | * https://api.weixin.qq.com/product/register/register_shop?component_access_token=xxxxxxxxx |
574 | 586 | * 注册小商店账号 |
575 | 587 | * |
576 | | - * @param wxName 微信号(必填) |
577 | | - * @param idCardName 身份证姓名(必填) |
578 | | - * @param idCardNumber 身份证号(必填) |
579 | | - * @param channelId 渠道号,服务商后台生成渠道信息。(选填) |
580 | | - * @param apiOpenstoreType 1-整店打包(开通小商店),2-组件开放(开通小程序,并且已经完整的嵌入电商功能)(必填) |
581 | | - * @param authPageUrl 授权url(选填) |
| 588 | + * @param wxName 微信号(必填) |
| 589 | + * @param idCardName 身份证姓名(必填) |
| 590 | + * @param idCardNumber 身份证号(必填) |
| 591 | + * @param channelId 渠道号,服务商后台生成渠道信息。(选填) |
| 592 | + * @param apiOpenstoreType 1-整店打包(开通小商店),2-组件开放(开通小程序,并且已经完整的嵌入电商功能)(必填) |
| 593 | + * @param authPageUrl 授权url(选填) |
582 | 594 | * @return the wx open result |
583 | 595 | * @throws WxErrorException |
584 | 596 | */ |
@@ -588,23 +600,24 @@ public interface WxOpenComponentService { |
588 | 600 | /** |
589 | 601 | * https://api.weixin.qq.com/product/register/check_audit_status |
590 | 602 | * 异步状态查询 |
591 | | - * @param wxName 微信号 |
| 603 | + * |
| 604 | + * @param wxName 微信号 |
592 | 605 | * @return |
593 | 606 | */ |
594 | 607 | String checkAuditStatus(String wxName) throws WxErrorException; |
595 | 608 |
|
596 | 609 |
|
597 | 610 | /** |
598 | 611 | * 已经获取到小商店的appId,那么需要通过accesstoken来获取该小商店的状态 |
| 612 | + * |
599 | 613 | * @param appId |
600 | 614 | * @param wxName |
601 | 615 | * @return |
602 | 616 | * @throws WxErrorException |
603 | 617 | */ |
604 | | - String checkAuditStatus(String appId, String wxName) throws WxErrorException; |
| 618 | + String checkAuditStatus(String appId, String wxName) throws WxErrorException; |
605 | 619 |
|
606 | 620 | /** |
607 | | - * |
608 | 621 | * @param appId |
609 | 622 | * @param subjectType |
610 | 623 | * @param busiLicense |
@@ -617,7 +630,6 @@ public interface WxOpenComponentService { |
617 | 630 | WxOpenResult submitMerchantInfo(String appId, String subjectType, MinishopBusiLicense busiLicense, MinishopOrganizationCodeInfo organizationCodeInfo, MinishopIdcardInfo idcardInfo, MinishopSuperAdministratorInfo superAdministratorInfo, String merchantShoprtName) throws WxErrorException; |
618 | 631 |
|
619 | 632 | /** |
620 | | - * |
621 | 633 | * @param appId |
622 | 634 | * @param nameInfo |
623 | 635 | * @param returnInfo |
@@ -628,7 +640,6 @@ public interface WxOpenComponentService { |
628 | 640 |
|
629 | 641 |
|
630 | 642 | /** |
631 | | - * |
632 | 643 | * @param height |
633 | 644 | * @param width |
634 | 645 | * @param file |
@@ -640,6 +651,7 @@ public interface WxOpenComponentService { |
640 | 651 |
|
641 | 652 | /** |
642 | 653 | * 获取小商店的类目详情 |
| 654 | + * |
643 | 655 | * @param appId:小商店APPID |
644 | 656 | * @param fCatId:父类目ID,可先填0获取根部类目 |
645 | 657 | * @return 小商店类目信息列表 |
@@ -649,6 +661,7 @@ public interface WxOpenComponentService { |
649 | 661 |
|
650 | 662 | /** |
651 | 663 | * 获取小商店品牌信息 |
| 664 | + * |
652 | 665 | * @param appId:小商店appID |
653 | 666 | * @return |
654 | 667 | */ |
@@ -657,6 +670,7 @@ public interface WxOpenComponentService { |
657 | 670 |
|
658 | 671 | /** |
659 | 672 | * 获取小商店运费模版信息 |
| 673 | + * |
660 | 674 | * @param appId:小商店appID |
661 | 675 | * @return |
662 | 676 | */ |
@@ -665,6 +679,7 @@ public interface WxOpenComponentService { |
665 | 679 |
|
666 | 680 | /** |
667 | 681 | * 获取小商店商品分类信息 |
| 682 | + * |
668 | 683 | * @param appId |
669 | 684 | * @return |
670 | 685 | */ |
@@ -673,6 +688,7 @@ public interface WxOpenComponentService { |
673 | 688 |
|
674 | 689 | /** |
675 | 690 | * 获取小商店的快递公司列表 |
| 691 | + * |
676 | 692 | * @param appId |
677 | 693 | * @return |
678 | 694 | * @throws WxErrorException |
@@ -681,18 +697,21 @@ public interface WxOpenComponentService { |
681 | 697 |
|
682 | 698 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
683 | 699 | //小商店优惠券接口 |
| 700 | + |
684 | 701 | /** |
685 | 702 | * 创建小商店优惠券 |
| 703 | + * |
686 | 704 | * @param appId:小商店的appId |
687 | | - * @param couponInfo: 优惠券信息 |
| 705 | + * @param couponInfo: 优惠券信息 |
688 | 706 | * @return couponId: 优惠券ID |
689 | 707 | * @throws WxErrorException |
690 | 708 | */ |
691 | | - Integer minishopCreateCoupon(String appId, WxMinishopCoupon couponInfo) throws WxErrorException; |
| 709 | + Integer minishopCreateCoupon(String appId, WxMinishopCoupon couponInfo) throws WxErrorException; |
692 | 710 |
|
693 | 711 |
|
694 | 712 | /** |
695 | 713 | * 与小商店对接,获取小商店的优惠券信息 |
| 714 | + * |
696 | 715 | * @param appId:小商店的appId |
697 | 716 | * @param startCreateTime:优惠券创建时间的搜索开始时间 |
698 | 717 | * @param endCreateTime:优惠券创建时间的搜索结束时间 |
@@ -707,16 +726,18 @@ public interface WxOpenComponentService { |
707 | 726 |
|
708 | 727 | /** |
709 | 728 | * 与小商店对接,将优惠券发送给某人 |
| 729 | + * |
710 | 730 | * @param appid:小商店appId |
711 | 731 | * @param openId:优惠券接收人的openId |
712 | | - * @param couponId: 优惠券ID |
| 732 | + * @param couponId: 优惠券ID |
713 | 733 | * @return |
714 | 734 | */ |
715 | | - WxOpenResult minishopPushCouponToUser(String appid, String openId, Integer couponId) throws WxErrorException; |
| 735 | + WxOpenResult minishopPushCouponToUser(String appid, String openId, Integer couponId) throws WxErrorException; |
716 | 736 |
|
717 | 737 |
|
718 | 738 | /** |
719 | 739 | * 与小商店对接,更新商城优惠券 |
| 740 | + * |
720 | 741 | * @param appId |
721 | 742 | * @param couponInfo |
722 | 743 | * @return |
@@ -727,13 +748,14 @@ public interface WxOpenComponentService { |
727 | 748 |
|
728 | 749 | /** |
729 | 750 | * 从优惠券创建后status=1,可流转到2,4,5, COUPON_STATUS_VALID = 2 ;//生效 COUPON_STATUS_INVALID = 4 ;//已作废 COUPON_STATUS_DEL = 5;//删除 |
| 751 | + * |
730 | 752 | * @param appId |
731 | 753 | * @param couponId |
732 | 754 | * @param status |
733 | 755 | * @return |
734 | 756 | * @throws WxErrorException |
735 | 757 | */ |
736 | | - WxOpenResult minishopUpdateCouponStatus(String appId, Integer couponId, Integer status) throws WxErrorException; |
| 758 | + WxOpenResult minishopUpdateCouponStatus(String appId, Integer couponId, Integer status) throws WxErrorException; |
737 | 759 |
|
738 | 760 |
|
739 | 761 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
@@ -747,8 +769,10 @@ public interface WxOpenComponentService { |
747 | 769 | String MINISHOP_LISTING_SPU_URL = "https://api.weixin.qq.com/product/spu/listing"; |
748 | 770 |
|
749 | 771 | String MINISHOP_DELISTING_SPU_URL = "https://api.weixin.qq.com/product/spu/delisting"; |
| 772 | + |
750 | 773 | /** |
751 | 774 | * 小商店添加商品接口,添加商品后只是添加到草稿箱,需要通过调用上架商品,并通过审核才能在商城中显示。 |
| 775 | + * |
752 | 776 | * @param appId |
753 | 777 | * @param spu |
754 | 778 | * @return |
@@ -759,17 +783,19 @@ public interface WxOpenComponentService { |
759 | 783 |
|
760 | 784 | /** |
761 | 785 | * 小商店删除商品接口,直接删除,不会存在小商店回收站里面。 |
| 786 | + * |
762 | 787 | * @param appId |
763 | 788 | * @param productId |
764 | 789 | * @param outProductId |
765 | 790 | * @return |
766 | 791 | * @throws WxErrorException |
767 | 792 | */ |
768 | | - WxOpenResult minishopGoodsDelSpu(String appId, Long productId, Long outProductId) throws WxErrorException; |
| 793 | + WxOpenResult minishopGoodsDelSpu(String appId, Long productId, Long outProductId) throws WxErrorException; |
769 | 794 |
|
770 | 795 |
|
771 | 796 | /** |
772 | 797 | * 小商店更新商品接口,不会直接影响上架商品的信息,而是存在草稿箱,需要调用上架商品接口,并通过审核才能在商城中显示。 |
| 798 | + * |
773 | 799 | * @param appId |
774 | 800 | * @param spu |
775 | 801 | * @return |
@@ -780,6 +806,7 @@ public interface WxOpenComponentService { |
780 | 806 |
|
781 | 807 | /** |
782 | 808 | * 上架商品。 |
| 809 | + * |
783 | 810 | * @param appId |
784 | 811 | * @param productId |
785 | 812 | * @param outProductId |
@@ -791,6 +818,7 @@ public interface WxOpenComponentService { |
791 | 818 |
|
792 | 819 | /** |
793 | 820 | * 下架商品 |
| 821 | + * |
794 | 822 | * @param appId |
795 | 823 | * @param productId |
796 | 824 | * @param outProductId |
@@ -816,6 +844,7 @@ public interface WxOpenComponentService { |
816 | 844 |
|
817 | 845 | /** |
818 | 846 | * 小商店新增sku信息 |
| 847 | + * |
819 | 848 | * @param appId |
820 | 849 | * @param sku |
821 | 850 | * @return |
@@ -826,6 +855,7 @@ public interface WxOpenComponentService { |
826 | 855 |
|
827 | 856 | /** |
828 | 857 | * 小商店批量新增sku信息 |
| 858 | + * |
829 | 859 | * @param appId |
830 | 860 | * @param skuList |
831 | 861 | * @return |
@@ -836,6 +866,7 @@ public interface WxOpenComponentService { |
836 | 866 |
|
837 | 867 | /** |
838 | 868 | * 小商店删除sku消息 |
| 869 | + * |
839 | 870 | * @param appId |
840 | 871 | * @param productId |
841 | 872 | * @param outProductId |
@@ -844,11 +875,12 @@ public interface WxOpenComponentService { |
844 | 875 | * @return |
845 | 876 | * @throws WxErrorException |
846 | 877 | */ |
847 | | - WxOpenResult minishopGoodsDelSku(String appId, Long productId, Long outProductId, String outSkuId, Long skuId) throws WxErrorException; |
| 878 | + WxOpenResult minishopGoodsDelSku(String appId, Long productId, Long outProductId, String outSkuId, Long skuId) throws WxErrorException; |
848 | 879 |
|
849 | 880 |
|
850 | 881 | /** |
851 | 882 | * 小商店更新sku |
| 883 | + * |
852 | 884 | * @param appId |
853 | 885 | * @param sku |
854 | 886 | * @return |
@@ -859,6 +891,7 @@ public interface WxOpenComponentService { |
859 | 891 |
|
860 | 892 | /** |
861 | 893 | * 小商店更新sku价格 |
| 894 | + * |
862 | 895 | * @param appId |
863 | 896 | * @param productId |
864 | 897 | * @param outProductId |
@@ -874,6 +907,7 @@ public interface WxOpenComponentService { |
874 | 907 |
|
875 | 908 | /** |
876 | 909 | * 小商店更新sku库存 |
| 910 | + * |
877 | 911 | * @param appId |
878 | 912 | * @param productId |
879 | 913 | * @param outProductId |
@@ -884,11 +918,12 @@ public interface WxOpenComponentService { |
884 | 918 | * @return |
885 | 919 | * @throws WxErrorException |
886 | 920 | */ |
887 | | - WxOpenResult minishopGoodsUpdateSkuStock(String appId, Long productId, Long outProductId, String outSkuId, Long skuId, Integer type, Integer stockNum) throws WxErrorException; |
| 921 | + WxOpenResult minishopGoodsUpdateSkuStock(String appId, Long productId, Long outProductId, String outSkuId, Long skuId, Integer type, Integer stockNum) throws WxErrorException; |
888 | 922 |
|
889 | 923 |
|
890 | 924 | /** |
891 | 925 | * 小商店通用Post接口 |
| 926 | + * |
892 | 927 | * @param appId |
893 | 928 | * @param url |
894 | 929 | * @param requestParam |
@@ -898,7 +933,6 @@ public interface WxOpenComponentService { |
898 | 933 | String minishopCommonPost(String appId, String url, String requestParam) throws WxErrorException; |
899 | 934 |
|
900 | 935 |
|
901 | | - |
902 | 936 | ////////////////////////////////////////////////////////////// |
903 | 937 | //商品抢购任务-秒杀活动 |
904 | 938 | String API_MINISHOP_ADD_LIMIT_DISCOUNT_URL = "https://api.weixin.qq.com/product/limiteddiscount/add/"; |
@@ -910,6 +944,7 @@ public interface WxOpenComponentService { |
910 | 944 | /** |
911 | 945 | * 添加抢购任务 |
912 | 946 | * 每个商品(SPU)同一时间只能有一个抢购任务。 如果当前有抢购任务没有结束,无论是否开始,都不允许创建第二个抢购任务 可以提前修改抢购任务状态为结束后,再创建新的任务。 每次创建抢购任务时,必须填充该SPU下 所有SKU的抢购信息 |
| 947 | + * |
913 | 948 | * @param appId |
914 | 949 | * @param limitDiscountGoods |
915 | 950 | * @return |
@@ -919,6 +954,7 @@ public interface WxOpenComponentService { |
919 | 954 |
|
920 | 955 | /** |
921 | 956 | * status为0代表 还未结束的抢购任务,无论是否开始 status为1代表已经结束的 抢购任务 如果不填status,则两种都拉取 |
| 957 | + * |
922 | 958 | * @param appId |
923 | 959 | * @param status |
924 | 960 | * @return |
@@ -929,6 +965,7 @@ public interface WxOpenComponentService { |
929 | 965 | /** |
930 | 966 | * 修改抢购任务状态 |
931 | 967 | * 用于提前结束抢购任务,无论抢购任务是否在执行中,都可以关闭。 也可以直接删除抢购任务 注意:结束后不允许再开启,状态不可逆 |
| 968 | + * |
932 | 969 | * @param appId |
933 | 970 | * @param taskId |
934 | 971 | * @param status |
|