XYMallAPIManager.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // XYMallAPIManager.h
  3. // Starbuds
  4. //
  5. // Created by 翟玉磊 on 2020/8/12.
  6. // Copyright © 2020 翟玉磊. All rights reserved.
  7. //
  8. #import "ZYLAPIManager.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface XYMallAPIManager : ZYLAPIManager
  11. /// 根据星芽token登录
  12. /// @param token 星芽token
  13. /// @param successHandler 请求成功
  14. /// @param failureHandler 请求失败
  15. - (NSNumber *)loginByStarbudsWithToken:(NSString *)token successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  16. /// 获取商户列表
  17. /// @param unitType 商户类型
  18. /// @param unitName 商户名称
  19. /// @param pageIndex 索引
  20. /// @param successHandler 请求成功
  21. /// @param failureHandler 请求失败
  22. - (NSNumber *)getShopListWitUnitType:(NSString *)unitType unitName:(NSString *)unitName pageIndex:(NSInteger)pageIndex successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  23. /**
  24. 获取商品列表
  25. @param pageIndex 页码
  26. @param categoryId 类目id 不是必传的
  27. @param productName 产品名称 不是必传的
  28. @param unitId 商户id 不是必传的
  29. @param isPack 是否礼包商品 1.是 0.忽略 -1.否
  30. @param successHandler 请求成功回调
  31. @param failureHandler 请求失败回调
  32. @return 请求标示
  33. */
  34. - (NSNumber *)getAllProductListWithPageIndex:(NSInteger)pageIndex categoryId:(NSString *)categoryId productName:(NSString *)productName unitId:(NSString *)unitId isPack:(NSString *)isPack successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  35. /// 根据商品id批量获取商品列表
  36. /// @param productIds 商品id,逗号分隔
  37. /// @param successHandler 请求成功
  38. /// @param failureHandler 请求失败
  39. - (NSNumber *)getProductsByIdsWithProductIds:(NSString *)productIds successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  40. /// 设置展示商品 api-app/v1/live/setShowProduct
  41. /// @param productId 展示商品 id 传 0 表示取消展示
  42. /// @param successHandler 请求成功
  43. /// @param failureHandler 请求失败
  44. - (NSNumber *)setShowProductById:(NSString *)productId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  45. /// 获取商品详情
  46. /// @param productId 商品id
  47. /// @param successHandler 请求成功
  48. /// @param failureHandler 请求失败
  49. - (NSNumber *)getProductInfoWithProductId:(NSString *)productId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  50. @end
  51. NS_ASSUME_NONNULL_END