Browse Source

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

sunhao 5 years ago
parent
commit
a26041412b
3 changed files with 22 additions and 2 deletions
  1. 7 0
      app/CustomerCoupons.php
  2. 9 2
      app/CustomerGiftReceives.php
  3. 6 0
      app/CustomerVip.php

+ 7 - 0
app/CustomerCoupons.php

15
 {
15
 {
16
     protected $table = 'customer_coupons';
16
     protected $table = 'customer_coupons';
17
     public $timestamps = false;
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
 /**
2
 /**
3
  * Created by PhpStorm.
3
  * Created by PhpStorm.
4
  * User: shensong
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
 namespace App;
9
 namespace App;
15
 {
15
 {
16
     protected $table = 'customer_gift_receives';
16
     protected $table = 'customer_gift_receives';
17
     public $timestamps = false;
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
 {
15
 {
16
     public $timestamps = false;
16
     public $timestamps = false;
17
     protected $table = 'customer_vip';
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
 }