liyaozhi
2025-10-28 1320688354fd168c51cf2e05f29a2253f4ed9c00
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
 
namespace app\admin\model\admin;
 
use app\common\model\admin\Store as StoreModel;
 
/**
 * 超管后台门店模型
 */
class Store extends StoreModel
{
    /**
     * 获取全部
     */
    public static function getAll()
    {
        $model = new static;
        $data = $model->where('is_delete', '=', 0)->select();
        $data->each(function($item,$key){
            $item['expire_status'] = is_expire_status($item['end_date']);
            $item['status'] = status($item['status']);
            $item['date_value'] = [$item['register_date'],$item['end_date']];
 
            $item['month_register'] = 0;
        });
        return $data;
    }
 
    /**
     * 新增
     */
    public function add($data)
    {
        return $this->save($data);
    }
 
 
    /**
     * 软删除
     */
    public function setDelete()
    {
        return $this->save(['is_delete' => 1]);
    }
 
    /**
     * 更新记录
     */
    public function edit($data)
    {
        return $this->save($data);
    }
 
}