123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class SalaryYear extends Base
- {
- public function save(){
- model('SalaryYear')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('SalaryYear')->info($id);
- HelpHander::success($ret);
- }
- // 列表
- public function ulist(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $name = input('name','','trim');
- $year = input('year','','trim');
- $ret = model('SalaryYear')->lists($page,$size,$name,$year,$this->userId);
- HelpHander::success($ret);
- }
- // 列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $name = input('name','','trim');
- $year = input('year','','trim');
- $ret = model('SalaryYear')->lists2($page,$size,$name,$year);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('SalaryYear')->del($id);
- HelpHander::success([],'操作成功');
- }
- // 导出
- public function export(){
- $name = input('name','','trim');
- $year = input('year','','trim');
- $ret = model('SalaryYear')->export($name,$year);
- HelpHander::success($ret);
- }
- }
|