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
c7a765cd
Commit
c7a765cd
authored
Jun 28, 2020
by
fuyunnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加仓库服务和添加路由转化函数
parent
07c9648b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
StoreServiceInterface.php
src/Service/Interfaces/StoreServiceInterface.php
+8
-0
functions.php
src/functions.php
+19
-0
No files found.
src/Service/Interfaces/StoreServiceInterface.php
View file @
c7a765cd
...
@@ -10,4 +10,12 @@ namespace Meibuyu\Micro\Service\Interfaces;
...
@@ -10,4 +10,12 @@ namespace Meibuyu\Micro\Service\Interfaces;
interface
StoreServiceInterface
interface
StoreServiceInterface
{
{
/**
* 通过id列表获取仓库名称
* @param array $idList 仓库id的列表, 默认去重
* @param array $columns 仓库表的字段,默认显示全部
* @return array 默认keyBy('id')
*/
public
function
getByIdList
(
array
$idList
,
array
$columns
=
[
'*'
])
:
array
;
}
}
src/functions.php
View file @
c7a765cd
...
@@ -451,6 +451,25 @@ if (!function_exists('putLog')) {
...
@@ -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'
))
{
if
(
!
function_exists
(
'empty_string_2_null'
))
{
/**
/**
* 空字符串转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