master
cody 4 months ago
parent b9629be8ba
commit 94b1f6e3f4

@ -196,9 +196,8 @@ class OtherController extends CommonController
public function test()
{
$appointmentModel = Appointment::find(288);
$appointmentConfig = $appointmentModel->site_detail;
$result = (new Appointment())->appointDoor($appointmentModel, $appointmentConfig);
$door = new DoorRepository();
$result = $door->getAllDoorInfo();
dd($result);
}

@ -624,6 +624,7 @@ class UserController extends BaseController
* description="",
* @OA\Parameter(name="ids", in="query", @OA\Schema(type="string"), required=true, description="英文逗号分隔的id数组"),
* @OA\Parameter(name="is_schoolmate", in="query", @OA\Schema(type="string"), required=true, description="是否校友库-0否1是"),
* @OA\Parameter(name="is_black", in="query", @OA\Schema(type="string"), required=true, description="是否黑名单-0否1是"),
* @OA\Parameter(name="token", in="query", @OA\Schema(type="string"), required=true, description="token"),
* @OA\Response(
* response="200",
@ -637,16 +638,18 @@ class UserController extends BaseController
$messages = [
'ids.required' => '编号必填',
'is_schoolmate.required' => '是否校友库必填',
'is_black.required' => '是否黑名单必填',
];
$validator = Validator::make($all, [
'ids' => 'required',
'is_schoolmate' => 'required',
'is_black' => 'required'
], $messages);
if ($validator->fails()) {
return $this->fail([StarterResponseCode::START_ERROR_PARAMETER, implode(',', $validator->errors()->all())]);
}
$idsArray = explode(',', $all['ids']);
$this->model->whereIn('id', $idsArray)->update(['is_schoolmate' => $all['is_schoolmate']]);
$this->model->whereIn('id', $idsArray)->update(['is_schoolmate' => $all['is_schoolmate'], 'is_black' => $all['is_black']]);
return $this->success('批量更新成功');
}

Loading…
Cancel
Save