Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
hujun
tl_estate
Commits
97815b63
Commit
97815b63
authored
Mar 25, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺视频列表
parent
efae3c62
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
0 deletions
+83
-0
Houses.php
application/index/controller/Houses.php
+47
-0
GHousesVideo.php
application/model/GHousesVideo.php
+35
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Houses.php
View file @
97815b63
...
...
@@ -22,6 +22,7 @@ use app\model\GHousesExt;
use
app\model\GHousesFollowUp
;
use
app\model\GHousesImgs
;
use
app\model\GHousesToAgents
;
use
app\model\GHousesVideo
;
use
app\model\GLandlordPhone
;
use
app\model\GOperatingRecords
;
use
app\model\SubletModel
;
...
...
@@ -845,4 +846,49 @@ class Houses extends Basic
return
$this
->
response
(
$code
,
$msg
,
[]);
}
/**
* 商铺视频列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
houseVideoList
()
{
$where
[
'is_del'
]
=
0
;
if
(
isset
(
$this
->
params
[
'district_id'
]))
{
$where
[
'b.district_id'
]
=
$this
->
params
[
'district_id'
];
}
if
(
isset
(
$this
->
params
[
'store_id'
]))
{
$where
[
'b.store_id'
]
=
$this
->
params
[
'store_id'
];
}
if
(
isset
(
$this
->
params
[
'agent_id'
]))
{
$where
[
'a.upload_id'
]
=
$this
->
params
[
'agent_id'
];
}
if
(
isset
(
$this
->
params
[
'is_check'
])
&&
$this
->
params
[
'is_check'
]
==
0
)
{
if
(
$this
->
params
[
'is_check'
]
!=
1
)
{
$where
[
'agent_id'
]
=
0
;
}
else
{
$where
[
'agent_id'
]
=
[
'>'
,
0
];
}
}
$m_house_video
=
new
GHousesVideo
();
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$field
=
'a.id,a.video_name,a.house_id,a.upload_name,a.check_name,a.check_id,a.check_time,a.create_time'
;
$data
=
$m_house_video
->
getVideoAgentList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
$total
=
$m_house_video
->
getVideoAgentListTotal
(
$where
);
foreach
(
$data
as
$k
=>
$v
)
{
$data
[
$k
][
'check_time'
]
=
$v
[
'check_time'
]
?
$v
[
'check_time'
]
:
''
;
$data
[
$k
][
'check_id'
]
=
$v
[
'check_id'
]
?
1
:
0
;
}
$path
=
'resource/lib/Attachments/video/'
;
return
$this
->
response
(
200
,
''
,
[
'list'
=>
$data
,
'total'
=>
$total
,
'path'
=>
$path
]);
}
}
\ No newline at end of file
application/model/GHousesVideo.php
View file @
97815b63
...
...
@@ -90,4 +90,38 @@ class GHousesVideo extends BaseModel
return
$result
;
}
/**
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getVideoAgentList
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.upload_id = b.id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
/**
* @param string $params
* @param string $field
* @return int|string
*/
public
function
getVideoAgentListTotal
(
$params
=
''
,
$field
=
'a.id'
)
{
return
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.upload_id = b.id'
,
'left'
)
->
where
(
$params
)
->
count
();
}
}
\ No newline at end of file
application/route.php
View file @
97815b63
...
...
@@ -125,6 +125,7 @@ Route::group('index', [
'getEditLog'
=>
[
'index/houses/getEditLog'
,
[
'method'
=>
'get'
]],
//商铺修改日志
'isShow'
=>
[
'index/houses/isShow'
,
[
'method'
=>
'POST'
]],
//是否对C端显示
'vipHouse'
=>
[
'index/houses/vipHouse'
,
[
'method'
=>
'POST'
]],
//vip盘
'houseVideoList'
=>
[
'index/houses/houseVideoList'
,
[
'method'
=>
'GET'
]],
//视频审核列表
//版本管理
'version'
=>
[
'index/version/index'
,
[
'method'
=>
'get'
]],
...
...
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