/**
* 批量初审
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function borrowPiShen()
{
$record_id = Input::get('record_id');
if (empty($record_id)) {
return BaseController::returnJson(405, '请选择数据', null);
}
$record_id_arr = explode(',', $record_id);
$num = YunUserBorrow::whereIn('id', $record_id_arr)
->where('status', 0)
->update(
[
'status' => 1,
'allow_no' => DB::raw('borrow_no'),
'name_zc' => AdminUser::getUserData()->name
]);
return BaseController::returnJson(200, "审核了{$num}条记录", null);
}
来源:oschina
链接:https://my.oschina.net/u/4344191/blog/4292575