mode_finorderAction.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /**
  3. * 此文件是流程模块【finorder.订单中心】对应控制器接口文件。
  4. */
  5. class mode_finorderClassAction extends inputAction{
  6. /**
  7. * 重写函数:保存前处理,主要用于判断是否可以保存
  8. * $table String 对应表名
  9. * $arr Array 表单参数
  10. * $id Int 对应表上记录Id 0添加时,大于0修改时
  11. * $addbo Boolean 是否添加时
  12. * return array('msg'=>'错误提示内容','rows'=> array()) 可返回空字符串,或者数组 rows 是可同时保存到数据库上数组
  13. */
  14. protected function savebefore($table, $arr, $id, $addbo){
  15. }
  16. /**
  17. * 重写函数:保存后处理,主要保存其他表数据
  18. * $table String 对应表名
  19. * $arr Array 表单参数
  20. * $id Int 对应表上记录Id
  21. * $addbo Boolean 是否添加时
  22. */
  23. protected function saveafter($table, $arr, $id, $addbo){
  24. }
  25. public function orderquerenAjax()
  26. {
  27. $ids = c('check')->onlynumber($this->post('ids'));
  28. if(!$ids)return returnerror('e');
  29. $flow = m('flow')->initflow('finorder');
  30. $flow->paysuccess($ids);
  31. return returnsuccess();
  32. }
  33. protected function storeafter($table, $rows)
  34. {
  35. return array(
  36. 'rows' => $rows,
  37. 'zhangid' => $this->option->getval('finorderzhangid')
  38. );
  39. }
  40. public function savezhangidAjax()
  41. {
  42. $this->option->setval('finorderzhangid', c('check')->onlynumber($this->get('zhangid')));
  43. return 'ok';
  44. }
  45. public function createjizhangAjax()
  46. {
  47. $ids = c('check')->onlynumber($this->get('ids'));
  48. if(!$ids)return returnerror('err');
  49. $flow = m('flow')->initflow('finorder');
  50. return $flow->createJizhang($ids);
  51. }
  52. }
粤ICP备19079148号