|
|
|
@ -15,12 +15,14 @@ class UserService implements UserServiceInterface |
|
|
|
* 判定条件: |
|
|
|
* 没有在平台下过单(包括线上和线下) |
|
|
|
* @param $user_id |
|
|
|
* @param $order_main_id |
|
|
|
* @return mixed|void |
|
|
|
*/ |
|
|
|
public function isStageNewUser($user_id): bool |
|
|
|
public function isStageNewUser($user_id, $order_main_id): bool |
|
|
|
{ |
|
|
|
$exist = OrderMain::query() |
|
|
|
->where(['user_id' => $user_id]) |
|
|
|
->where('id', '!=', $order_main_id) |
|
|
|
->where(function ($query){ |
|
|
|
$query->whereIn('state', [OrderMain::ORDER_STATE_COMPLETE,OrderMain::ORDER_STATE_EVALUATED,OrderMain::ORDER_STATE_UNREFUND]) |
|
|
|
->orWhereIn('dm_state', [OrderMain::ORDER_STATE_UNTAKE,OrderMain::ORDER_STATE_DELIVERY]); |
|
|
|
|