Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-rpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-rpc
Commits
6251f866
Commit
6251f866
authored
Jun 28, 2020
by
jiangkebao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.huaperfect.com:hwq/micro
parents
a099775c
c7a765cd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
3 deletions
+33
-3
BaseRepository.php
src/Repository/Eloquent/BaseRepository.php
+1
-1
StoreServiceInterface.php
src/Service/Interfaces/StoreServiceInterface.php
+8
-0
ExcelImporter.php
src/Tools/ExcelImporter.php
+4
-1
Exporter.php
src/Tools/Exporter.php
+1
-1
functions.php
src/functions.php
+19
-0
No files found.
src/Repository/Eloquent/BaseRepository.php
View file @
6251f866
...
...
@@ -25,7 +25,7 @@ abstract class BaseRepository implements RepositoryInterface
/**
* @var ContainerInterface
*/
pr
ivate
$container
;
pr
otected
$container
;
/**
* @var RequestInterface
...
...
src/Service/Interfaces/StoreServiceInterface.php
View file @
6251f866
...
...
@@ -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
View file @
6251f866
...
...
@@ -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
;
...
...
@@ -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
))
{
...
...
src/Tools/Exporter.php
View file @
6251f866
...
...
@@ -266,7 +266,7 @@ class Exporter
* @param $pRange
* @throws \PhpOffice\PhpSpreadsheet\Exception
*/
p
rivate
function
applyStyle
(
$pRange
)
p
ublic
function
applyStyle
(
$pRange
)
{
$styleArray
=
[
'borders'
=>
[
...
...
src/functions.php
View file @
6251f866
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment