|
@@ -9,7 +9,7 @@ include('/share/lib/php/dever_package/excel/src/PHPExcel.php');
|
|
|
class Import
|
|
|
{
|
|
|
private $path = '/www/churen/data/';
|
|
|
- private $name = 'qiquan_2022_05_27_04.xlsx';
|
|
|
+ private $name = 'qiquan_2022_06_16_05.xlsx';
|
|
|
# 导入账户
|
|
|
public function get_api()
|
|
|
{
|
|
@@ -43,7 +43,7 @@ class Import
|
|
|
$where['key'] = trim($v['A']);
|
|
|
$where['mobile'] = trim($v['C']);
|
|
|
$where['clear'] = true;
|
|
|
- $info = Dever::db('option/member')->find($where);
|
|
|
+ $info = Dever::db('option/member')->one($where);
|
|
|
$update = $where;
|
|
|
$update['idcard'] = trim($v['D']);
|
|
|
$update['name'] = trim($v['B']);
|
|
@@ -143,6 +143,7 @@ class Import
|
|
|
|
|
|
$check = array();
|
|
|
$check_mobile = array();
|
|
|
+ $yes_mobile = array();
|
|
|
|
|
|
if ($data) {
|
|
|
$member = array();
|
|
@@ -176,15 +177,13 @@ class Import
|
|
|
}
|
|
|
|
|
|
$check_mobile[$mobile]++;
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- if ($member) {
|
|
|
- foreach ($member as $k => $v) {
|
|
|
- $where = array();
|
|
|
- $where['option_key'] = $k;
|
|
|
- $where['set_aid'] = $v;
|
|
|
- $state = Dever::db('option/member')->updates($where);
|
|
|
+ /*
|
|
|
+ $member = Dever::db('option/member')->find(array('key' => $key, 'mobile' => $mobile));
|
|
|
+ if ($member) {
|
|
|
+ $yes_mobile[$mobile] = $key;
|
|
|
+ }
|
|
|
+ */
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -211,6 +210,12 @@ class Import
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if ($yes_mobile) {
|
|
|
+ foreach ($yes_mobile as $k => $v) {
|
|
|
+ $table['body'][$k] = array($k, '账户索引' . $v . '下的手机号' . $k . '已存在');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
$result['数据异常'] = array
|
|
|
(
|
|
|
'type' => 'table',
|