123456789101112131415161718192021222324252627282930313233 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Mead
- * Date: 2019/8/6
- * Time: 9:16 PM
- */
- namespace App\Repositories;
- use App\Models\DepositOrder;
- class DepositOrderRepository extends BaseRepository
- {
- protected $model;
- public function __construct(DepositOrder $model)
- {
- $this->model = $model;
- }
- /**
- * 获取用户的押金订单
- * @param $user_id
- * @return mixed
- * User: Mead
- */
- public function byUserIdGetUserDepositOrder($user_id)
- {
- return $this->model->where('user_id', $user_id)->where('pay_status', DepositOrder::PAY_STATUS_OK)->where('is_refund', DepositOrder::REFUND_NO)->first();
- }
- }
|