Browse Source

Merge branch 'master' of http://git.dever.cc/dever-product/churen

Your Name 2 years ago
parent
commit
c5612a4810
2 changed files with 19 additions and 1 deletions
  1. 4 1
      service/agent/database/member.php
  2. 15 0
      service/option/lib/Import.php

+ 4 - 1
service/agent/database/member.php

@@ -182,7 +182,7 @@ return array
             'desc'      => '',
             'update'    => 'date',
             'callback'  => 'maketime',
-            // 'search'    => $search_auth == 2 ? 'date' : false,
+            'search'    => 'date',
             // 'list'        => '{rdate} > 0 ? date("Y-m-d H:i", {rdate}) : "无"',
             'list'      => $search_auth == 1 ? 'Dever::load("agent/lib/member.set_rdate", {id})' : false,
             'list_order' => 100,
@@ -491,6 +491,7 @@ return array
             'default'   => '0',
             'desc'      => '余额',
             'match'     => 'is_numeric',
+            'search'    => 'exp',
             'update'    => 'text',
             'list_name' => '余额<br />直推业绩<br />团队业绩',
             'list'      => $search_auth == 1 ?'"{cash}<br />{sell}<br />{group_sell}"' : false,
@@ -502,6 +503,7 @@ return array
             'name'      => '直推业绩',
             'default'   => '0',
             'desc'      => '销售业绩',
+            'search'    => 'exp',
             'match'     => 'is_numeric',
             'update'    => 'text',
             'list'      => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_sell",{id})' : false,
@@ -514,6 +516,7 @@ return array
             'default'   => '0',
             'desc'      => '团队销售业绩',
             'match'     => 'is_numeric',
+            'search'    => 'exp',
             'update'    => 'text',
             'list'      => $search_auth == 2 ? 'Dever::load("agent/lib/member.new_groupsell",{id})' : false,
         ),

+ 15 - 0
service/option/lib/Import.php

@@ -142,6 +142,7 @@ class Import
         $table_status['body'][0][1] = 0;
 
         $check = array();
+        $check_mobile = array();
 
         if ($data) {
             $member = array();
@@ -149,6 +150,7 @@ class Import
                 $state = preg_match(Dever::rule('mobile'), $v['C']);
                 if ($state) {
                     $key = $v['A'];
+                    $mobile = $v['C'];
                     $update = array();
                     $update['main'] = $v['E'] == 1 ? 1 : 2;
                     if (!isset($check[$key])) {
@@ -168,6 +170,12 @@ class Import
                     } else {
                         $table_status['body'][0][1] += 1;
                     }
+
+                    if (!isset($check_mobile[$mobile])) {
+                        $check_mobile[$mobile] = 0;
+                    }
+                    
+                    $check_mobile[$mobile]++;
                 }
             }
 
@@ -196,6 +204,13 @@ class Import
                 $table['body'][$k] = array($k, '主账户数量等于' . $v['num']);
             }
         }
+
+        foreach ($check_mobile as $k => $v) {
+            if ($v > 1) {
+                $table['body'][$k] = array($k, '手机号数量为' . $v);
+            }
+        }
+
         $result['数据异常'] = array
         (
             'type' => 'table',