FinanceLog.php 869 B

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