Loading src/Repository/Eloquent/BaseRepository.php +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ abstract class BaseRepository implements RepositoryInterface /** * @var ContainerInterface */ private $container; protected $container; /** * @var RequestInterface Loading src/Service/Interfaces/StoreServiceInterface.php +8 −0 Original line number Diff line number Diff line Loading @@ -10,4 +10,12 @@ namespace Meibuyu\Micro\Service\Interfaces; interface StoreServiceInterface { /** * 通过id列表获取仓库名称 * @param array $idList 仓库id的列表, 默认去重 * @param array $columns 仓库表的字段,默认显示全部 * @return array 默认keyBy('id') */ public function getByIdList(array $idList, array $columns = ['*']): array; } src/Tools/ExcelImporter.php +4 −1 Original line number Diff line number Diff line Loading @@ -124,6 +124,9 @@ class ExcelImporter public function checkRequire($requires, &$errorCount) { foreach ($requires as $k => $v) { if ($v == '0') { continue; } if (!$v || $v === '') { $this->setErrorMessage($k . "不能为空", $errorCount); return false; Loading @@ -141,7 +144,7 @@ class ExcelImporter public function checkNumeric($data, &$errorCount) { foreach ($data as $k => $v) { if (!$v || $v === '') { if (!$v || $v === '' || $v == '0') { continue; } else { if (!is_numeric($v)) { Loading src/Tools/Exporter.php +1 −1 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ class Exporter * @param $pRange * @throws \PhpOffice\PhpSpreadsheet\Exception */ private function applyStyle($pRange) public function applyStyle($pRange) { $styleArray = [ 'borders' => [ Loading src/functions.php +19 −0 Original line number Diff line number Diff line Loading @@ -451,6 +451,25 @@ if (!function_exists('putLog')) { } if (!function_exists('http_to_server_url')) { /** * description:将前端的绝对路径转化为服务端相对路径 * author: fuyunnan * @param string $path 需要转化的路径 * @return string * @throws * Date: 2020/6/24 */ function http_to_server_url($path) { $path =ltrim(parse_url($path,PHP_URL_PATH),'/'); return 'public/'.$path; } } if (!function_exists('empty_string_2_null')) { /** * 空字符串转NULL Loading Loading
src/Repository/Eloquent/BaseRepository.php +1 −1 Original line number Diff line number Diff line Loading @@ -25,7 +25,7 @@ abstract class BaseRepository implements RepositoryInterface /** * @var ContainerInterface */ private $container; protected $container; /** * @var RequestInterface Loading
src/Service/Interfaces/StoreServiceInterface.php +8 −0 Original line number Diff line number Diff line Loading @@ -10,4 +10,12 @@ namespace Meibuyu\Micro\Service\Interfaces; interface StoreServiceInterface { /** * 通过id列表获取仓库名称 * @param array $idList 仓库id的列表, 默认去重 * @param array $columns 仓库表的字段,默认显示全部 * @return array 默认keyBy('id') */ public function getByIdList(array $idList, array $columns = ['*']): array; }
src/Tools/ExcelImporter.php +4 −1 Original line number Diff line number Diff line Loading @@ -124,6 +124,9 @@ class ExcelImporter public function checkRequire($requires, &$errorCount) { foreach ($requires as $k => $v) { if ($v == '0') { continue; } if (!$v || $v === '') { $this->setErrorMessage($k . "不能为空", $errorCount); return false; Loading @@ -141,7 +144,7 @@ class ExcelImporter public function checkNumeric($data, &$errorCount) { foreach ($data as $k => $v) { if (!$v || $v === '') { if (!$v || $v === '' || $v == '0') { continue; } else { if (!is_numeric($v)) { Loading
src/Tools/Exporter.php +1 −1 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ class Exporter * @param $pRange * @throws \PhpOffice\PhpSpreadsheet\Exception */ private function applyStyle($pRange) public function applyStyle($pRange) { $styleArray = [ 'borders' => [ Loading
src/functions.php +19 −0 Original line number Diff line number Diff line Loading @@ -451,6 +451,25 @@ if (!function_exists('putLog')) { } if (!function_exists('http_to_server_url')) { /** * description:将前端的绝对路径转化为服务端相对路径 * author: fuyunnan * @param string $path 需要转化的路径 * @return string * @throws * Date: 2020/6/24 */ function http_to_server_url($path) { $path =ltrim(parse_url($path,PHP_URL_PATH),'/'); return 'public/'.$path; } } if (!function_exists('empty_string_2_null')) { /** * 空字符串转NULL Loading