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
441b563f
...
441b563ff48fed9cc7fafc9dc38709d8a4767f49
authored
2022-12-14 11:35:45 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复上传保存后状态
1 parent
fc30708a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
app/Services/PropertyTrackService.php
app/Services/PropertyTrackService.php
View file @
441b563
...
...
@@ -261,11 +261,11 @@ class PropertyTrackService extends Service
DB
::
transaction
(
function
()
use
(
$fileTypes
){
$upload_user
=
PropertyShare
::
query
()
->
where
([
'id'
=>
$this
->
request
->
g
et
(
'id'
)])
->
pluck
(
'phone'
)
->
first
();
$upload_user
=
PropertyShare
::
query
()
->
where
([
'id'
=>
$this
->
request
->
offsetG
et
(
'id'
)])
->
pluck
(
'phone'
)
->
first
();
//property_track_files
$res
=
PropertyTrackFile
::
query
()
->
create
([
'pt_id'
=>
$this
->
request
->
g
et
(
'track_id'
),
'pt_id'
=>
$this
->
request
->
offsetG
et
(
'track_id'
),
'name'
=>
$this
->
request
->
input
(
'name'
),
'size_byte'
=>
$this
->
request
->
input
(
'size'
),
'upload_user'
=>
$upload_user
,
...
...
@@ -276,7 +276,7 @@ class PropertyTrackService extends Service
$data
=
[];
foreach
(
$fileTypes
as
$tpye_id
)
{
$data
[]
=
[
'pt_id'
=>
$this
->
request
->
inpu
t
(
'track_id'
),
'pt_id'
=>
$this
->
request
->
offsetGe
t
(
'track_id'
),
'p_file_id'
=>
$res
->
id
,
'p_type_id'
=>
$tpye_id
,
'created_at'
=>
$this
->
now
,
...
...
@@ -299,6 +299,9 @@ class PropertyTrackService extends Service
'link'
=>
'property'
,
'link_id'
=>
$res
->
id
,
]);
//更新上传时间和状态
PropertyTrack
::
query
()
->
where
([
'id'
=>
$this
->
request
->
offsetGet
(
'track_id'
)])
->
update
([
'status'
=>
1
,
'upload_time'
=>
$this
->
now
]);
});
return
Response
::
success
();
...
...
@@ -358,6 +361,11 @@ class PropertyTrackService extends Service
'link'
=>
'property'
,
'link_id'
=>
$res
->
id
,
]);
//更新上传时间和状态
PropertyTrack
::
query
()
->
where
([
'id'
=>
$this
->
request
->
input
(
'track_id'
)])
->
update
([
'status'
=>
1
,
'upload_time'
=>
$this
->
now
]);
});
return
Response
::
success
();
...
...
Please
register
or
sign in
to post a comment