Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
杨昕
media-resource
Commits
1e9dff72
Commit
1e9dff72
authored
Jul 13, 2022
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排除media_url为null字符串的
parent
65e50a5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
MediaModel.php
app/Model/MediaModel.php
+9
-4
No files found.
app/Model/MediaModel.php
View file @
1e9dff72
...
...
@@ -274,8 +274,9 @@ class MediaModel extends Eloquent
$id
=
MediaModel
::
insertGetId
(
$data
);
//处理封面图片以及分辨率
self
::
getScreeShotInfo
(
$media_id
);
if
(
$request
->
media_url
!=
"null"
){
self
::
getScreeShotInfo
(
$media_id
);
}
LogModel
::
addlog
([
"添加媒资信息"
=>
$data
,
[
'媒资ID为:=> '
.
$id
]]);
}
catch
(
\Exception
$exception
)
{
throw
new
DatabaseException
(
$exception
->
getMessage
());
...
...
@@ -365,7 +366,9 @@ class MediaModel extends Eloquent
throw
new
\Exception
(
"更新失败"
);
}
//处理封面图片以及分辨率
self
::
getScreeShotInfo
(
$id
);
if
(
$request
->
media_url
!=
"null"
){
self
::
getScreeShotInfo
(
$id
);
}
LogModel
::
addlog
([
"更新媒资信息=>"
.
$id
,
$data
]);
}
catch
(
\Exception
$exception
)
{
...
...
@@ -1152,7 +1155,8 @@ class MediaModel extends Eloquent
$match
=
[
'status'
=>
"1"
,
"screen_shot"
=>
null
,
"media_audio"
=>
[
"
\$
ne"
=>
'audio'
]
"media_audio"
=>
[
"
\$
ne"
=>
'audio'
],
"media_url"
=>
[
"
\$
ne"
=>
"null"
],
];
if
(
isset
(
$request
->
media_id
)
&&
!
empty
(
$request
->
media_id
))
{
...
...
@@ -1170,6 +1174,7 @@ class MediaModel extends Eloquent
}
$media
=
MediaModel
::
where
(
$match
)
->
first
();
//处理封面图片以及分辨率
self
::
getScreeShotInfo
(
$media
[
"_id"
]);
}
catch
(
\Exception
$exception
)
{
...
...
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