|
@@ -10,6 +10,7 @@ namespace App;
|
10
|
10
|
|
11
|
11
|
|
12
|
12
|
use Illuminate\Database\Eloquent\Model;
|
|
13
|
+use Illuminate\Support\Facades\DB;
|
13
|
14
|
|
14
|
15
|
class CustomerGiftReceives extends Model
|
15
|
16
|
{
|
|
@@ -54,6 +55,7 @@ class CustomerGiftReceives extends Model
|
54
|
55
|
$self = new self();
|
55
|
56
|
$mtime = date('Y-m-01');
|
56
|
57
|
if($type == 1){
|
|
58
|
+ $customerInfo = CustomerVip::getCustomerInformation($phone);
|
57
|
59
|
$num = CustomerGiftReceives::getCustomerResidualTimes($phone,$customerInfo->vip_end_time);
|
58
|
60
|
$if_m_gift = DB::table('customer_gift_receives')->where('phone', $phone)->where('is_del',0)->where('gift_type', 0)->where('dtime', '>=', $mtime)->first();
|
59
|
61
|
if(empty($if_m_gift) && ($num >0)){
|