master
cody 5 months ago
parent 606bcc8844
commit f5f710798d

@ -149,7 +149,11 @@ class EmailRecordController extends BaseController
if ($validator->fails()) {
return $this->fail([ResponseCode::ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
}
$detail = $this->model->with('emailRecordUsers')->find($all['id']);
$detail = $this->model->with('emailTemplate', 'emailRecordUsers')->find($all['id']);
// 成功数量
$detail->success_count = $detail->emailRecordUsers->where('status', 1)->count();
// 失败数量
$detail->fail_count = $detail->emailRecordUsers->where('status', 2)->count();
return $this->success($detail);
}

Loading…
Cancel
Save