rabin 3 years ago
parent
commit
556319f2e5
2 changed files with 7 additions and 7 deletions
  1. 0 1
      service/mail/database/area_stat.php
  2. 7 6
      service/mail/lib/Manage.php

+ 0 - 1
service/mail/database/area_stat.php

@@ -158,7 +158,6 @@ return array
             ),
             'list_name' => '收益代理商',
             'list'      => 'Dever::load("mail/lib/manage.area_member", {id})',
-            'list_order' => 15,
         ),
 
         'status'        => array

+ 7 - 6
service/mail/lib/Manage.php

@@ -814,15 +814,16 @@ class Manage
 
                 if (!$info) {
                     $stat_id = Dever::db('mail/area_stat')->insert($update);
-                    if ($v['type'] == 1) {
-                        $area_id[$k] = $stat_id;
-                    } elseif ($v['type'] == 2) {
-                        $area_id[$k] = $stat_id;
-                    }
                 } else {
-                    $update['where_id'] = $info['id'];
+                    $stat_id = $update['where_id'] = $info['id'];
                     Dever::db('mail/area_stat')->update($update);
                 }
+                
+                if ($v['type'] == 1) {
+                    $area_id[$k] = $stat_id;
+                } elseif ($v['type'] == 2) {
+                    $area_id[$k] = $stat_id;
+                }
             }
         }
         /*