Browse Source

修复五分钱的奖励bug

master
weigang 5 years ago
parent
commit
94f7ca0f68
  1. 2
      app/Service/v3/Implementations/UserService.php

2
app/Service/v3/Implementations/UserService.php

@ -35,7 +35,7 @@ class UserService implements UserServiceInterface
public function isStoreFirstOrderToday($userId, $storeId, $currentOrderId, $limitAmount = 3)
{
return !Order::query()
->join('lanzu_order_main as main', 'main.id', '=', 'lanzu_order.order_main_id')
->join('lanzu_order_main as main', 'main.global_order_id', '=', 'lanzu_order.order_main_id')
->where(['main.user_id' => $userId, 'lanzu_order.store_id' => $storeId, 'main.type' => OrderType::OFFLINE])
->whereIn('main.state', OrderState::FINISH)
->where('lanzu_order.created_at', '>=', strtotime(date('Y-m-d 00:00:00')))

Loading…
Cancel
Save