状态更新
This commit is contained in:
@@ -132,6 +132,17 @@ class UsedCarService
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function serviceUpdateStatus(Request $request, array $data)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
throw new BusinessException('id不能为空');
|
||||
}
|
||||
if (!isset($data['status'])) {
|
||||
throw new BusinessException('status错误');
|
||||
}
|
||||
return UsedCar::where('id', $data['id'])->update(['status' => $data['status']]);
|
||||
}
|
||||
|
||||
public function getcode($userId){
|
||||
$userCount = Redis::get('used_car_count_'.$userId, 0);
|
||||
$todayStart = strtotime('today');
|
||||
|
||||
Reference in New Issue
Block a user