AttendanceGroup.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. use think\Db;
  6. class AttendanceGroup extends Base
  7. {
  8. // 列表
  9. public function list(){
  10. $page = input('page/d',1);
  11. $size = input('size/d',10);
  12. $name = input('name','','trim');
  13. $ret = model('AttendanceGroup')->lists($page,$size,$name,$this->orgId);
  14. HelpHander::success($ret);
  15. }
  16. // 新增
  17. public function save(){
  18. model('AttendanceGroup')->add();
  19. HelpHander::success([],'操作成功');
  20. }
  21. // 编辑
  22. public function update(){
  23. model('AttendanceGroup')->add();
  24. HelpHander::success([],'操作成功');
  25. }
  26. // 删除
  27. public function del(){
  28. $id = input('id/d',0);
  29. model('AttendanceGroup')->del($id);
  30. HelpHander::success([],'操作成功');
  31. }
  32. // 详情
  33. public function detail(){
  34. $id = input('id/d',0);
  35. $ret = model('AttendanceGroup')->info($id);
  36. HelpHander::success($ret);
  37. }
  38. }