|
@@ -85,27 +85,38 @@ class Manage
|
|
|
$update = array();
|
|
|
$audit = Dever::param('audit', $data);
|
|
|
$desc = Dever::param('audit_desc', $data);
|
|
|
- $info = Dever::db('option/agreement')->one($id);
|
|
|
- if ($audit > 1 && $info) {
|
|
|
+ if ($audit > 1) {
|
|
|
$admin = Dever::load('manage/auth.info');
|
|
|
$update['audit_date'] = time();
|
|
|
$update['audit_admin'] = $admin['id'];
|
|
|
if ($audit == 3) {
|
|
|
$update['status'] = 2;
|
|
|
}
|
|
|
-
|
|
|
- $update['where_id'] = $info['id'];
|
|
|
- $state = Dever::db('option/agreement')->update($update);
|
|
|
- if ($state && $audit == 3) {
|
|
|
- Dever::load('option/lib/cash.setValue_commit', $info);
|
|
|
+
|
|
|
+ $mul_type = Dever::config('base')->mul_type;
|
|
|
+ if ($mul_type == 2) {
|
|
|
+ $list = Dever::db('option/agreement')->select(array('status' => 2));
|
|
|
+ } else {
|
|
|
+ $list = explode(',', $id);
|
|
|
}
|
|
|
- if ($audit == 3) {
|
|
|
- if (Dever::project('sms')) {
|
|
|
- Dever::load('sms/api')->send('qiquan_audit', $info['mobile'], array('name' => $info['name']));
|
|
|
- }
|
|
|
- } elseif ($audit == 4) {
|
|
|
- if (Dever::project('sms')) {
|
|
|
- Dever::load('sms/api')->send('qiquan_audit', $info['mobile'], array('name' => $info['name'], 'content' => $desc));
|
|
|
+
|
|
|
+ foreach ($list as $k => $v) {
|
|
|
+ $info = Dever::db('option/agreement')->one($v);
|
|
|
+ if ($info) {
|
|
|
+ $update['where_id'] = $info['id'];
|
|
|
+ $state = Dever::db('option/agreement')->update($update);
|
|
|
+ if ($state && $audit == 3) {
|
|
|
+ Dever::load('option/lib/cash.setValue_act', $info);
|
|
|
+ }
|
|
|
+ if ($audit == 3) {
|
|
|
+ if (Dever::project('sms')) {
|
|
|
+ Dever::load('sms/api')->send('qiquan_audit', $info['mobile'], array('name' => $info['name']));
|
|
|
+ }
|
|
|
+ } elseif ($audit == 4) {
|
|
|
+ if (Dever::project('sms')) {
|
|
|
+ Dever::load('sms/api')->send('qiquan_audit', $info['mobile'], array('name' => $info['name'], 'content' => $desc));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|