WalletLogRepository.php 702 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. *
  4. *
  5. * @category xxx
  6. * @package PSR
  7. * @subpackage Documentation\API
  8. * @author xxx <xxx@xxx.com>
  9. * @license GPL https://xxx.com
  10. * @link https://xxx.com
  11. * @ctime: 2020/3/23 9:16
  12. */
  13. namespace App\Repositories;
  14. use App\Models\WalletLog;
  15. class WalletLogRepository extends BaseRepository
  16. {
  17. public function __construct(WalletLog $walletLog)
  18. {
  19. $this->model = $walletLog;
  20. }
  21. public function byUserIdGetWalletLog($user_id){
  22. $data = $this->model
  23. ->where('user_id',$user_id)
  24. ->whereIn('type',WalletLog::$userShowTypeMaps)
  25. ->orderByDesc('id')
  26. ->paginate();
  27. return $data;
  28. }
  29. }