修改缓存方式
This commit is contained in:
@@ -71,9 +71,11 @@ class Live extends Backend
|
||||
$manualNumber = is_numeric((string) $manualRaw) ? (int) $manualRaw : null;
|
||||
$res = GameLiveService::calculateResult($recordId, $manualNumber);
|
||||
if (!($res['ok'] ?? false)) {
|
||||
return $this->error((string) ($res['msg'] ?? '计算失败'));
|
||||
$errMsg = $res['msg'] ?? null;
|
||||
return $this->error(is_string($errMsg) ? $errMsg : __('Calculation failed'));
|
||||
}
|
||||
return $this->success((string) $res['msg'], $res);
|
||||
$okMsg = $res['msg'] ?? '';
|
||||
return $this->success(is_string($okMsg) ? $okMsg : '', $res);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,13 +94,15 @@ class Live extends Backend
|
||||
$recordId = is_numeric((string) $recordIdRaw) ? (int) $recordIdRaw : null;
|
||||
$manualRaw = $request->post('manual_number');
|
||||
if (!is_numeric((string) $manualRaw)) {
|
||||
return $this->error('请填写开奖号码');
|
||||
return $this->error(__('Please enter the draw number'));
|
||||
}
|
||||
$manualNumber = (int) $manualRaw;
|
||||
$res = GameLiveService::scheduleDraw($recordId, $manualNumber);
|
||||
if (!($res['ok'] ?? false)) {
|
||||
return $this->error((string) ($res['msg'] ?? '预约失败'));
|
||||
$errMsg = $res['msg'] ?? null;
|
||||
return $this->error(is_string($errMsg) ? $errMsg : __('Schedule failed'));
|
||||
}
|
||||
return $this->success((string) $res['msg'], $res);
|
||||
$okMsg = $res['msg'] ?? '';
|
||||
return $this->success(is_string($okMsg) ? $okMsg : '', $res);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user