PddController.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. <?php
  2. namespace App\Http\Controllers\Pdd;
  3. use App\Http\Controllers\BaseController;
  4. use App\Http\Logic\Pdd\PddLogic;
  5. class PddController extends BaseController
  6. {
  7. /**
  8. * @SWG\Get(
  9. * path="/pdd/cate/list",
  10. * tags={"拼多多导购管理"},
  11. * summary="类目/活动/频道接口",
  12. * description="类目/活动/频道接口",
  13. * produces={"application/json"},
  14. * @SWG\Response(
  15. * response="200",
  16. * description="success",
  17. * @SWG\Schema(
  18. * @SWG\Property(
  19. * property="cate",
  20. * type="array",
  21. * description="类目",
  22. * @SWG\Items(
  23. * @SWG\Property(
  24. * property="id",
  25. * type="string",
  26. * description="id"
  27. * ),
  28. * @SWG\Property(
  29. * property="name",
  30. * type="string",
  31. * description="名称"
  32. * )
  33. * )
  34. * ),
  35. * @SWG\Property(
  36. * property="activity",
  37. * type="array",
  38. * description="活动",
  39. * @SWG\Items(
  40. * @SWG\Property(
  41. * property="id",
  42. * type="string",
  43. * description="id"
  44. * ),
  45. * @SWG\Property(
  46. * property="name",
  47. * type="string",
  48. * description="名称"
  49. * )
  50. * )
  51. * ),
  52. * @SWG\Property(
  53. * property="channel",
  54. * type="array",
  55. * description="频道",
  56. * @SWG\Items(
  57. * @SWG\Property(
  58. * property="id",
  59. * type="string",
  60. * description="id"
  61. * ),
  62. * @SWG\Property(
  63. * property="name",
  64. * type="string",
  65. * description="名称"
  66. * )
  67. * )
  68. * )
  69. * )
  70. * ),
  71. * @SWG\Response(
  72. * response="403",
  73. * description="fail",
  74. * @SWG\Schema(ref="#/definitions/ErrorBean")
  75. * )
  76. * )
  77. */
  78. public function getCateList()
  79. {
  80. $datas = PddLogic::getCateListLogic();
  81. return $this->success($datas);
  82. }
  83. /**
  84. * @SWG\Get(
  85. * path="/pdd/goods/list",
  86. * tags={"拼多多导购管理"},
  87. * summary="商品列表接口",
  88. * description="商品列表接口",
  89. * produces={"application/json"},
  90. * @SWG\Parameter(
  91. * name="page",
  92. * in="query",
  93. * description="第几页",
  94. * type="string"
  95. * ),
  96. * @SWG\Parameter(
  97. * name="activity_id",
  98. * in="query",
  99. * description="活动ID",
  100. * type="string"
  101. * ),
  102. * @SWG\Parameter(
  103. * name="cat_id",
  104. * in="query",
  105. * description="类目ID",
  106. * type="string"
  107. * ),
  108. * @SWG\Parameter(
  109. * name="channel_id",
  110. * in="query",
  111. * description="频道ID",
  112. * type="string"
  113. * ),
  114. * @SWG\Response(
  115. * response="200",
  116. * description="success",
  117. * @SWG\Schema(
  118. * @SWG\Property(
  119. * property="total",
  120. * type="string",
  121. * description="数量"
  122. * ),
  123. * @SWG\Property(
  124. * property="list",
  125. * type="array",
  126. * description="数据",
  127. * @SWG\Items(
  128. * @SWG\Property(
  129. * property="goods_name",
  130. * type="string",
  131. * description="商品名称"
  132. * ),
  133. * @SWG\Property(
  134. * property="goods_desc",
  135. * type="string",
  136. * description="商品描述"
  137. * ),
  138. * @SWG\Property(
  139. * property="goods_image_url",
  140. * type="string",
  141. * description="商品主图"
  142. * ),
  143. * @SWG\Property(
  144. * property="goods_sign",
  145. * type="string",
  146. * description="商品ID"
  147. * ),
  148. * @SWG\Property(
  149. * property="goods_thumbnail_url",
  150. * type="string",
  151. * description="商品缩略图"
  152. * ),
  153. * @SWG\Property(
  154. * property="mall_name",
  155. * type="string",
  156. * description="店铺名称"
  157. * ),
  158. * @SWG\Property(
  159. * property="promotion_rate",
  160. * type="string",
  161. * description="佣金比例,千分比"
  162. * ),
  163. * @SWG\Property(
  164. * property="sales_tip",
  165. * type="string",
  166. * description="销售量"
  167. * )
  168. * )
  169. * )
  170. * )
  171. * ),
  172. * @SWG\Response(
  173. * response="403",
  174. * description="fail",
  175. * @SWG\Schema(ref="#/definitions/ErrorBean")
  176. * )
  177. * )
  178. */
  179. public function getGoodsList()
  180. {
  181. $datas = PddLogic::getGoodsListLogic();
  182. return $this->success($datas);
  183. }
  184. /**
  185. * @SWG\Get(
  186. * path="/pdd/goods/recommendurl",
  187. * tags={"拼多多导购管理"},
  188. * summary="生成商品推广链接接口",
  189. * description="生成商品推广链接接口",
  190. * produces={"application/json"},
  191. * @SWG\Parameter(
  192. * name="goods_sign",
  193. * in="query",
  194. * description="商品ID",
  195. * type="string"
  196. * ),
  197. * @SWG\Response(
  198. * response="200",
  199. * description="success",
  200. * @SWG\Schema(
  201. * @SWG\Property(
  202. * property="link_url",
  203. * type="string",
  204. * description="推广链接"
  205. * )
  206. * )
  207. * ),
  208. * @SWG\Response(
  209. * response="403",
  210. * description="fail",
  211. * @SWG\Schema(ref="#/definitions/ErrorBean")
  212. * )
  213. * )
  214. */
  215. public function getGoodsRecommendUrl()
  216. {
  217. $datas = PddLogic::getGoodsRecommendUrlLogic();
  218. return $this->success($datas);
  219. }
  220. }