Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
cc8f7fa4
...
cc8f7fa4cbe58fb067f9ca8f394cf44b008c8394
authored
2021-11-15 14:14:16 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
文件地址
1 parent
b6abffbb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
app/Services/MusicianAgreementService.php
app/Services/MusicianAgreementService.php
View file @
cc8f7fa
...
...
@@ -13,7 +13,9 @@ use App\Models\Legal\Treaty;
*/
class
MusicianAgreementService
extends
Service
{
/**
* @return \Illuminate\Http\JsonResponse
*/
public
function
treatyList
()
{
$res
=
Treaty
::
query
()
->
whereIn
(
'party_b'
,
$this
->
stakeholder_ids
)
->
where
(
'deadline_date'
,
'>'
,
$this
->
now
)
->
with
([
'file:id,treaty_id,file_id'
,
'file.fileInfo:id,location'
])
...
...
@@ -24,7 +26,7 @@ class MusicianAgreementService extends Service
$files
=
[];
if
(
!
empty
(
$item_res
[
'file'
]))
{
foreach
(
$item_res
[
'file'
]
as
$file_item
)
{
!
empty
(
$file_item
[
'file_info'
][
'location'
])
&&
$files
[]
=
env
(
'resource_url'
)
.
$file_item
[
'file_info'
][
'location'
];
!
empty
(
$file_item
[
'file_info'
][
'location'
])
&&
$files
[]
=
$file_item
[
'file_info'
][
'location'
];
}
}
$item
->
setAttribute
(
'files'
,
$files
);
...
...
@@ -51,7 +53,6 @@ class MusicianAgreementService extends Service
if
(
!
empty
(
$treaty_item
[
'file'
]))
{
if
(
$file_info
=
array_column
(
$treaty_item
[
'file'
],
'file_info'
)){
$files
=
array_column
(
$file_info
,
'location'
);
array_walk
(
$files
,
function
(
&
$location
)
{
$location
=
env
(
'resource_url'
)
.
$location
;
});
}
}
...
...
@@ -80,7 +81,6 @@ class MusicianAgreementService extends Service
if
(
!
empty
(
$contract_item
[
'files'
]))
{
if
(
$file_info
=
array_column
(
$contract_item
[
'files'
],
'file_info'
)){
$files
=
array_column
(
$file_info
,
'location'
);
array_walk
(
$files
,
function
(
&
$location
)
{
$location
=
env
(
'resource_url'
)
.
$location
;
});
}
}
...
...
Please
register
or
sign in
to post a comment