12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class DocumentCate extends Base
- {
- // 新增
- public function save(){
- model('DocumentCate')->add();
- HelpHander::success([],'操作成功');
- }
- // 编辑
- public function update(){
- model('DocumentCate')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('DocumentCate')->info($id);
- HelpHander::success($ret);
- }
- // 列表
- public function list(){
- $ret = model('DocumentCate')->lists($this->orgId);
- HelpHander::success($ret);
- }
- // 全部列表
- public function all(){
- $ret = model('DocumentCate')->all($this->orgId);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('DocumentCate')->del($id);
- HelpHander::success([],'操作成功');
- }
- public function queryDocumentList(){
- $title = input('title','','trim');
- $ret = model('DocumentCate')->queryDocumentList($title,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- }
|