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
cd7a0aef
Commit
cd7a0aef
authored
Nov 19, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评委组
parent
f0d2c6a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
2 deletions
+51
-2
AdminUserController.java
...in/java/com/egolm/film/api/admin/AdminUserController.java
+26
-2
AdminUserService.java
...va/com/egolm/film/api/admin/service/AdminUserService.java
+7
-0
AdminUserServiceImpl.java
...olm/film/api/admin/service/impl/AdminUserServiceImpl.java
+18
-0
No files found.
src/main/java/com/egolm/film/api/admin/AdminUserController.java
View file @
cd7a0aef
package
com
.
egolm
.
film
.
api
.
admin
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.api.admin.service.AdminTokenService
;
import
com.egolm.film.api.admin.service.AdminUserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
@Api
@Controller
...
...
@@ -17,9 +26,24 @@ public class AdminUserController {
@Autowired
AdminTokenService
tokenService
;
@Autowired
AdminUserService
service
;
@ResponseBody
@RequestMapping
(
"groupList"
)
@ApiOperation
(
"评委组分页查询"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"keyword"
,
value
=
"关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"index"
,
value
=
"分页编号"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"limit"
,
value
=
"分页大小"
),
})
public
Rjx
queryGroupList
(
String
keyword
,
Long
index
,
Long
limit
)
{
return
Rjx
.
jsonOk
();
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
);
List
<
Map
<
String
,
Object
>>
list
=
service
.
queryGroupList
(
keyword
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
);
}
...
...
src/main/java/com/egolm/film/api/admin/service/AdminUserService.java
View file @
cd7a0aef
package
com
.
egolm
.
film
.
api
.
admin
.
service
;
import
java.util.List
;
import
java.util.Map
;
import
com.egolm.common.jdbc.Page
;
public
interface
AdminUserService
{
List
<
Map
<
String
,
Object
>>
queryGroupList
(
String
keyword
,
Page
page
);
}
src/main/java/com/egolm/film/api/admin/service/impl/AdminUserServiceImpl.java
View file @
cd7a0aef
package
com
.
egolm
.
film
.
api
.
admin
.
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.common.jdbc.Page
;
import
com.egolm.film.api.admin.service.AdminUserService
;
import
com.egolm.film.util.SqlWhere
;
@Service
public
class
AdminUserServiceImpl
implements
AdminUserService
{
@Autowired
JdbcTemplate
jdbcTemplate
;
@Override
public
List
<
Map
<
String
,
Object
>>
queryGroupList
(
String
keyword
,
Page
page
)
{
SqlWhere
argEdit
=
new
SqlWhere
().
like
(
"group_name"
,
keyword
);
String
sql
=
"select * from fc_user_group"
+
StringUtil
.
join
(
" and "
,
" where "
,
""
,
""
,
argEdit
.
getArgs
());
return
jdbcTemplate
.
limit
(
sql
,
page
,
argEdit
.
getObjs
());
}
}
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