Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
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
吴贤德
SooonerHotel
Commits
f54982cf
Commit
f54982cf
authored
Sep 09, 2019
by
wangjiangze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
播放日志更新
parent
02c6210a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
215 additions
and
10 deletions
+215
-10
PlayLogAction.class.php
SooonerHotel/App/Lib/Action/Log/PlayLogAction.class.php
+17
-0
PlayLogModel.class.php
SooonerHotel/App/Lib/Model/PlayLogModel.class.php
+4
-4
details.html
SooonerHotel/App/Tpl/Log/zh-cn/PlayLog/details.html
+180
-0
index.html
SooonerHotel/App/Tpl/Log/zh-cn/PlayLog/index.html
+14
-6
No files found.
SooonerHotel/App/Lib/Action/Log/PlayLogAction.class.php
View file @
f54982cf
...
...
@@ -51,6 +51,23 @@ class PlayLogAction extends CommonAction{
$this
->
region_city_lists
=
$region_city_lists
;
$this
->
display
();
}
public
function
details
(){
$userInfo
=
$_SESSION
[
"_USER_INFO"
];
$id
=
I
(
'id'
,
''
,
int
)
?
I
(
'id'
,
''
,
int
)
:
0
;
$month
=
I
(
"month"
);
$model
=
D
(
"PlayLog"
);
if
(
$id
){
$info
=
$model
->
query
(
"select sp.`name` sp_name,hotel.`name` hotel_name,wasu.`title` media_name,log.stb_id,log.order_id,log.http_code,
log.err_code,log.starttime,log.duration,log.tradeid,log.`range`,log.body_bytes_sent,log.cache_status,log.insert_time
from sh_log_play_
$month
log
left join sh_media_wasu wasu on log.media_id = wasu.`code`
left join sh_sp sp on log.sp_id = sp.id
left join sh_hotel hotel on log.hotel_id = hotel.id where log.id =
$id
"
);
$this
->
info
=
$info
[
0
];
}
$this
->
display
();
}
//添加处理
public
function
addHandle
(){
$model
=
D
(
"PlayLog"
);
...
...
SooonerHotel/App/Lib/Model/PlayLogModel.class.php
View file @
f54982cf
...
...
@@ -17,7 +17,7 @@ class PlayLogModel extends RelationModel{
$searchMonth
=
$inputs
[
"searchMonth"
]
?
$inputs
[
"searchMonth"
]
:
date
(
"Ym"
);
if
(
$searchValue
){
$where
=
" and (
A.`stb_id` like '%"
.
$searchValue
.
"%' or A.`order_id
` like '%"
.
$searchValue
.
"%') "
;
$where
=
" and (
D.`title` like '%"
.
$searchValue
.
"%' or D.`code
` like '%"
.
$searchValue
.
"%') "
;
}
if
(
$searchSp
){
$where
.=
" and A.sp_id =
$searchSp
"
;
...
...
@@ -38,9 +38,9 @@ class PlayLogModel extends RelationModel{
$fields
=
" A.*,B.`name` sp_name,C.`name` hotel_name,D.`title` media_name "
;
}
$sql
=
"select "
.
$fields
.
" from sh_log_play_
$searchMonth
A"
.
" join sh_sp B on A.sp_id=B.id"
.
" join sh_hotel C on A.hotel_id=C.id"
.
"
join sh_media_wasu D on A.media_id=D.`code` and A.sp_id = D.sp_id
"
.
"
left
join sh_sp B on A.sp_id=B.id"
.
"
left
join sh_hotel C on A.hotel_id=C.id"
.
"
left join sh_media_wasu D on A.media_id=D.`code`
"
.
" where 1=1 "
.
$where
.
";"
;
// echo $sql;
return
$model
->
query
(
$sql
);
...
...
SooonerHotel/App/Tpl/Log/zh-cn/PlayLog/details.html
0 → 100644
View file @
f54982cf
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>
播放日志详情
</title>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/bootstrap3.3.7/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/bootstrap3.3.7/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/jquery.easyui.min.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/plugins/jquery.validatebox.extend.js"
></script>
<script
type=
"text/javascript"
src=
"__PUBLIC__/js/jquery-easyui-1.3.4/locale/easyui-lang-{$language}.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/jquery-easyui-1.3.4/themes/default/easyui.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/js/jquery-easyui-1.3.4/themes/icon.css"
>
<link
rel=
"stylesheet"
href=
"__PUBLIC__/js/bootstrap3.3.7/bootstrap.min.css"
>
<style>
body
{
padding
:
20px
}
</style>
</head>
<body>
<form
class=
"form-horizontal"
role=
"form"
id=
"ff"
action=
"{:U('/Media/Cloud/addHandle')}"
method=
"POST"
>
<input
name=
"id"
type=
"hidden"
value=
"{$info.id}"
/>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
合作方
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.sp_name}"
disabled
readonly
/>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
酒店
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.hotel_name}"
disabled
readonly
/>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
机顶盒id
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.stb_id}"
disabled
readonly
/>
<!--<input type="text" class="form-control" id="inputEmail3" placeholder="请输入云存储地址" name="url_play" value="{$info.url_play}">-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
订单id
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.order_id}"
disabled
readonly
/>
<!--<input type="text" class="form-control" id="inputEmail3" placeholder="请输入云存储地址" name="url_play" value="{$info.url_play}">-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
媒资
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.media_name}"
disabled
readonly
/>
<!--<input type="text" class="form-control" id="inputEmail3" placeholder="请输入云存储地址" name="url_play" value="{$info.url_play}">-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
http响应码
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.http_code}"
disabled
readonly
/>
<!--<input type="text" class="form-control" id="inputEmail3" placeholder="请输入年份" name="year" value="{$info.year}">-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
错误码
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.err_code}"
disabled
readonly
/>
<!--<input type="text" class="form-control" id="inputEmail3" placeholder="请输入评分" name="score" value="{$info.score}">-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"name"
class=
"col-sm-4 control-label"
>
开始播放时间
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.starttime}"
disabled
readonly
/>
<!--<select class="form-control" name="region">-->
<!--<option value="0">请选择国家/地区</option>-->
<!--<option value="内地">内地</option>-->
<!--<option value="港台">港台</option>-->
<!--</select>-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
时长(秒)
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.duration}"
disabled
readonly
/>
<!--<input type="text" class="form-control" id="inputEmail3" placeholder="请输入导演" name="director" value="{$info.director}">-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
单次播放标识
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.tradeid}"
disabled
readonly
/>
<!--<input type="text" class="form-control" id="inputEmail3" placeholder="请输入演员" name="actor" value="{$info.actor}">-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-4 control-label"
>
http request range
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.range}"
disabled
readonly
/>
<!--<textarea class="form-control" rows="3" name="description">{$info.description}</textarea>-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-4 control-label"
>
response body_bytes_sent
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.body_bytes_sent}"
disabled
readonly
/>
<!--<textarea class="form-control" rows="3" name="description">{$info.description}</textarea>-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-4 control-label"
>
命中状态
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.cache_status}"
disabled
readonly
/>
<!--<textarea class="form-control" rows="3" name="description">{$info.description}</textarea>-->
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"inputPassword3"
class=
"col-sm-4 control-label"
>
数据入库时间
</label>
<div
class=
"col-sm-6"
>
<input
type=
"text"
class=
"form-control"
id=
"inputEmail3"
value=
"{$info.insert_time}"
disabled
readonly
/>
<!--<textarea class="form-control" rows="3" name="description">{$info.description}</textarea>-->
</div>
</div>
<!-- <div class="form-group">
<label for="inputPassword3" class="col-sm-4 control-label">上下线状态</label>
<div class="col-sm-9">
<label class="radio-inline">
<input type="radio" name="_status" id="optionsRadios4" value="1" checked="checked"> 上线
</label>
<label class="radio-inline">
<input type="radio" name="_status" id="optionsRadios4" value="2"> 下线
</label>
</div>
</div>-->
<!--<div class="btnMedia col-sm-5 control-label">-->
<!--<input name="" type="button" class="btn btn-success" value="确定" onclick="submitForm()" {:buttonAuth('Media','Cloud','addhandle')}/> -->
<!--<input name="" type="reset" class="btn btn-warning" value="取消" onclick="parentDialog.close();"/> -->
<!--</div> -->
</form>
<script
type=
"text/javascript"
>
function
submitForm
(){
var
name_v
=
$
(
"input[name='title']"
).
val
();
var
code_v
=
$
(
"input[name='code']"
).
val
();
if
(
!
name_v
){
alert
(
"请输入媒资名称"
);
return
;
}
if
(
!
code_v
){
alert
(
"请输入媒资唯一标识"
);
return
;
}
$
(
'#ff'
).
form
(
'submit'
,
{
url
:
'/Media/Cloud/addHandle/'
,
onSubmit
:
function
(){
var
isValid
=
$
(
this
).
form
(
'validate'
);
//触发form内的所有validatebox验证,并返回true/false
if
(
!
isValid
)
$
(
'#tab'
).
tabs
(
'select'
,
0
);
return
isValid
;
},
success
:
function
(
data
){
if
(
data
==
'true'
){
// $.messager.confirm('友情提示', '操作成功! 是否关闭窗口?', function(r){
// if (r){
// parentDialog.CancelEvent();
// }
// });
parentDialog
.
CancelEvent
();
// $.messager.alert('友情提示','操作成功!','info');
}
else
$
.
messager
.
alert
(
'友情提示'
,
'操作失败!'
,
'info'
);
}
});
}
$
().
ready
(
function
(){
//
<
if
condition
=
"$info"
>
// $("select[name='region'] option[value='{$info.region}']").attr("selected",true);
// $("select[name='type'] option[value='{$info.type}']").attr("selected",true);
//
<
/if
>
});
</script>
</body>
</html>
\ No newline at end of file
SooonerHotel/App/Tpl/Log/zh-cn/PlayLog/index.html
View file @
f54982cf
...
...
@@ -36,7 +36,7 @@
<option
value=
"{$item.id}"
>
{$item.name}
</option>
</volist>
</select>
<input
class=
"input"
type=
"text"
placeholder=
"
机顶盒ID/订单ID
"
name=
"searchValue"
>
<input
class=
"input"
type=
"text"
placeholder=
"
媒资名称/媒资标识
"
name=
"searchValue"
>
<input
class=
"input"
type=
"text"
name=
"searchMonth"
onclick=
"setmonth(this,'yyyyMM','2019-07','2099-12',1)"
style=
"width:80px"
value=
"{$Think.now|strtotime|date='Ym',###}"
readonly=
"readonly"
/>
</div>
<input
id=
"submit_search"
name=
""
type=
"button"
value=
"查询"
class=
"btn_go_s btn_orange"
/>
...
...
@@ -75,28 +75,27 @@ onRowContextMenu : onRowContextMenu
<th
data-options=
"field:'sp_name',width:20"
sortable=
"true"
>
合作方名称
</th>
<th
data-options=
"field:'hotel_name',width:30"
>
酒店名称
</th>
<th
data-options=
"field:'media_name',width:60"
>
媒资名称
</th>
<th
data-options=
"field:'stb_id',width:20"
>
机顶盒ID
</th>
<th
data-options=
"field:'order_id',width:20"
>
订单ID
</th>
<th
data-options=
"field:'tradeid',width:60"
>
单次播放标识
</th>
<th
data-options=
"field:'http_code',width:20"
>
http响应码
</th>
<th
data-options=
"field:'err_code',width:20"
>
错误码
</th>
<th
data-options=
"field:'duration',width:20"
>
时长
</th>
<th
data-options=
"field:'starttime',width:30"
sortable=
"true"
>
开始播放时间
</th>
<th
data-options=
"field:'cache_status',width:20"
sortable=
"true"
formatter=
"CacheStatusAction"
>
命中状态
</th>
<
!--<th field="action" align="center" formatter="InputAction">操作</th>--
>
<
th
field=
"action"
align=
"center"
formatter=
"InputAction"
>
操作
</th
>
</tr>
</thead>
</table>
<div
id=
"mm1"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<!--<div iconCls="icon-edit" id="menuEdit" onclick="edit()" {:buttonAuth('Log','PlayLog','add')}>编辑</div>-->
<div
iconCls=
"icon-
cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
Log
','
PlayLog
','
deletehandle
')}
>
删除
</div>
<div
iconCls=
"icon-
list"
id=
"menuDel"
onclick=
"details()"
{
:buttonAuth
('
Log
','
PlayLog
','
details
')}
>
查看详情
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-stop" id="menuStop" onclick="enable(1)" {:buttonAuth('Log','PlayLog','updateStatusAjaxHandle')}>禁用</div>
<div iconCls="icon-start" id="menuStart" onclick="enable(0)" {:buttonAuth('Log','PlayLog','updateStatusAjaxHandle')}>启用</div>-->
</div>
<div
id=
"mm2"
class=
"easyui-menu"
style=
"width:120px;display: none"
>
<!--<div iconCls="icon-edit" id="menuEdit" onclick="edit()" {:buttonAuth('Log','PlayLog','add')}>编辑</div>-->
<div
iconCls=
"icon-
cancel"
id=
"menuDel"
onclick=
"del()"
{
:buttonAuth
('
Log
','
PlayLog
','
deletehandle
')}
>
删除
</div>
<div
iconCls=
"icon-
list"
id=
"menuDel"
onclick=
"details()"
{
:buttonAuth
('
Log
','
PlayLog
','
details
')}
>
查看详情
</div>
<!-- <div class="menu-sep"></div>
<div iconCls="icon-stop" id="menuStop" onclick="enable(1)" {:buttonAuth('Log','PlayLog','updateStatusAjaxHandle')}>禁用</div>
<div iconCls="icon-start" id="menuStart" onclick="enable(0)" {:buttonAuth('Log','PlayLog','updateStatusAjaxHandle')}>启用</div>-->
...
...
@@ -168,6 +167,15 @@ function edit(){
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
details
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
var
month
=
$
(
"input[name='searchMonth']"
).
val
();
if
(
row
){
pop
(
800
,
450
,
true
,
'dg'
,
'datagrid'
,
'/Log/PlayLog/details/id/'
+
row
.
id
+
'/month/'
+
month
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
'请选择要操作的记录!'
,
'info'
);
}
}
function
del
(){
var
row
=
$
(
'#dg'
).
datagrid
(
'getSelected'
);
if
(
row
){
...
...
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