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
b220205c
...
b220205c8b0e3e023f2728e834b49c5c73f987a5
authored
2021-07-19 11:37:26 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
*
1 parent
9eca8e26
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
6 deletions
app/Models/Legal/Contract.php
app/Models/Legal/Song.php
app/Models/Legal/SongsIp.php
app/Models/Legal/Stakeholder.php
app/Models/Legal/Treaty.php
app/Services/MusicianSongService.php
app/Models/Legal/Contract.php
View file @
b220205
...
...
@@ -4,6 +4,7 @@ namespace App\Models\Legal;
use
App\Models\BaseModel
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
/**
* Class Contract
...
...
@@ -11,7 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
*/
class
Contract
extends
BaseModel
{
use
HasFactory
;
use
HasFactory
,
SoftDeletes
;
/**
* The attributes that should be cast to native types.
...
...
app/Models/Legal/Song.php
View file @
b220205
...
...
@@ -4,6 +4,7 @@ namespace App\Models\Legal;
use
App\Models\BaseModel
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
/**
* Class Song
...
...
@@ -11,7 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
*/
class
Song
extends
BaseModel
{
use
HasFactory
;
use
HasFactory
,
SoftDeletes
;
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
...
...
app/Models/Legal/SongsIp.php
View file @
b220205
...
...
@@ -4,6 +4,7 @@ namespace App\Models\Legal;
use
App\Models\BaseModel
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
/**
* Class SongsIp
...
...
@@ -11,7 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
*/
class
SongsIp
extends
BaseModel
{
use
HasFactory
;
use
HasFactory
,
SoftDeletes
;
/**
* @var string
...
...
app/Models/Legal/Stakeholder.php
View file @
b220205
...
...
@@ -4,6 +4,7 @@ namespace App\Models\Legal;
use
App\Models\BaseModel
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
/**
* Class Stakeholder
...
...
@@ -11,7 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
*/
class
Stakeholder
extends
BaseModel
{
use
HasFactory
;
use
HasFactory
,
SoftDeletes
;
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
...
...
app/Models/Legal/Treaty.php
View file @
b220205
...
...
@@ -4,6 +4,7 @@ namespace App\Models\Legal;
use
App\Models\BaseModel
;
use
Illuminate\Database\Eloquent\Factories\HasFactory
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
/**
* Class Treaty
...
...
@@ -11,7 +12,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
*/
class
Treaty
extends
BaseModel
{
use
HasFactory
;
use
HasFactory
,
SoftDeletes
;
/**
* @var string
...
...
app/Services/MusicianSongService.php
View file @
b220205
...
...
@@ -30,7 +30,6 @@ class MusicianSongService extends Service
$song_table
=
Song
::
table
();
$songip_table
=
SongsIp
::
table
();
$res
=
Song
::
query
()
->
join
(
$songip_table
,
"
{
$song_table
}
.id"
,
'='
,
"
{
$songip_table
}
.song_id"
)
->
with
([
'contractDetail'
,
'cover'
])
->
whereIn
(
"
{
$songip_table
}
.song_id"
,
$song_ids
)
->
select
([
"
{
$song_table
}
.id"
,
'publish_song'
])
->
groupBy
([
"song_id"
])
->
paginate
(
$this
->
pageSize
);
...
...
Please
register
or
sign in
to post a comment