项目相关优化

This commit is contained in:
2025-05-08 13:28:56 +08:00
parent e68c2dc663
commit 8ea4f2bafd
5 changed files with 48 additions and 15 deletions

View File

@@ -7,6 +7,7 @@ use Exception;
use Illuminate\Http\JsonResponse;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
use function PHPUnit\Framework\isString;
class BaseController
{
@@ -144,7 +145,7 @@ class BaseController
if (is_array($checkValue) && !empty($checkValue)) {
$result[$fieldName] = $checkValue;
} else {
if (mb_strlen(strval($checkValue)) <= 0 && !in_array($fieldName, $this->notRequest)) {
if ((empty($checkValue) && $checkValue !== 0) && !in_array($fieldName, $this->notRequest)) {
$requiredFields[] = $fieldName;
} else {
if (!empty($checkValue) || $checkValue === 0) {