You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

  1. <?php
  2. namespace App\Service\v3\Implementations;
  3. use App\Service\v3\Interfaces\GoodsServiceInterface;
  4. use Hyperf\DbConnection\Db;
  5. use App\Model\v3\Goods;
  6. class GoodsService implements GoodsServiceInterface
  7. {
  8. public function detail()
  9. {
  10. $goods['detail'] = Goods::query()->where('id',35)->get();
  11. $goods['banner'] = $this->getBanner();
  12. return $goods;
  13. }
  14. public function getBanner()
  15. {
  16. $banner = [
  17. [
  18. 'id' => 1,
  19. 'type' => 1,
  20. 'path' => 'https://img.lanzu.vip/static/img/dic_banners/dic_banner_0.jpg'
  21. ],
  22. [
  23. 'id' => 2,
  24. 'type' => 1,
  25. 'path' => 'https://img.lanzu.vip/static/img/dic_banners/dic_banner_1.jpg'
  26. ]
  27. ];
  28. return $banner;
  29. }
  30. public function do()
  31. {
  32. // TODO: Implement do() method.
  33. }
  34. public function check($goodsId)
  35. {
  36. // TODO: Implement check() method.
  37. }
  38. public function undo()
  39. {
  40. // TODO: Implement undo() method.
  41. }
  42. }