Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
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
曲欣亮
sentinel
Commits
8a431caf
Commit
8a431caf
authored
Nov 21, 2018
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xxx
parent
b3e2306f
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
89 additions
and
37 deletions
+89
-37
AdminFilmApplyController.java
...va/com/egolm/film/api/admin/AdminFilmApplyController.java
+0
-19
AdminFirstController.java
...n/java/com/egolm/film/api/admin/AdminFirstController.java
+57
-0
AdminFirstService.java
...a/com/egolm/film/api/admin/service/AdminFirstService.java
+1
-1
AdminAuthServiceImpl.java
...olm/film/api/admin/service/impl/AdminAuthServiceImpl.java
+1
-1
AdminFirstServiceImpl.java
...lm/film/api/admin/service/impl/AdminFirstServiceImpl.java
+2
-2
MemberService.java
...java/com/egolm/film/api/member/service/MemberService.java
+4
-0
MemberServiceImpl.java
...egolm/film/api/member/service/impl/MemberServiceImpl.java
+11
-1
Common.java
src/main/java/com/egolm/film/util/Common.java
+1
-1
SqlWhere.java
src/main/java/com/egolm/film/util/SqlWhere.java
+12
-12
No files found.
src/main/java/com/egolm/film/api/admin/AdminFilmApplyController.java
deleted
100644 → 0
View file @
b3e2306f
package
com
.
egolm
.
film
.
api
.
admin
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
com.egolm.film.api.admin.service.AdminFilmApplyService
;
import
io.swagger.annotations.Api
;
@Api
@Controller
@RequestMapping
(
"admin/film_apply"
)
public
class
AdminFilmApplyController
{
@Autowired
AdminFilmApplyService
service
;
}
src/main/java/com/egolm/film/api/admin/AdminFirstController.java
0 → 100644
View file @
8a431caf
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.PostMapping
;
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.AdminFirstService
;
import
com.egolm.film.api.member.service.MemberService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
/**
* 初审
* @author Quxl
*
*/
@Api
@Controller
@RequestMapping
(
"admin/first"
)
public
class
AdminFirstController
{
@Autowired
AdminFirstService
service
;
@Autowired
MemberService
memberService
;
@ResponseBody
@PostMapping
(
"list"
)
@ApiOperation
(
"管理员分页查询"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"string"
,
required
=
false
,
name
=
"keyword"
,
value
=
"关键字"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"integer"
,
required
=
false
,
name
=
"state"
,
value
=
"状态"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"integer"
,
required
=
false
,
name
=
"film_type"
,
value
=
"影片类型"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"integer"
,
required
=
false
,
name
=
"enroll_type"
,
value
=
"影片性质"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"index"
,
value
=
"分页编号"
),
@ApiImplicitParam
(
paramType
=
"query"
,
dataType
=
"long"
,
required
=
true
,
name
=
"limit"
,
value
=
"分页大小"
),
})
public
Object
list
(
String
keyword
,
Integer
state
,
String
film_type
,
String
enroll_type
,
Long
index
,
Long
limit
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
Page
page
=
new
Page
(
index
,
limit
);
List
<
Map
<
String
,
Object
>>
list
=
memberService
.
queryChuShenList
(
keyword
,
state
,
film_type
,
enroll_type
,
page
);
return
Rjx
.
jsonOk
().
setData
(
list
);
}
}
src/main/java/com/egolm/film/api/admin/service/AdminFi
lmApply
Service.java
→
src/main/java/com/egolm/film/api/admin/service/AdminFi
rst
Service.java
View file @
8a431caf
package
com
.
egolm
.
film
.
api
.
admin
.
service
;
public
interface
AdminFi
lmApply
Service
{
public
interface
AdminFi
rst
Service
{
}
src/main/java/com/egolm/film/api/admin/service/impl/AdminAuthServiceImpl.java
View file @
8a431caf
...
...
@@ -41,7 +41,7 @@ public class AdminAuthServiceImpl implements AdminAuthService {
@Override
public
List
<
Map
<
String
,
Object
>>
queryAdminList
(
String
keyword
,
Integer
group_id
,
Page
page
)
{
SqlWhere
argEdit
=
new
SqlWhere
().
like
(
"realname"
,
keyword
).
like
(
"username"
,
keyword
).
eq
(
"group_id"
,
group_id
);
SqlWhere
argEdit
=
new
SqlWhere
().
olike
(
new
String
[]{
"realname"
,
"username"
}
,
keyword
).
eq
(
"group_id"
,
group_id
);
String
sql
=
"select * from fc_admin"
+
StringUtil
.
join
(
" and "
,
" where "
,
""
,
""
,
argEdit
.
getArgs
());
return
jdbcTemplate
.
limit
(
sql
,
page
,
argEdit
.
getObjs
());
}
...
...
src/main/java/com/egolm/film/api/admin/service/impl/AdminFi
lmApply
ServiceImpl.java
→
src/main/java/com/egolm/film/api/admin/service/impl/AdminFi
rst
ServiceImpl.java
View file @
8a431caf
...
...
@@ -4,10 +4,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.film.api.admin.service.AdminFi
lmApply
Service
;
import
com.egolm.film.api.admin.service.AdminFi
rst
Service
;
@Service
public
class
AdminFi
lmApplyServiceImpl
implements
AdminFilmApply
Service
{
public
class
AdminFi
rstServiceImpl
implements
AdminFirst
Service
{
@Autowired
JdbcTemplate
jdbcTemplate
;
...
...
src/main/java/com/egolm/film/api/member/service/MemberService.java
View file @
8a431caf
...
...
@@ -3,6 +3,7 @@ package com.egolm.film.api.member.service;
import
java.util.List
;
import
java.util.Map
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.film.bean.Fc_member
;
import
com.egolm.film.bean.Fc_member_film
;
import
com.egolm.film.bean.Fc_member_film_all
;
...
...
@@ -132,4 +133,7 @@ public interface MemberService {
List
<
Map
<
String
,
Object
>>
queryListAll
(
String
keyword
);
List
<
Map
<
String
,
Object
>>
queryChuShenList
(
String
keyword
,
Integer
state
,
String
film_type
,
String
enroll_type
,
Page
page
);
}
src/main/java/com/egolm/film/api/member/service/impl/MemberServiceImpl.java
View file @
8a431caf
...
...
@@ -17,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.web.ServletUtil
;
import
com.egolm.film.api.common.service.Messages
;
import
com.egolm.film.api.member.service.MemberService
;
...
...
@@ -30,6 +31,7 @@ import com.egolm.film.bean.Fc_member_film_show;
import
com.egolm.film.config.WebMvcConfig
;
import
com.egolm.film.config.XException
;
import
com.egolm.film.util.Common
;
import
com.egolm.film.util.SqlWhere
;
@Service
...
...
@@ -136,7 +138,7 @@ public class MemberServiceImpl implements MemberService {
@Override
public
void
doApply
(
Integer
member_id
,
Long
member_film_id
)
{
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set state = ?, apply_state = ? where id = ? and member_id = ?"
,
2
,
2
,
member_film_id
,
member_id
);
jdbcTemplate
.
executeUpdate
(
"update fc_member_film set state = ?, apply_state = ? where id = ? and member_id = ?"
,
2
,
1
,
member_film_id
,
member_id
);
}
@Override
...
...
@@ -493,4 +495,12 @@ public class MemberServiceImpl implements MemberService {
}
}
@Override
public
List
<
Map
<
String
,
Object
>>
queryChuShenList
(
String
keyword
,
Integer
state
,
String
film_type
,
String
enroll_type
,
Page
page
)
{
String
sql
=
"select * from fc_member_film"
;
new
SqlWhere
().
like
(
name
,
obj
)
return
null
;
}
}
src/main/java/com/egolm/film/util/Common.java
View file @
8a431caf
...
...
@@ -22,7 +22,7 @@ public class Common {
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
encodePassword
(
"
Siff@2018"
,
"78hzar
"
));
System
.
out
.
println
(
encodePassword
(
"
123456"
,
"XPm3m5
"
));
System
.
out
.
println
(
getGenerateString
(
6
));
}
...
...
src/main/java/com/egolm/film/util/SqlWhere.java
View file @
8a431caf
...
...
@@ -63,18 +63,18 @@ public class SqlWhere {
return
this
;
}
public
SqlWhere
rlike
(
String
name
,
Object
obj
)
{
if
(
StringUtil
.
isNotBlank
(
obj
))
{
this
.
args
.
add
(
name
+
" like ?"
);
this
.
objs
.
add
(
obj
+
"%"
);
public
SqlWhere
olike
(
String
[]
name
,
Object
obj
)
{
if
(
name
!=
null
&&
name
.
length
>
0
&&
StringUtil
.
isNotBlank
(
obj
))
{
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"("
);
for
(
int
i
=
0
;
i
<
name
.
length
;
i
++)
{
if
(
i
>
0
)
{
sb
.
append
(
" or "
);
}
return
this
;
sb
.
append
(
name
+
" like '%"
+
obj
+
"%'"
)
;
}
public
SqlWhere
llike
(
String
name
,
Object
obj
)
{
if
(
StringUtil
.
isNotBlank
(
obj
))
{
this
.
args
.
add
(
name
+
" like ?"
);
this
.
objs
.
add
(
"%"
+
obj
);
sb
.
append
(
")"
);
this
.
args
.
add
(
sb
.
toString
());
}
return
this
;
}
...
...
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