调整活动参与状态查询
This commit is contained in:
parent
1b511a8e5a
commit
f96c499d00
@ -117,16 +117,16 @@ class StoreActivityUserDao extends BaseDao
|
||||
->where('status', StoreActivityOrder::STATUS_VALID)
|
||||
->find();
|
||||
$userInfo = User::where('spread_uid', $userId)->field('uid,nickname,avatar')->select()->toArray();
|
||||
if (empty($myOrder)||empty($myOrder['total_amount'])) {
|
||||
if (empty($myOrder) || empty($myOrder['pay_price'])) {
|
||||
return ['target' => $target, 'allow_receive' => false, 'user_info' => $userInfo];
|
||||
}
|
||||
$storeConsumptionUserDao = new StoreConsumptionUserDao();
|
||||
$scope = $storeConsumptionUserDao->getScope($consumption, $myOrder['total_amount']);
|
||||
$scope = $storeConsumptionUserDao->getScope($consumption, $myOrder['pay_price']);
|
||||
$orders = StoreActivityOrder::where('spread_id', $userId)
|
||||
->whereIn('user_id', array_column($userInfo, 'uid'))
|
||||
->where('activity_id', $activityId)
|
||||
->where('is_first_order', StoreActivityOrder::IS_FIRST_ORDER)
|
||||
->where('total_amount', '>=', $scope['start'])
|
||||
->where('pay_price', '>=', $scope['start'])
|
||||
->where('status', StoreActivityOrder::STATUS_VALID)
|
||||
->select()->toArray();
|
||||
$orders = reset_index($orders, 'user_id');
|
||||
|
Loading…
x
Reference in New Issue
Block a user