Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
X
xplayer
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
曲欣亮
xplayer
Commits
d75087e4
Commit
d75087e4
authored
May 28, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
40c96294
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
67 deletions
+56
-67
T_video.java
src/main/java/com/egolm/xplayer/bean/T_video.java
+20
-20
T_video_source.java
src/main/java/com/egolm/xplayer/bean/T_video_source.java
+5
-5
X_type.java
src/main/java/com/egolm/xplayer/bean/X_type.java
+5
-16
T_video_model.java
...main/java/com/egolm/xplayer/bean/model/T_video_model.java
+20
-20
AdminVideoController.java
...com/egolm/xplayer/web/api/admin/AdminVideoController.java
+5
-5
PlayerController.java
...va/com/egolm/xplayer/web/api/player/PlayerController.java
+1
-1
No files found.
src/main/java/com/egolm/xplayer/bean/T_video.java
View file @
d75087e4
...
...
@@ -20,16 +20,16 @@ public class T_video implements java.io.Serializable {
private
Integer
id
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '视频名称'"
)
private
String
name
;
private
String
video_
name
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '一句话简介'"
)
private
String
desc
;
private
String
video_
desc
;
@Column
(
columnDefinition
=
"longtext COMMENT '剧情简介'"
)
private
String
profiles
;
private
String
video_
profiles
;
@Column
(
columnDefinition
=
"int(4) COMMENT '年份'"
)
private
Integer
year
;
private
Integer
video_
year
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '国家'"
)
private
String
country
;
...
...
@@ -64,36 +64,36 @@ public class T_video implements java.io.Serializable {
return
id
;
}
public
void
set
Name
(
String
name
)
{
this
.
name
=
name
;
public
void
set
Video_name
(
String
video_
name
)
{
this
.
video_name
=
video_
name
;
}
public
String
get
N
ame
()
{
return
name
;
public
String
get
Video_n
ame
()
{
return
video_
name
;
}
public
void
set
Desc
(
String
desc
)
{
this
.
desc
=
desc
;
public
void
set
Video_desc
(
String
video_
desc
)
{
this
.
video_desc
=
video_
desc
;
}
public
String
get
D
esc
()
{
return
desc
;
public
String
get
Video_d
esc
()
{
return
video_
desc
;
}
public
void
set
Profiles
(
String
profiles
)
{
this
.
profiles
=
profiles
;
public
void
set
Video_profiles
(
String
video_
profiles
)
{
this
.
video_profiles
=
video_
profiles
;
}
public
String
get
P
rofiles
()
{
return
profiles
;
public
String
get
Video_p
rofiles
()
{
return
video_
profiles
;
}
public
void
set
Year
(
Integer
year
)
{
this
.
year
=
year
;
public
void
set
Video_year
(
Integer
video_
year
)
{
this
.
video_year
=
video_
year
;
}
public
Integer
get
Y
ear
()
{
return
year
;
public
Integer
get
Video_y
ear
()
{
return
video_
year
;
}
public
void
setCountry
(
String
country
)
{
...
...
src/main/java/com/egolm/xplayer/bean/T_video_source.java
View file @
d75087e4
...
...
@@ -19,7 +19,7 @@ public class T_video_source implements java.io.Serializable {
private
Integer
video_id
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '视频源名称'"
)
private
String
name
;
private
String
source_
name
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '播放地址'"
)
private
String
play_key
;
...
...
@@ -47,12 +47,12 @@ public class T_video_source implements java.io.Serializable {
return
video_id
;
}
public
void
set
Name
(
String
name
)
{
this
.
name
=
name
;
public
void
set
Source_name
(
String
source_
name
)
{
this
.
source_name
=
source_
name
;
}
public
String
get
N
ame
()
{
return
name
;
public
String
get
Source_n
ame
()
{
return
source_
name
;
}
public
void
setPlay_key
(
String
play_key
)
{
...
...
src/main/java/com/egolm/xplayer/bean/X_type.java
View file @
d75087e4
...
...
@@ -16,10 +16,7 @@ public class X_type implements java.io.Serializable {
private
Integer
id
;
@Column
(
columnDefinition
=
"varchar(255)"
)
private
String
cn_name
;
@Column
(
columnDefinition
=
"varchar(255)"
)
private
String
en_name
;
private
String
type_name
;
public
void
setId
(
Integer
id
)
{
...
...
@@ -30,20 +27,12 @@ public class X_type implements java.io.Serializable {
return
id
;
}
public
void
setCn_name
(
String
cn_name
)
{
this
.
cn_name
=
cn_name
;
}
public
String
getCn_name
()
{
return
cn_name
;
}
public
void
setEn_name
(
String
en_name
)
{
this
.
en_name
=
en_name
;
public
void
setType_name
(
String
type_name
)
{
this
.
type_name
=
type_name
;
}
public
String
get
En
_name
()
{
return
en
_name
;
public
String
get
Type
_name
()
{
return
type
_name
;
}
}
...
...
src/main/java/com/egolm/xplayer/bean/model/T_video_model.java
View file @
d75087e4
...
...
@@ -16,16 +16,16 @@ public class T_video_model implements java.io.Serializable {
private
Integer
id
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '视频名称'"
)
private
String
name
;
private
String
video_
name
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '一句话简介'"
)
private
String
desc
;
private
String
video_
desc
;
@Column
(
columnDefinition
=
"longtext COMMENT '剧情简介'"
)
private
String
profiles
;
private
String
video_
profiles
;
@Column
(
columnDefinition
=
"int(4) COMMENT '年份'"
)
private
Integer
year
;
private
Integer
video_
year
;
@Column
(
columnDefinition
=
"varchar(255) COMMENT '国家'"
)
private
String
country
;
...
...
@@ -44,36 +44,36 @@ public class T_video_model implements java.io.Serializable {
this
.
id
=
id
;
}
public
String
get
N
ame
()
{
return
name
;
public
String
get
Video_n
ame
()
{
return
video_
name
;
}
public
void
set
Name
(
String
name
)
{
this
.
name
=
name
;
public
void
set
Video_name
(
String
video_
name
)
{
this
.
video_name
=
video_
name
;
}
public
String
get
D
esc
()
{
return
desc
;
public
String
get
Video_d
esc
()
{
return
video_
desc
;
}
public
void
set
Desc
(
String
desc
)
{
this
.
desc
=
desc
;
public
void
set
Video_desc
(
String
video_
desc
)
{
this
.
video_desc
=
video_
desc
;
}
public
String
get
P
rofiles
()
{
return
profiles
;
public
String
get
Video_p
rofiles
()
{
return
video_
profiles
;
}
public
void
set
Profiles
(
String
profiles
)
{
this
.
profiles
=
profiles
;
public
void
set
Video_profiles
(
String
video_
profiles
)
{
this
.
video_profiles
=
video_
profiles
;
}
public
Integer
get
Y
ear
()
{
return
year
;
public
Integer
get
Video_y
ear
()
{
return
video_
year
;
}
public
void
set
Year
(
Integer
year
)
{
this
.
year
=
year
;
public
void
set
Video_year
(
Integer
video_
year
)
{
this
.
video_year
=
video_
year
;
}
public
String
getCountry
()
{
...
...
src/main/java/com/egolm/xplayer/web/api/admin/AdminVideoController.java
View file @
d75087e4
...
...
@@ -48,7 +48,7 @@ public class AdminVideoController {
if
(
page
==
null
)
{
page
=
new
Page
();
}
SqlWhere
where
=
new
SqlWhere
().
eq
(
"is_sales"
,
is_sales
).
eq
(
"is_free"
,
is_free
).
lk
(
new
String
[]{
"name"
},
keyword
);
SqlWhere
where
=
new
SqlWhere
().
eq
(
"is_sales"
,
is_sales
).
eq
(
"is_free"
,
is_free
).
lk
(
new
String
[]{
"
video_
name"
},
keyword
);
String
sql
=
"select * from t_video"
+
StringUtil
.
join
(
" and "
,
" where "
,
where
.
getStringList
());
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
limit
(
sql
,
page
,
where
.
getObjectArray
());
return
Rjx
.
jsonOk
().
setData
(
list
).
setPage
(
page
);
...
...
@@ -111,7 +111,7 @@ public class AdminVideoController {
public
Rjx
doImport
()
{
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
queryForList
(
"select * from x_mvlist where upload_id is not null and upload_state = 2"
);
for
(
Map
<
String
,
Object
>
map
:
list
)
{
String
name
=
(
String
)
map
.
get
(
"cn_name"
);
String
video_
name
=
(
String
)
map
.
get
(
"cn_name"
);
Integer
is_sales
=
0
;
String
profiles
=
(
String
)
map
.
get
(
"intro"
);
String
country
=
(
String
)
map
.
get
(
"film_country"
);
...
...
@@ -125,8 +125,8 @@ public class AdminVideoController {
String
cover
=
null
;
Integer
source
=
1
;
String
source_key
=
map
.
get
(
"id"
)
+
""
;
Object
[]
argArray
=
new
Object
[]
{
name
,
is_sales
,
profiles
,
country
,
year
,
cover
,
source
,
source_key
,
source
,
source_key
};
String
sql
=
"insert into t_video (name, is_sales, profiles, country, year, cover, source, source_key) select ?, ?, ?, ?, ?, ?, ?, ? from dual where not exists(select 1 from t_video where source = ? and source_key = ?)"
;
Object
[]
argArray
=
new
Object
[]
{
video_
name
,
is_sales
,
profiles
,
country
,
year
,
cover
,
source
,
source_key
,
source
,
source_key
};
String
sql
=
"insert into t_video (
video_
name, is_sales, profiles, country, year, cover, source, source_key) select ?, ?, ?, ?, ?, ?, ?, ? from dual where not exists(select 1 from t_video where source = ? and source_key = ?)"
;
KeyHolder
keyHolder
=
new
GeneratedKeyHolder
();
jdbcTemplate
.
update
(
new
PreparedStatementCreator
()
{
public
PreparedStatement
createPreparedStatement
(
Connection
connection
)
throws
SQLException
{
...
...
@@ -141,7 +141,7 @@ public class AdminVideoController {
if
(
id
!=
null
)
{
T_video_source
vs
=
new
T_video_source
();
vs
.
setVideo_id
(
id
.
intValue
());
vs
.
set
Name
(
name
);
vs
.
set
Source_name
(
video_
name
);
vs
.
setPlay_key
(
upload_id
);
jdbcTemplate
.
save
(
vs
);
}
...
...
src/main/java/com/egolm/xplayer/web/api/player/PlayerController.java
View file @
d75087e4
...
...
@@ -57,7 +57,7 @@ public class PlayerController {
year_start
=
year_end
=
Integer
.
valueOf
(
year
);
}
}
SqlWhere
where
=
new
SqlWhere
().
eq
(
"is_sales"
,
1
).
ge
(
"year"
,
year_start
).
le
(
"year"
,
year_end
).
lk
(
new
String
[]{
"name"
},
keyword
);
SqlWhere
where
=
new
SqlWhere
().
eq
(
"is_sales"
,
1
).
ge
(
"year"
,
year_start
).
le
(
"year"
,
year_end
).
lk
(
new
String
[]{
"
video_
name"
},
keyword
);
String
sql
=
"select * from t_video"
+
StringUtil
.
join
(
" and "
,
" where "
,
where
.
getStringList
());
List
<
Map
<
String
,
Object
>>
list
=
jdbcTemplate
.
limit
(
sql
,
page
,
where
.
getObjectArray
());
return
Rjx
.
jsonOk
().
setData
(
list
);
...
...
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