|
@@ -222,7 +222,7 @@ class Customar extends BaseController
|
|
|
$datainfo = Db::name('customer_info')->save($data);
|
|
|
// var_dump(Db::name('customer_info')->getLastSql());
|
|
|
if ($datainfo) {
|
|
|
- //$var=[];
|
|
|
+ // $var=[];
|
|
|
//var_dump($customer_member);
|
|
|
foreach ($customer_member as $value) {
|
|
|
// $to = GetInfoById($token, ['id' => $value['ownerid']]);
|
|
@@ -236,7 +236,8 @@ class Customar extends BaseController
|
|
|
// $item['ownerid'] = $info['id'];
|
|
|
$item['commobile'] =isset($value['mobile']) ? $value['mobile'] : "";
|
|
|
$item['comtel'] = "";
|
|
|
- $item['id'] = isset($value['id']) ? $value['id'] : "";
|
|
|
+ // $item['id'] =isset($value['id']) ? $value['id'] : "";
|
|
|
+ isset($value['id'])&&$value['id']!=="" ? $item['id'] = $value['id']:'';
|
|
|
$item['contactor'] = isset($value['contactor']) ? $value['contactor'] : "";
|
|
|
$item['position'] = isset($value['position']) ? $value['position'] : "";
|
|
|
$item['wxaccount'] = isset($value['wxaccount']) ? $value['wxaccount'] : "";
|
|
@@ -247,14 +248,14 @@ class Customar extends BaseController
|
|
|
$item['status'] = $value['status'];
|
|
|
$item['createrid'] = $createrid;
|
|
|
$item['creater'] = $creater;
|
|
|
- $item['companyNo'] = $companyNo;
|
|
|
+ $item['companyNo'] = isset($value['companyNo']) ? $value['companyNo'] : "";
|
|
|
$item['is_del'] = 0;
|
|
|
- // $item['addtime']=date("Y-m-d H:i:s");
|
|
|
+ $item['addtime']=date("Y-m-d H:i:s");
|
|
|
$item['updatetime'] = date("Y-m-d H:i:s");
|
|
|
- // $var[]=$item;
|
|
|
+ // $var[]=$item;
|
|
|
}
|
|
|
$vp = Db::name('customer_member')->save($item);
|
|
|
- // var_dump(Db::name('customer_member')->getLastSql());
|
|
|
+ //var_dump(Db::name('customer_member')->getLastSql());
|
|
|
if ($vp == false) {
|
|
|
Db::rollback();
|
|
|
return error_show(1003, "更新失败");
|