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
a401eeac
...
a401eeacecbeec1c1d2cc8fdc9f8747d15daafa4
authored
2021-12-01 18:09:48 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
*
1 parent
6d0f19ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
app/Models/Legal/Contract.php
app/Services/MusicianSongService.php
app/Services/V2/MusicianSongService.php
app/Models/Legal/Contract.php
View file @
a401eea
...
...
@@ -147,6 +147,33 @@ class Contract extends BaseModel
}
/**
* 费用模式
* @param $cooperation_type
* @return string
*/
public
static
function
getCooperation
(
$cooperation_type
)
{
switch
(
$cooperation_type
)
{
case
1
:
return
"一次性费用"
;
case
2
:
return
"分成"
;
case
3
:
return
'分成+预付'
;
case
5
:
return
'分成+一次性费用'
;
case
6
:
return
'抵扣成本后再分成'
;
case
7
:
return
'分成+预付+一次性费用'
;
case
8
:
return
'抵扣成本后分成+预付'
;
case
9
:
return
'一次性费用+抵扣成本后分成'
;
}
}
/**
* 一次性费用
* @param $right
* @return string
...
...
app/Services/MusicianSongService.php
View file @
a401eea
...
...
@@ -239,7 +239,7 @@ class MusicianSongService extends Service
$contracts
[
$k
]
=
[
'contract_id'
=>
$item
[
'contract_id'
],
'files'
=>
$files
,
'cooperation_type'
=>
$item
[
'contract'
][
'cooperation_type'
]
,
'cooperation_type'
=>
Contract
::
getCooperation
(
$item
[
'contract'
][
'cooperation_type'
])
,
'right'
=>
Contract
::
getModel
(
$item
[
'contract'
][
'cooperation_type'
],
$right
),
'role'
=>
array_unique
(
$role
),
'date_starting'
=>
$item
[
'contract'
][
'date_starting'
],
...
...
@@ -247,6 +247,7 @@ class MusicianSongService extends Service
'limit'
=>
is_null
(
$item
[
'contract'
][
'date_ending'
])
?
'永久'
:
data_diff
(
$item
[
'contract'
][
'date_starting'
],
$item
[
'contract'
][
'date_ending'
]),
'district'
=>
Contract
::
getDistrict
(
$item
[
'contract'
][
'district_id'
]),
'exclusive'
=>
Contract
::
isExclusive
(
$item
[
'contract'
][
'is_exclusive'
]),
'rights'
=>
[[
'role'
=>
'作词作曲'
,
'right'
=>
'test'
],[
'role'
=>
'演唱'
,
'right'
=>
'test'
]],
];
}
...
...
app/Services/V2/MusicianSongService.php
View file @
a401eea
...
...
@@ -33,7 +33,7 @@ class MusicianSongService extends Service
->
join
(
'songs_ip_exts as ext'
,
'songs_ip.id'
,
'='
,
'ext.song_ip_id'
)
->
whereIn
(
"songs.id"
,
$song_ids
)
->
whereNull
(
"songs_ip.deleted_at"
)
->
where
(
'auth_channel'
,
1
)
->
select
([
"songs.id"
,
"songs_ip.id as sp_id"
,
'track_name'
,
'singer_name'
,
'album_name'
,
'public_time'
,
'track_version'
,
'favCnt'
,
'playCnt'
,
'downloadCnt'
,
'singer_name'
,
'album_name'
,
'
track_cover'
,
'
public_time'
,
'track_version'
,
'favCnt'
,
'playCnt'
,
'downloadCnt'
,
'favCnt_week'
,
'playCnt_week'
,
'downloadCnt_week'
,
'favCnt_years'
,
'playCnt_years'
,
'downloadCnt_years'
,
])
->
when
(
filled
(
$this
->
request
->
name
),
function
(
Builder
$builder
)
{
...
...
Please
register
or
sign in
to post a comment