瀏覽代碼

Merge branch 'master' of http://101.200.220.49:8001/sunhao/seafood

sunhao 5 年之前
父節點
當前提交
a26041412b
共有 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
 }