shensong 5 年 前
コミット
8067a76ab5
共有3 個のファイルを変更した22 個の追加2 個の削除を含む
  1. 7 0
      app/CustomerCoupons.php
  2. 9 2
      app/CustomerGiftReceives.php
  3. 6 0
      app/CustomerVip.php

+ 7 - 0
app/CustomerCoupons.php

@@ -15,4 +15,11 @@ class CustomerCoupons extends Model
15 15
 {
16 16
     protected $table = 'customer_coupons';
17 17
     public $timestamps = false;
18
+
19
+    public static function getCustomerCouponsLog($phone) {
20
+        $self = new self();
21
+        $log = $self->where('phone',$phone)->get();
22
+        $log = json_decode(json_encode($log),true);
23
+        return $log;
24
+    }
18 25
 }

+ 9 - 2
app/CustomerGiftReceives.php

@@ -2,8 +2,8 @@
2 2
 /**
3 3
  * Created by PhpStorm.
4 4
  * User: shensong
5
- * Date: 2019/11/29
6
- * Time: 17:31
5
+ * Date: 2019/12/2
6
+ * Time: 15:26
7 7
  */
8 8
 
9 9
 namespace App;
@@ -15,4 +15,11 @@ class CustomerGiftReceives extends Model
15 15
 {
16 16
     protected $table = 'customer_gift_receives';
17 17
     public $timestamps = false;
18
+
19
+    public static function getCustomerReceivesLog($phone,$type) {
20
+        $self = new self();
21
+        $log = $self->where('phone',$phone)->where('gift_type',$type)->get();
22
+        $log = json_decode(json_encode($log),true);
23
+        return $log;
24
+    }
18 25
 }

+ 6 - 0
app/CustomerVip.php

@@ -15,4 +15,10 @@ class CustomerVip extends Model
15 15
 {
16 16
     public $timestamps = false;
17 17
     protected $table = 'customer_vip';
18
+
19
+    public static function getCustomerInformation($phone) {
20
+        $self = new self();
21
+        $info = $self->where('phone',$phone)->where('is_del',0)->first();
22
+        return $info;
23
+    }
18 24
 }