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