|
...
|
...
|
@@ -225,19 +225,15 @@ class SyncProject extends Command |
|
|
|
|
|
|
|
if($is_update == 1){
|
|
|
|
//4.0或5.0更新到6.0
|
|
|
|
|
|
|
|
//初始化数据库
|
|
|
|
$this->initializationMysql($id);
|
|
|
|
|
|
|
|
//初始账号
|
|
|
|
$this->createUser($data['project']['mobile'],$id,$data['project']['lead_name']);
|
|
|
|
|
|
|
|
//新增数据抓取任务
|
|
|
|
foreach ($param['api_type'] as $v_type){
|
|
|
|
UpdateLog::createLog($id,$v_type,$param['get_data_url']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DB::commit();
|
|
|
|
}catch (\Exception $e){
|
|
|
|
DB::rollBack();
|
|
...
|
...
|
@@ -272,6 +268,8 @@ class SyncProject extends Command |
|
|
|
public function saveProject($param){
|
|
|
|
if(isset($param['channel']) && !empty($param['channel'])){
|
|
|
|
$param['channel'] = Arr::a2s($param['channel']);
|
|
|
|
}else{
|
|
|
|
$param['channel'] = Arr::a2s(["user_id"=>"", "zone_id"=>"", "channel_id"=>""]);
|
|
|
|
}
|
|
|
|
$projectModel = new Project();
|
|
|
|
$info = $projectModel->read(['from_order_id'=>$param['from_order_id'],'delete_status'=>0]);
|
|
...
|
...
|
@@ -311,12 +309,8 @@ class SyncProject extends Command |
|
|
|
protected function savePayment($param,$id){
|
|
|
|
$param['project_id'] = $id;
|
|
|
|
$paymentModel= new Payment();
|
|
|
|
// if(isset($param['contract']) && !empty($param['contract'])){
|
|
|
|
$param['contract'] = Arr::a2s($param['contract']);
|
|
|
|
// }
|
|
|
|
// if(isset($param['bill']) && !empty($param['bill'])){
|
|
|
|
$param['bill'] = Arr::a2s($param['bill']);
|
|
|
|
// }
|
|
|
|
$param['contract'] = Arr::a2s($param['contract']);
|
|
|
|
$param['bill'] = Arr::a2s($param['bill']);
|
|
|
|
$info = $paymentModel->read(['project_id'=>$id]);
|
|
|
|
if($info !== false){
|
|
|
|
$paymentModel->edit($param,['id'=>$info['id']]);
|
...
|
...
|
|