QappRecommendService.php 609 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: admin
  5. * Date: 2018/8/20
  6. * Time: 10:42
  7. */
  8. namespace App\Modules\RecommendBook\Services;
  9. use App\Modules\RecommendBook\Models\QappRecommend;
  10. class QappRecommendService
  11. {
  12. public static function getRecommendByPacketId(int $channel, string $type, int $packet_id)
  13. {
  14. return QappRecommend::where([
  15. ['is_show', '=', 1],
  16. ['channel', '=', $channel],
  17. ['qapp_packet_id', '=', $packet_id],
  18. ['subject', '=', $type]
  19. ])->orderBy('sequence', 'asc')
  20. ->pluck('bid')
  21. ->all();
  22. }
  23. }