Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
member-api
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
曲欣亮
member-api
Commits
d758c712
Commit
d758c712
authored
Apr 24, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
b1d20437
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
305 additions
and
0 deletions
+305
-0
CommonService.java
src/main/java/com/egolm/film/api/service/CommonService.java
+21
-0
CommonServiceImpl.java
...va/com/egolm/film/api/service/impl/CommonServiceImpl.java
+62
-0
Fc_cinema_model.java
src/main/java/com/egolm/film/bean/model/Fc_cinema_model.java
+136
-0
Fc_cinema_showtime_model.java
...a/com/egolm/film/bean/model/Fc_cinema_showtime_model.java
+86
-0
No files found.
src/main/java/com/egolm/film/api/service/CommonService.java
0 → 100644
View file @
d758c712
package
com
.
egolm
.
film
.
api
.
service
;
import
java.util.List
;
public
interface
CommonService
{
void
merge
(
Object
obj
);
void
save
(
Object
obj
);
void
update
(
Object
obj
);
void
delete
(
Object
id
,
Class
<?>
type
);
<
T
>
T
queryById
(
Object
id
,
Class
<
T
>
type
);
void
batchSave
(
List
<
Object
>
objs
);
<
T
>
List
<
T
>
queryAll
(
Class
<
T
>
requiredType
);
}
src/main/java/com/egolm/film/api/service/impl/CommonServiceImpl.java
0 → 100644
View file @
d758c712
package
com
.
egolm
.
film
.
api
.
service
.
impl
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.dialect.bean.Desc
;
import
com.egolm.film.api.service.CommonService
;
import
com.egolm.film.config.XRException
;
@Service
public
class
CommonServiceImpl
implements
CommonService
{
@Autowired
private
JdbcTemplate
jdbcTemplate
;
@Override
public
void
merge
(
Object
obj
)
{
this
.
jdbcTemplate
.
merge
(
obj
);
}
@Override
public
void
save
(
Object
obj
)
{
this
.
jdbcTemplate
.
save
(
obj
);
}
@Override
public
void
delete
(
Object
id
,
Class
<?>
type
)
{
this
.
jdbcTemplate
.
delete
(
id
,
type
);
}
@Override
public
<
T
>
T
queryById
(
Object
id
,
Class
<
T
>
type
)
{
Desc
desc
=
new
Desc
(
type
);
String
tableName
=
desc
.
getName
();
String
[]
pkNames
=
desc
.
getColumnPkNames
();
if
(
pkNames
.
length
!=
1
)
{
throw
new
XRException
(
"不存在唯一主键"
);
}
return
jdbcTemplate
.
queryForBean
(
"select * from "
+
tableName
+
" where "
+
pkNames
[
0
]
+
" = ?"
,
type
,
id
);
}
@Override
public
void
update
(
Object
obj
)
{
this
.
jdbcTemplate
.
update
(
obj
);
}
@Override
public
void
batchSave
(
List
<
Object
>
objs
)
{
this
.
jdbcTemplate
.
batchSave
(
objs
);
}
@Override
public
<
T
>
List
<
T
>
queryAll
(
Class
<
T
>
requiredType
)
{
Desc
desc
=
new
Desc
(
requiredType
);
String
tableName
=
desc
.
getName
();
return
jdbcTemplate
.
queryForList
(
"select * from "
+
tableName
,
requiredType
);
}
}
src/main/java/com/egolm/film/bean/model/Fc_cinema_model.java
0 → 100644
View file @
d758c712
package
com
.
egolm
.
film
.
bean
.
model
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
io.swagger.annotations.ApiModelProperty
;
@Entity
(
name
=
"fc_cinema"
)
public
class
Fc_cinema_model
implements
java
.
io
.
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Id
@ApiModelProperty
(
"影院放映厅ID"
)
private
Integer
id
;
@ApiModelProperty
(
"影院编号"
)
private
String
no
;
@ApiModelProperty
(
"影院名称"
)
private
String
cinema_name
;
@ApiModelProperty
(
"影院英文名字"
)
private
String
cinema_en_name
;
@ApiModelProperty
(
"影院地址中文"
)
private
String
cinema_address
;
@ApiModelProperty
(
"影院英文地址"
)
private
String
cinema_en_address
;
@ApiModelProperty
(
"影院电话"
)
private
String
telphone
;
@ApiModelProperty
(
"影厅名称"
)
private
String
halls_name
;
@ApiModelProperty
(
"影厅名称(英文)"
)
private
String
halls_en_name
;
@ApiModelProperty
(
"状态 0正常 1关闭 2删除"
)
private
Integer
status
;
@ApiModelProperty
(
"排序"
)
private
Integer
sort
;
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getId
()
{
return
id
;
}
public
void
setNo
(
String
no
)
{
this
.
no
=
no
;
}
public
String
getNo
()
{
return
no
;
}
public
void
setCinema_name
(
String
cinema_name
)
{
this
.
cinema_name
=
cinema_name
;
}
public
String
getCinema_name
()
{
return
cinema_name
;
}
public
void
setCinema_en_name
(
String
cinema_en_name
)
{
this
.
cinema_en_name
=
cinema_en_name
;
}
public
String
getCinema_en_name
()
{
return
cinema_en_name
;
}
public
void
setCinema_address
(
String
cinema_address
)
{
this
.
cinema_address
=
cinema_address
;
}
public
String
getCinema_address
()
{
return
cinema_address
;
}
public
void
setCinema_en_address
(
String
cinema_en_address
)
{
this
.
cinema_en_address
=
cinema_en_address
;
}
public
String
getCinema_en_address
()
{
return
cinema_en_address
;
}
public
void
setTelphone
(
String
telphone
)
{
this
.
telphone
=
telphone
;
}
public
String
getTelphone
()
{
return
telphone
;
}
public
void
setHalls_name
(
String
halls_name
)
{
this
.
halls_name
=
halls_name
;
}
public
String
getHalls_name
()
{
return
halls_name
;
}
public
void
setHalls_en_name
(
String
halls_en_name
)
{
this
.
halls_en_name
=
halls_en_name
;
}
public
String
getHalls_en_name
()
{
return
halls_en_name
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
}
public
Integer
getSort
()
{
return
sort
;
}
}
src/main/java/com/egolm/film/bean/model/Fc_cinema_showtime_model.java
0 → 100644
View file @
d758c712
package
com
.
egolm
.
film
.
bean
.
model
;
import
java.math.BigDecimal
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
io.swagger.annotations.ApiModelProperty
;
@Entity
(
name
=
"fc_cinema_showtime"
)
public
class
Fc_cinema_showtime_model
implements
java
.
io
.
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Id
@ApiModelProperty
(
"场次ID"
)
private
Integer
id
;
@ApiModelProperty
(
"场次编号"
)
private
Integer
showtime_no
;
@ApiModelProperty
(
"影片ID"
)
private
Integer
film_id
;
@ApiModelProperty
(
"票价"
)
private
BigDecimal
ticket_price
;
@ApiModelProperty
(
"状态 0正常 1关闭 2删除"
)
private
Integer
status
;
@ApiModelProperty
(
"是否重点场次 1是 0不是"
)
private
Integer
is_important
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getShowtime_no
()
{
return
showtime_no
;
}
public
void
setShowtime_no
(
Integer
showtime_no
)
{
this
.
showtime_no
=
showtime_no
;
}
public
Integer
getFilm_id
()
{
return
film_id
;
}
public
void
setFilm_id
(
Integer
film_id
)
{
this
.
film_id
=
film_id
;
}
public
BigDecimal
getTicket_price
()
{
return
ticket_price
;
}
public
void
setTicket_price
(
BigDecimal
ticket_price
)
{
this
.
ticket_price
=
ticket_price
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getIs_important
()
{
return
is_important
;
}
public
void
setIs_important
(
Integer
is_important
)
{
this
.
is_important
=
is_important
;
}
public
static
long
getSerialversionuid
()
{
return
serialVersionUID
;
}
}
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