Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lwby_copyright_book_data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
maliang
lwby_copyright_book_data
Commits
fe741f85
Commit
fe741f85
authored
Apr 20, 2020
by
maliang
Browse files
Options
Browse Files
Download
Plain Diff
权限控制
parents
ab326639
25c14d1f
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
148 additions
and
36 deletions
+148
-36
SecurityApplication.java
...in/java/com/boot/security/server/SecurityApplication.java
+1
-1
ExceptionHandlerAdvice.java
...m/boot/security/server/advice/ExceptionHandlerAdvice.java
+1
-1
奇趣源码官方微信.jpg
src/main/java/com/boot/security/server/advice/奇趣源码官方微信.jpg
+0
-0
AsycTaskExecutorConfig.java
...m/boot/security/server/config/AsycTaskExecutorConfig.java
+1
-1
DruidConfig.java
...ain/java/com/boot/security/server/config/DruidConfig.java
+1
-1
RedisConfig.java
...ain/java/com/boot/security/server/config/RedisConfig.java
+1
-1
SecurityConfig.java
.../java/com/boot/security/server/config/SecurityConfig.java
+5
-3
SecurityHandlerConfig.java
...om/boot/security/server/config/SecurityHandlerConfig.java
+1
-1
SwaggerConfig.java
...n/java/com/boot/security/server/config/SwaggerConfig.java
+1
-1
AdvertiserManagerController.java
...curity/server/controller/AdvertiserManagerController.java
+33
-0
GenerateController.java
...m/boot/security/server/controller/GenerateController.java
+1
-1
PermissionController.java
...boot/security/server/controller/PermissionController.java
+10
-2
RoleController.java
...a/com/boot/security/server/controller/RoleController.java
+19
-1
UserController.java
...a/com/boot/security/server/controller/UserController.java
+1
-1
Token.java
src/main/java/com/boot/security/server/dto/Token.java
+1
-1
TokenFilter.java
...ain/java/com/boot/security/server/filter/TokenFilter.java
+2
-1
PageTableArgumentResolver.java
...security/server/page/table/PageTableArgumentResolver.java
+1
-1
PageTableHandler.java
...com/boot/security/server/page/table/PageTableHandler.java
+1
-1
PageTableRequest.java
...com/boot/security/server/page/table/PageTableRequest.java
+1
-1
PageTableResponse.java
...om/boot/security/server/page/table/PageTableResponse.java
+1
-1
SysLogService.java
.../java/com/boot/security/server/service/SysLogService.java
+1
-1
TokenService.java
...n/java/com/boot/security/server/service/TokenService.java
+1
-1
TokenServiceDbImpl.java
...boot/security/server/service/impl/TokenServiceDbImpl.java
+1
-1
TokenServiceImpl.java
...m/boot/security/server/service/impl/TokenServiceImpl.java
+1
-1
TokenServiceJWTImpl.java
...oot/security/server/service/impl/TokenServiceJWTImpl.java
+1
-1
UserDetailsServiceImpl.java
.../security/server/service/impl/UserDetailsServiceImpl.java
+1
-1
ExcelUtil.java
src/main/java/com/boot/security/server/utils/ExcelUtil.java
+1
-1
FileUtil.java
src/main/java/com/boot/security/server/utils/FileUtil.java
+1
-1
SpringUtil.java
src/main/java/com/boot/security/server/utils/SpringUtil.java
+1
-1
StrUtil.java
src/main/java/com/boot/security/server/utils/StrUtil.java
+1
-1
.gitignore
src/main/resources/.gitignore
+0
-1
index.html
src/main/resources/static/index.html
+7
-1
main.js
src/main/resources/static/js/main.js
+4
-3
advertiserManager.html
...ces/static/pages/advertiserManager/advertiserManager.html
+44
-0
No files found.
src/main/java/com/boot/security/server/SecurityApplication.java
View file @
fe741f85
...
@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
...
@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
/**
* 启动类
* 启动类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@SpringBootApplication
@SpringBootApplication
...
...
src/main/java/com/boot/security/server/advice/ExceptionHandlerAdvice.java
View file @
fe741f85
...
@@ -17,7 +17,7 @@ import com.boot.security.server.dto.ResponseInfo;
...
@@ -17,7 +17,7 @@ import com.boot.security.server.dto.ResponseInfo;
/**
/**
* springmvc异常处理
* springmvc异常处理
*
*
* @author
398005446@qq.com
* @author
maliang
*
*
*/
*/
@RestControllerAdvice
@RestControllerAdvice
...
...
src/main/java/com/boot/security/server/advice/奇趣源码官方微信.jpg
deleted
100644 → 0
View file @
ab326639
39.7 KB
src/main/java/com/boot/security/server/config/AsycTaskExecutorConfig.java
View file @
fe741f85
...
@@ -9,7 +9,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
...
@@ -9,7 +9,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
/**
/**
* 线程池配置、启用异步
* 线程池配置、启用异步
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年8月19日
* 2017年8月19日
*/
*/
...
...
src/main/java/com/boot/security/server/config/DruidConfig.java
View file @
fe741f85
...
@@ -56,7 +56,7 @@ public class DruidConfig {
...
@@ -56,7 +56,7 @@ public class DruidConfig {
/**
/**
* 数据源配置
* 数据源配置
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
@ConfigurationProperties
(
prefix
=
"spring.datasource"
)
...
...
src/main/java/com/boot/security/server/config/RedisConfig.java
View file @
fe741f85
...
@@ -13,7 +13,7 @@ import org.springframework.data.redis.serializer.GenericToStringSerializer;
...
@@ -13,7 +13,7 @@ import org.springframework.data.redis.serializer.GenericToStringSerializer;
* 集群下启动session共享,需打开@EnableRedisHttpSession<br>
* 集群下启动session共享,需打开@EnableRedisHttpSession<br>
* 单机下不需要
* 单机下不需要
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年8月10日
* 2017年8月10日
*/
*/
...
...
src/main/java/com/boot/security/server/config/SecurityConfig.java
View file @
fe741f85
...
@@ -20,7 +20,7 @@ import com.boot.security.server.filter.TokenFilter;
...
@@ -20,7 +20,7 @@ import com.boot.security.server.filter.TokenFilter;
/**
/**
* spring security配置
* spring security配置
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年10月16日
* 2017年10月16日
*
*
...
@@ -52,12 +52,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -52,12 +52,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 基于token,所以不需要session
// 基于token,所以不需要session
http
.
sessionManagement
().
sessionCreationPolicy
(
SessionCreationPolicy
.
STATELESS
);
http
.
sessionManagement
().
sessionCreationPolicy
(
SessionCreationPolicy
.
STATELESS
);
//
authorizeRequests获取配置请求授权的相关配置类,antMatchers设置哪些请求需要认证,authenticated设置需要请求的请求类型是post,.permitAll().anyRequest()表示出了前面设置的请求任意用户任何请求都可访问
//
对这些类型请求直接放开不做拦截
http
.
authorizeRequests
()
http
.
authorizeRequests
()
.
antMatchers
(
"/"
,
"/*.html"
,
"/favicon.ico"
,
"/css/**"
,
"/js/**"
,
"/fonts/**"
,
"/layui/**"
,
"/img/**"
,
.
antMatchers
(
"/"
,
"/*.html"
,
"/favicon.ico"
,
"/css/**"
,
"/js/**"
,
"/fonts/**"
,
"/layui/**"
,
"/img/**"
,
"/v2/api-docs/**"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/pages/**"
,
"/druid/**"
,
"/v2/api-docs/**"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/pages/**"
,
"/druid/**"
,
"/statics/**"
)
"/statics/**"
)
.
permitAll
().
anyRequest
().
authenticated
();
.
permitAll
().
anyRequest
().
authenticated
();
//对于登录的地址和处理方法
http
.
formLogin
().
loginProcessingUrl
(
"/login"
)
http
.
formLogin
().
loginProcessingUrl
(
"/login"
)
.
successHandler
(
authenticationSuccessHandler
).
failureHandler
(
authenticationFailureHandler
).
and
()
.
successHandler
(
authenticationSuccessHandler
).
failureHandler
(
authenticationFailureHandler
).
and
()
.
exceptionHandling
().
authenticationEntryPoint
(
authenticationEntryPoint
);
.
exceptionHandling
().
authenticationEntryPoint
(
authenticationEntryPoint
);
...
@@ -65,12 +66,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -65,12 +66,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 解决不允许显示在iframe的问题
// 解决不允许显示在iframe的问题
http
.
headers
().
frameOptions
().
disable
();
http
.
headers
().
frameOptions
().
disable
();
http
.
headers
().
cacheControl
();
http
.
headers
().
cacheControl
();
//对请求进行处理(给token续命并且把当前用户保存到security的上下文环境中)
http
.
addFilterBefore
(
tokenFilter
,
UsernamePasswordAuthenticationFilter
.
class
);
http
.
addFilterBefore
(
tokenFilter
,
UsernamePasswordAuthenticationFilter
.
class
);
}
}
@Override
@Override
protected
void
configure
(
AuthenticationManagerBuilder
auth
)
throws
Exception
{
protected
void
configure
(
AuthenticationManagerBuilder
auth
)
throws
Exception
{
//实现UserDetailsService接口,security会调用其中方法创建登陆对象,并且获取对象拥有的权限
auth
.
userDetailsService
(
userDetailsService
).
passwordEncoder
(
bCryptPasswordEncoder
());
auth
.
userDetailsService
(
userDetailsService
).
passwordEncoder
(
bCryptPasswordEncoder
());
}
}
...
...
src/main/java/com/boot/security/server/config/SecurityHandlerConfig.java
View file @
fe741f85
...
@@ -28,7 +28,7 @@ import com.boot.security.server.utils.ResponseUtil;
...
@@ -28,7 +28,7 @@ import com.boot.security.server.utils.ResponseUtil;
/**
/**
* spring security处理器
* spring security处理器
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年10月16日
* 2017年10月16日
*/
*/
...
...
src/main/java/com/boot/security/server/config/SwaggerConfig.java
View file @
fe741f85
...
@@ -17,7 +17,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -17,7 +17,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
/**
* swagger文档
* swagger文档
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年7月21日
* 2017年7月21日
*/
*/
...
...
src/main/java/com/boot/security/server/controller/AdvertiserManagerController.java
0 → 100644
View file @
fe741f85
package
com
.
boot
.
security
.
server
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
@RestController
@RequestMapping
(
"/advertiserManagerController"
)
public
class
AdvertiserManagerController
{
@GetMapping
(
"/table"
)
@ApiOperation
(
value
=
"获取广告商数据"
)
@ResponseBody
public
String
getAdvertiserData
()
{
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
item
=
new
JSONObject
();
JSONArray
array
=
new
JSONArray
();
item
.
put
(
"id"
,
1
);
item
.
put
(
"advertiser"
,
"百度联盟"
);
item
.
put
(
"AccumulatedConsumptionAmount"
,
100000
);
item
.
put
(
"leader"
,
"高飞"
);
item
.
put
(
"yesterdayConsumptionAmount"
,
5000
);
item
.
put
(
"viewData"
,
"曝光X1"
);
array
.
add
(
item
);
jsonObject
.
put
(
"code"
,
0
);
jsonObject
.
put
(
"msg"
,
""
);
jsonObject
.
put
(
"count"
,
1
);
jsonObject
.
put
(
"data"
,
array
);
return
jsonObject
.
toJSONString
();
}
}
src/main/java/com/boot/security/server/controller/GenerateController.java
View file @
fe741f85
...
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -22,7 +22,7 @@ import io.swagger.annotations.ApiOperation;
/**
/**
* 代码生成接口
* 代码生成接口
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Api
(
tags
=
"代码生成"
)
@Api
(
tags
=
"代码生成"
)
...
...
src/main/java/com/boot/security/server/controller/PermissionController.java
View file @
fe741f85
...
@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -34,7 +34,7 @@ import io.swagger.annotations.ApiOperation;
/**
/**
* 权限相关接口
* 权限相关接口
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Api
(
tags
=
"权限"
)
@Api
(
tags
=
"权限"
)
...
@@ -127,7 +127,15 @@ public class PermissionController {
...
@@ -127,7 +127,15 @@ public class PermissionController {
@ApiOperation
(
value
=
"所有菜单"
)
@ApiOperation
(
value
=
"所有菜单"
)
@PreAuthorize
(
"hasAuthority('sys:menu:query')"
)
@PreAuthorize
(
"hasAuthority('sys:menu:query')"
)
public
JSONArray
permissionsAll
()
{
public
JSONArray
permissionsAll
()
{
List
<
Permission
>
permissionsAll
=
permissionDao
.
listAll
();
//获取当前登录用户,如果是admin用户则展示所有权限,否则只能看到当前用户拥有的权限
LoginUser
loginUser
=
UserUtil
.
getLoginUser
();
List
<
Permission
>
permissionsAll
=
null
;
if
(
loginUser
.
getId
().
intValue
()==
1
){
permissionsAll
=
permissionDao
.
listAll
();
}
else
{
permissionsAll
=
loginUser
.
getPermissions
();
}
//List<Permission> permissionsAll = permissionDao.listAll();
JSONArray
array
=
new
JSONArray
();
JSONArray
array
=
new
JSONArray
();
setPermissionsTree
(
0L
,
permissionsAll
,
array
);
setPermissionsTree
(
0L
,
permissionsAll
,
array
);
...
...
src/main/java/com/boot/security/server/controller/RoleController.java
View file @
fe741f85
package
com
.
boot
.
security
.
server
.
controller
;
package
com
.
boot
.
security
.
server
.
controller
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
com.boot.security.server.dto.LoginUser
;
import
com.boot.security.server.utils.UserUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
@@ -30,7 +33,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -30,7 +33,7 @@ import io.swagger.annotations.ApiOperation;
/**
/**
* 角色相关接口
* 角色相关接口
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Api
(
tags
=
"角色"
)
@Api
(
tags
=
"角色"
)
...
@@ -55,10 +58,16 @@ public class RoleController {
...
@@ -55,10 +58,16 @@ public class RoleController {
@ApiOperation
(
value
=
"角色列表"
)
@ApiOperation
(
value
=
"角色列表"
)
@PreAuthorize
(
"hasAuthority('sys:role:query')"
)
@PreAuthorize
(
"hasAuthority('sys:role:query')"
)
public
PageTableResponse
listRoles
(
PageTableRequest
request
)
{
public
PageTableResponse
listRoles
(
PageTableRequest
request
)
{
//查询角色列表时,如果是admin用户显示所有角色,否则只显示除admin之外的角色
LoginUser
loginUser
=
UserUtil
.
getLoginUser
();
Long
id
=
loginUser
.
getId
();
return
new
PageTableHandler
(
new
CountHandler
()
{
return
new
PageTableHandler
(
new
CountHandler
()
{
@Override
@Override
public
int
count
(
PageTableRequest
request
)
{
public
int
count
(
PageTableRequest
request
)
{
if
(
id
!=
1
){
return
roleDao
.
count
(
request
.
getParams
())-
1
;
}
return
roleDao
.
count
(
request
.
getParams
());
return
roleDao
.
count
(
request
.
getParams
());
}
}
},
new
ListHandler
()
{
},
new
ListHandler
()
{
...
@@ -66,6 +75,15 @@ public class RoleController {
...
@@ -66,6 +75,15 @@ public class RoleController {
@Override
@Override
public
List
<
Role
>
list
(
PageTableRequest
request
)
{
public
List
<
Role
>
list
(
PageTableRequest
request
)
{
List
<
Role
>
list
=
roleDao
.
list
(
request
.
getParams
(),
request
.
getOffset
(),
request
.
getLimit
());
List
<
Role
>
list
=
roleDao
.
list
(
request
.
getParams
(),
request
.
getOffset
(),
request
.
getLimit
());
if
(
id
!=
1
){
Iterator
<
Role
>
iterator
=
list
.
iterator
();
while
(
iterator
.
hasNext
())
{
Role
role
=
iterator
.
next
();
if
(
role
.
getId
().
intValue
()==
1
){
iterator
.
remove
();
}
}
}
return
list
;
return
list
;
}
}
}).
handle
(
request
);
}).
handle
(
request
);
...
...
src/main/java/com/boot/security/server/controller/UserController.java
View file @
fe741f85
...
@@ -33,7 +33,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -33,7 +33,7 @@ import io.swagger.annotations.ApiOperation;
/**
/**
* 用户相关接口
* 用户相关接口
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Api
(
tags
=
"用户"
)
@Api
(
tags
=
"用户"
)
...
...
src/main/java/com/boot/security/server/dto/Token.java
View file @
fe741f85
...
@@ -5,7 +5,7 @@ import java.io.Serializable;
...
@@ -5,7 +5,7 @@ import java.io.Serializable;
/**
/**
* Restful方式登陆token
* Restful方式登陆token
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年8月4日
* 2017年8月4日
*/
*/
...
...
src/main/java/com/boot/security/server/filter/TokenFilter.java
View file @
fe741f85
...
@@ -21,7 +21,7 @@ import com.boot.security.server.service.TokenService;
...
@@ -21,7 +21,7 @@ import com.boot.security.server.service.TokenService;
/**
/**
* Token过滤器
* Token过滤器
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年10月14日
* 2017年10月14日
*/
*/
...
@@ -36,6 +36,7 @@ public class TokenFilter extends OncePerRequestFilter {
...
@@ -36,6 +36,7 @@ public class TokenFilter extends OncePerRequestFilter {
private
UserDetailsService
userDetailsService
;
private
UserDetailsService
userDetailsService
;
private
static
final
Long
MINUTES_10
=
10
*
60
*
1000L
;
private
static
final
Long
MINUTES_10
=
10
*
60
*
1000L
;
//给token延长时间并且保存登录用户的信息
@Override
@Override
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
protected
void
doFilterInternal
(
HttpServletRequest
request
,
HttpServletResponse
response
,
FilterChain
filterChain
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
...
...
src/main/java/com/boot/security/server/page/table/PageTableArgumentResolver.java
View file @
fe741f85
...
@@ -19,7 +19,7 @@ import com.google.common.collect.Maps;
...
@@ -19,7 +19,7 @@ import com.google.common.collect.Maps;
/**
/**
* 分页、查询参数解析
* 分页、查询参数解析
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
PageTableArgumentResolver
implements
HandlerMethodArgumentResolver
{
public
class
PageTableArgumentResolver
implements
HandlerMethodArgumentResolver
{
...
...
src/main/java/com/boot/security/server/page/table/PageTableHandler.java
View file @
fe741f85
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -6,7 +6,7 @@ import java.util.List;
/**
/**
* 分页查询处理器
* 分页查询处理器
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
...
...
src/main/java/com/boot/security/server/page/table/PageTableRequest.java
View file @
fe741f85
...
@@ -6,7 +6,7 @@ import java.util.Map;
...
@@ -6,7 +6,7 @@ import java.util.Map;
/**
/**
* 分页查询参数
* 分页查询参数
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
PageTableRequest
implements
Serializable
{
public
class
PageTableRequest
implements
Serializable
{
...
...
src/main/java/com/boot/security/server/page/table/PageTableResponse.java
View file @
fe741f85
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -6,7 +6,7 @@ import java.util.List;
/**
/**
* 分页查询返回
* 分页查询返回
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
PageTableResponse
implements
Serializable
{
public
class
PageTableResponse
implements
Serializable
{
...
...
src/main/java/com/boot/security/server/service/SysLogService.java
View file @
fe741f85
...
@@ -5,7 +5,7 @@ import com.boot.security.server.model.SysLogs;
...
@@ -5,7 +5,7 @@ import com.boot.security.server.model.SysLogs;
/**
/**
* 日志service
* 日志service
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年8月19日
* 2017年8月19日
*/
*/
...
...
src/main/java/com/boot/security/server/service/TokenService.java
View file @
fe741f85
...
@@ -11,7 +11,7 @@ import com.boot.security.server.dto.Token;
...
@@ -11,7 +11,7 @@ import com.boot.security.server.dto.Token;
* 如要换成数据库存储,将TokenServiceImpl类上的注解@Primary挪到com.boot.security.server.service.impl.TokenServiceDbImpl
* 如要换成数据库存储,将TokenServiceImpl类上的注解@Primary挪到com.boot.security.server.service.impl.TokenServiceDbImpl
*
*
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
* 2017年10月14日
* 2017年10月14日
*/
*/
...
...
src/main/java/com/boot/security/server/service/impl/TokenServiceDbImpl.java
View file @
fe741f85
...
@@ -32,7 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
...
@@ -32,7 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
/**
/**
* token存到数据库的实现类
* token存到数据库的实现类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Service
@Service
...
...
src/main/java/com/boot/security/server/service/impl/TokenServiceImpl.java
View file @
fe741f85
...
@@ -16,7 +16,7 @@ import com.boot.security.server.service.TokenService;
...
@@ -16,7 +16,7 @@ import com.boot.security.server.service.TokenService;
* token存到redis的实现类<br>
* token存到redis的实现类<br>
* 普通token,uuid
* 普通token,uuid
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Deprecated
@Deprecated
...
...
src/main/java/com/boot/security/server/service/impl/TokenServiceJWTImpl.java
View file @
fe741f85
...
@@ -32,7 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
...
@@ -32,7 +32,7 @@ import io.jsonwebtoken.SignatureAlgorithm;
* token存到redis的实现类<br>
* token存到redis的实现类<br>
* jwt实现的token
* jwt实现的token
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Primary
@Primary
...
...
src/main/java/com/boot/security/server/service/impl/UserDetailsServiceImpl.java
View file @
fe741f85
...
@@ -24,7 +24,7 @@ import com.boot.security.server.service.UserService;
...
@@ -24,7 +24,7 @@ import com.boot.security.server.service.UserService;
* <p>
* <p>
* 密码校验请看文档(02 框架及配置),第三章第4节
* 密码校验请看文档(02 框架及配置),第三章第4节
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*/
*/
@Service
@Service
public
class
UserDetailsServiceImpl
implements
UserDetailsService
{
public
class
UserDetailsServiceImpl
implements
UserDetailsService
{
...
...
src/main/java/com/boot/security/server/utils/ExcelUtil.java
View file @
fe741f85
...
@@ -21,7 +21,7 @@ import org.apache.poi.ss.usermodel.Workbook;
...
@@ -21,7 +21,7 @@ import org.apache.poi.ss.usermodel.Workbook;
/**
/**
* excel工具类
* excel工具类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
ExcelUtil
{
public
class
ExcelUtil
{
...
...
src/main/java/com/boot/security/server/utils/FileUtil.java
View file @
fe741f85
...
@@ -16,7 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -16,7 +16,7 @@ import org.springframework.web.multipart.MultipartFile;
/**
/**
* 文件工具类
* 文件工具类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
FileUtil
{
public
class
FileUtil
{
...
...
src/main/java/com/boot/security/server/utils/SpringUtil.java
View file @
fe741f85
...
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
...
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
/**
/**
* spring获取bean工具类
* spring获取bean工具类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
@Component
@Component
...
...
src/main/java/com/boot/security/server/utils/StrUtil.java
View file @
fe741f85
...
@@ -7,7 +7,7 @@ import com.google.common.collect.Lists;
...
@@ -7,7 +7,7 @@ import com.google.common.collect.Lists;
/**
/**
* 字符串转化工具类
* 字符串转化工具类
*
*
* @author
奇趣源码商城 www.qiqucode.com
* @author
maliang
*
*
*/
*/
public
class
StrUtil
{
public
class
StrUtil
{
...
...
src/main/resources/.gitignore
deleted
100644 → 0
View file @
ab326639
/rebel.xml
src/main/resources/static/index.html
View file @
fe741f85
...
@@ -71,7 +71,13 @@
...
@@ -71,7 +71,13 @@
</ul>
</ul>
<div
class=
"layui-tab-content"
style=
"min-height: 150px; padding: 5px 0 0 0;"
>
<div
class=
"layui-tab-content"
style=
"min-height: 150px; padding: 5px 0 0 0;"
>
<div
class=
"layui-tab-item layui-show"
>
<div
class=
"layui-tab-item layui-show"
>
<iframe
src=
"pages/dashboard.html"
></iframe>
<!--<iframe src="pages/dashboard.html"></iframe>-->
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
lwby
</div>
<div
class=
"layui-card-body"
>
欢迎来到必看小说广告数据平台
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
src/main/resources/static/js/main.js
View file @
fe741f85
...
@@ -26,9 +26,10 @@ function initMenu(){
...
@@ -26,9 +26,10 @@ function initMenu(){
}
}
var
li
=
$
(
"<li class='layui-nav-item'></li>"
);
var
li
=
$
(
"<li class='layui-nav-item'></li>"
);
if
(
i
==
0
)
{
//使菜单默认展开
li
.
addClass
(
"layui-nav-itemed"
);
// if (i == 0) {
}
// li.addClass("layui-nav-itemed");
// }
li
.
append
(
a
);
li
.
append
(
a
);
menu
.
append
(
li
);
menu
.
append
(
li
);
...
...
src/main/resources/static/pages/advertiserManager/advertiserManager.html
0 → 100644
View file @
fe741f85
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
广告主管理
</title>
</head>
<link
rel=
"stylesheet"
href=
"../../css/treetable/jquery.treetable.css"
/>
<link
rel=
"stylesheet"
href=
"../../css/treetable/jquery.treetable.theme.default.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
media=
"screen"
href=
"../../layui/css/layui.css"
>
<body>
<table
id=
"demo"
lay-filter=
"test"
></table>
</body>
</html>
<script
type=
"text/javascript"
src=
"../../js/libs/jquery-2.1.1.min.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/jq.js"
></script>
<script
type=
"text/javascript"
src=
"../../layui/layui.js"
></script>
<script
type=
"text/javascript"
src=
"../../js/my/permission.js"
></script>
<script
src=
"../../js/libs/jquery.treetable.js"
></script>
<script>
layui
.
use
(
'table'
,
function
(){
var
table
=
layui
.
table
;
//第一个实例
table
.
render
({
elem
:
'#demo'
,
url
:
'/advertiserManagerController/table'
//数据接口
,
page
:
true
//开启分页
,
cols
:
[[
//表头
{
field
:
'id'
,
title
:
'ID'
,
sort
:
true
,
fixed
:
'left'
}
,{
field
:
'advertiser'
,
title
:
'广告主名称'
}
,{
field
:
'AccumulatedConsumptionAmount'
,
title
:
'累计消耗金额'
,
sort
:
true
}
,{
field
:
'leader'
,
title
:
'负责人'
}
,{
field
:
'yesterdayConsumptionAmount'
,
title
:
'昨日消耗金额'
,
}
,{
field
:
'viewData'
,
title
:
'展示数据'
,
sort
:
true
}
]]
});
});
</script>
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