OrderBikeOperateRepository.php 770 B

12345678910111213141516171819202122232425262728293031323334353637
  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/4/11 14:30
  12. */
  13. namespace App\Repositories;
  14. use App\Models\OrderBikeOperate;
  15. class OrderBikeOperateRepository extends BaseRepository
  16. {
  17. public function __construct(OrderBikeOperate $orderBikeOperate)
  18. {
  19. $this->model = $orderBikeOperate;
  20. }
  21. public function checkLowPowerOffLock($order_id)
  22. {
  23. return $this->model->query()
  24. ->where('order_id', $order_id)
  25. ->where('is_admin', OrderBikeOperate::IS_ADMIN_SYSTEM)
  26. ->where('type', OrderBikeOperate::TYPE_CLONE_BIKE)
  27. ->first();
  28. }
  29. }