123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class UserRetired extends Base
- {
- // 新增
- public function save(){
- model('UserRetired')->add();
- HelpHander::success([],'操作成功');
- }
- // 编辑
- public function update(){
- model('UserRetired')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('UserRetired')->info($id);
- HelpHander::success($ret);
- }
- // 列表
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $name = input('name','','trim');
- $phone = input('phone','','trim');
- $ret = model('UserRetired')->lists($page,$size,$this->orgId,$name,$phone);
- HelpHander::success($ret);
- }
- // 修改状态
- public function updateStatus(){
- $id = input('id/d',0);
- $enable = input('status/d',0);
- model('UserRetired')->changeStatus($id,$enable);
- HelpHander::success([],'操作成功');
- }
- // 获取退休人员列表,去除已经加入到工资表中的人员
- public function retiredUser(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $name = input('name','','trim');
- $phone = input('phone','','trim');
- $ret = model('UserRetired')->retiredUser($page,$size,$name,$phone,$this->orgId);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('UserRetired')->del($id);
- HelpHander::success([],'操作成功');
- }
- }
|