| 123456789101112131415161718192021222324252627282930 | <?phpnamespace app\common\model;use think\Db;use think\Exception;class Cate extends Base{    public function updates($orgId)    {        $data = request()->post();        $data['org_id'] = $orgId;        return $this->updateInfo($data, 'Cate', '');    }    public function getAllByOrg($orgId){        $list = Db::name('Cate')            ->where('enable',1)            ->where('del',0)            ->field('id,title,price,deps')            ->where('org_id',$orgId)            ->select();        return $list;    }    public function info($id){        return $this->where('id',$id)->find();    }}
 |