SalaryApply.php 708 B

12345678910111213141516171819202122232425262728293031323334
  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 SalaryApply extends Base
  7. {
  8. public function save(){
  9. model('SalaryApply')->add();
  10. HelpHander::success([],'操作成功');
  11. }
  12. // 列表
  13. public function all(){
  14. $type = input('type/d',0);
  15. if(!in_array($type,[1,2,3,4,5,6,7,8,9])){
  16. HelpHander::error('参数错误');
  17. }
  18. $ret = model('SalaryApply')->all($type);
  19. HelpHander::success($ret);
  20. }
  21. // 删除
  22. public function del(){
  23. $id = input('id/d',0);
  24. model('SalaryApply')->del($id);
  25. HelpHander::success([],'操作成功');
  26. }
  27. }