|
@@ -81,7 +81,7 @@ class Index extends Api
|
|
|
if (!$userdata) {
|
|
|
$returndata= 'no data';
|
|
|
} else {
|
|
|
- Db::startTrans();
|
|
|
+ // Db::startTrans();
|
|
|
$userids = array_column($userdata, 'id');
|
|
|
$userlink = db('userlink')
|
|
|
->join(['fa_link'], 'fa_userlink.link_id = fa_link.id')
|
|
@@ -106,14 +106,16 @@ class Index extends Api
|
|
|
'uid' => $val['uid'],
|
|
|
'status' => 0
|
|
|
];
|
|
|
- $userlinkdata[]=['id'=>$val['userlinkid'],'income'=>$val['userlinkid']+$income];
|
|
|
+ $userlinkdata[]=['id'=>$val['userlinkid'],'income'=>$val['income']+$income];
|
|
|
|
|
|
}
|
|
|
- $this->userlinkModel->saveAll($userlinkdata);
|
|
|
- $this->recordModel->saveAll($savedata);
|
|
|
+ print_r($userlinkdata);
|
|
|
+ print_r($savedata);
|
|
|
+// $this->userlinkModel->saveAll($userlinkdata);
|
|
|
+// $this->recordModel->saveAll($savedata);
|
|
|
$returndata= 'insert ' . count($savedata) . ' record';
|
|
|
}
|
|
|
- Db::commit();
|
|
|
+ // Db::commit();
|
|
|
}
|
|
|
return $returndata;
|
|
|
}
|