1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- namespace Cash\Lib;
- use Dever;
- class Manage
- {
- public function info($audit_type, $audit)
- {
- $config = Dever::db('cash/order')->config;
- return $config['config_audit_type'][$audit_type] . $config['config_audit'][$audit];
- }
-
- public function orderUpdate($id, $name, $data)
- {
- Dever::config('base')->hook = true;
- $update = array();
- $audit = Dever::param('audit', $data);
- $info = Dever::db('cash/order')->one($id);
- if ($audit > 1 && $info['refund_id'] && $info['refund_id'] > 0) {
- Dever::load('shop/lib/refund')->set('buy')->action($info['refund_id'], $audit, false, false);
- if ($audit == 2) {
- Dever::db('cash/order')->update(array('where_id' => $id, 'status' => 2));
- }
- }
- }
- }
|