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
7b154f6a
Commit
7b154f6a
authored
Apr 24, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
13f416d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
0 deletions
+96
-0
CinemaService.java
src/main/java/com/egolm/film/api/service/CinemaService.java
+10
-0
CinemaServiceImpl.java
...va/com/egolm/film/api/service/impl/CinemaServiceImpl.java
+44
-0
CinemaController.java
...n/java/com/egolm/film/api/web/admin/CinemaController.java
+42
-0
No files found.
src/main/java/com/egolm/film/api/service/CinemaService.java
0 → 100644
View file @
7b154f6a
package
com
.
egolm
.
film
.
api
.
service
;
import
java.util.List
;
import
java.util.Map
;
public
interface
CinemaService
{
List
<
Map
<
String
,
Object
>>
getCinemaListForSelected
(
String
keyword
);
}
src/main/java/com/egolm/film/api/service/impl/CinemaServiceImpl.java
0 → 100644
View file @
7b154f6a
package
com
.
egolm
.
film
.
api
.
service
.
impl
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.service.CinemaService
;
import
com.egolm.film.util.SqlWhere
;
@Service
public
class
CinemaServiceImpl
implements
CinemaService
{
@Autowired
JdbcTemplate
jdbcTemplate
;
@Override
public
List
<
Map
<
String
,
Object
>>
getCinemaListForSelected
(
String
keyword
)
{
SqlWhere
where
=
new
SqlWhere
().
lk
(
new
String
[]
{
"cinema_no"
,
"cinema_name"
,
"cinema_en_name"
},
keyword
);
String
sql
=
""
+
"select "
+
"cinema_no, "
+
"cinema_name, "
+
"cinema_en_name, "
+
"cinema_address, "
+
"cinema_en_address, "
+
"telphone "
+
"from "
+
"fc_cinema "
+
StringUtil
.
join
(
" and "
,
" where "
,
" "
,
" "
,
where
.
getStringList
())
+
"group by "
+
"cinema_no, "
+
"cinema_name, "
+
"cinema_en_name, "
+
"cinema_address, "
+
"cinema_en_address, "
+
"telphone "
;
return
jdbcTemplate
.
queryForList
(
sql
,
where
.
getObjectArray
());
}
}
src/main/java/com/egolm/film/api/web/admin/CinemaController.java
0 → 100644
View file @
7b154f6a
package
com
.
egolm
.
film
.
api
.
web
.
admin
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.film.api.service.CinemaService
;
import
com.egolm.film.bean.Fc_cinema
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
@RestController
@RequestMapping
({
"/admin/cinema"
})
public
class
CinemaController
{
@Autowired
CinemaService
service
;
@ResponseBody
@PostMapping
(
"save"
)
@ApiOperation
(
"保存影院影厅"
)
public
Object
save
(
Fc_cinema
cinema
)
{
return
Rjx
.
jsonOk
();
}
@ResponseBody
@PostMapping
(
"getCinemaListForSelected"
)
@ApiOperation
(
"查询影院列表"
)
public
Object
getCinemaListForSelected
(
String
keyword
)
{
List
<
Map
<
String
,
Object
>>
list
=
service
.
getCinemaListForSelected
(
keyword
);
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