quanwei
2025-11-01 121b714d710cf3c865f4a1b5efe81abec11056d1
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
<?php
 
 
namespace app\common\model\branch;
 
use app\common\model\BaseModel;
 
/**
 * 供应商服务保障模型
 */
class Position extends BaseModel
{
    protected $name = 'branch_position';
    protected $pk = 'position_id';
    
    /**
     * 所有
     * @return \think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public static function getALL($map = [])
    {
        $model = new static;
        if($map){
            $model = $model->where($map);
        }
        return $model->order(['weight' => 'desc'])->select();
    }
    /**
     * 详情
     */
    public static function detail($position_id)
    {
        return (new static())->find($position_id);
    }
}