Commit 40f18e3a by LiuJunYi

会员关联导入

parent 7d616c62
......@@ -42,6 +42,12 @@ class VipRelation extends AuthBase
unset($data[0]);
$params = [];
foreach ($data as $k => $v) {
if(in_array(null,$v)){
continue;
}
if(!strtotime($v[3])){
throw new Exception('会员到期格式不正确');
}
$arr = [
'nickname' => $v[0],
'mobile' => $v[1],
......@@ -57,7 +63,7 @@ class VipRelation extends AuthBase
return json(['code' => 0, 'msg' => '导入成功']);
} catch (Exception $e) {
Db::rollback();
return json(['code' => 1, 'msg' => $e->getMessage()]);
return json(['code' => 1, 'msg' => '导入失败']);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment