test(config): align current odds and settlement contracts
This commit is contained in:
@@ -40,7 +40,7 @@ final class OddsItemsReplaceController extends Controller
|
||||
'items.*.provider_code' => ['sometimes', 'string', 'max:32'],
|
||||
'items.*.play_code' => ['required', 'string', 'max:32', Rule::exists('play_types', 'play_code')],
|
||||
'items.*.prize_scope' => ['required', 'string', 'max:32'],
|
||||
'items.*.dimension' => ['sometimes', 'nullable', 'integer', 'in:2,3,4'],
|
||||
'items.*.dimension' => ['sometimes', 'nullable', 'integer', 'in:2,3,4,5,6'],
|
||||
'items.*.odds_value' => ['required', 'integer', 'min:0'],
|
||||
'items.*.rebate_rate' => ['sometimes', 'numeric', 'between:0,1'],
|
||||
'items.*.commission_rate' => ['sometimes', 'numeric', 'between:0,1'],
|
||||
|
||||
@@ -13,9 +13,9 @@ use App\Services\AuditLogger;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use App\Support\OddsStandardScopes;
|
||||
use App\Lottery\ConfigVersionStatus;
|
||||
use App\Services\Draw\LotteryHallRealtimeBroadcaster;
|
||||
use App\Http\Middleware\RecordAdminApiAudit;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use App\Services\Draw\LotteryHallRealtimeBroadcaster;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
|
||||
/** 后台:赔率版本({@see odds_versions} / {@see odds_items}) */
|
||||
@@ -269,8 +269,8 @@ final class OddsStreamService
|
||||
$errors["items.$index.currency_code"][] = '币种不可下注';
|
||||
}
|
||||
|
||||
if ($dimension !== null && ! in_array($dimension, [2, 3, 4], true)) {
|
||||
$errors["items.$index.dimension"][] = '维度必须是 2、3 或 4';
|
||||
if ($dimension !== null && ! in_array($dimension, [2, 3, 4, 5, 6], true)) {
|
||||
$errors["items.$index.dimension"][] = '维度必须是 2、3、4、5 或 6';
|
||||
}
|
||||
|
||||
if (isset($seenKeys[$key])) {
|
||||
@@ -278,8 +278,8 @@ final class OddsStreamService
|
||||
}
|
||||
$seenKeys[$key] = true;
|
||||
|
||||
if ($oddsValue <= 0) {
|
||||
$errors["items.$index.odds_value"][] = '赔率值必须大于 0';
|
||||
if ($oddsValue < 0) {
|
||||
$errors["items.$index.odds_value"][] = '赔率值不能小于 0';
|
||||
}
|
||||
|
||||
if ($rebateRate < 0 || $rebateRate > 1) {
|
||||
|
||||
Reference in New Issue
Block a user