Manage.php 915 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Cash\Lib;
  3. use Dever;
  4. class Manage
  5. {
  6. public function info($audit_type, $audit)
  7. {
  8. $config = Dever::db('cash/order')->config;
  9. return $config['config_audit_type'][$audit_type] . $config['config_audit'][$audit];
  10. }
  11. /**
  12. * 更新信息
  13. *
  14. * @return mixed
  15. */
  16. public function orderUpdate($id, $name, $data)
  17. {
  18. Dever::config('base')->hook = true;
  19. $update = array();
  20. $audit = Dever::param('audit', $data);
  21. $info = Dever::db('cash/order')->one($id);
  22. if ($audit > 1 && $info['refund_id'] && $info['refund_id'] > 0) {
  23. Dever::load('shop/lib/refund')->set('buy')->action($info['refund_id'], $audit, false, false);
  24. if ($audit == 2) {
  25. Dever::db('cash/order')->update(array('where_id' => $id, 'status' => 2));
  26. }
  27. }
  28. }
  29. }