代码优化
This commit is contained in:
@@ -130,11 +130,14 @@ class WorkbenchMomentsJob
|
||||
|
||||
// 3) 下发
|
||||
$moments = new Moments();
|
||||
$moments->addJob($sendData);
|
||||
KfMoments::where(['id' => $val['id']])->update(['isSend' => 1]);
|
||||
$res = $moments->addJob($sendData);
|
||||
$res = json_decode($res, true);
|
||||
if ($res['code'] == 200){
|
||||
KfMoments::where(['id' => $val['id']])->update(['isSend' => 1]);
|
||||
|
||||
// 4) 统计
|
||||
$this->incrementSendStats($companyId, $userId, $allowed);
|
||||
// 4) 统计
|
||||
$this->incrementSendStats($companyId, $userId, $allowed);
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
Log::error("朋友圈同步任务异常: " . $e->getMessage());
|
||||
@@ -334,9 +337,12 @@ class WorkbenchMomentsJob
|
||||
];
|
||||
// 发送朋友圈
|
||||
$moments = new Moments();
|
||||
$moments->addJob($data);
|
||||
// 记录发送记录
|
||||
$this->recordSendHistory($workbench, $devices, $contentLibrary);
|
||||
$res = $moments->addJob($data);
|
||||
$res = json_decode($res,true);
|
||||
if ($res['code'] == 200){
|
||||
// 记录发送记录
|
||||
$this->recordSendHistory($workbench, $devices, $contentLibrary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user