Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
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
liqin
chnmuseum-party
Commits
f75cc9f4
Commit
f75cc9f4
authored
Apr 01, 2021
by
jiawei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
5b198ff1
e40cf9a0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
102 additions
and
56 deletions
+102
-56
LanguageEnum.java
.../wisenergy/chnmuseum/party/common/enums/LanguageEnum.java
+5
-5
SystemOperationLogService.java
...chnmuseum/party/common/log/SystemOperationLogService.java
+11
-2
AuditServiceImpl.java
...energy/chnmuseum/party/service/impl/AuditServiceImpl.java
+2
-1
AuditController.java
...nergy/chnmuseum/party/web/controller/AuditController.java
+78
-47
TBoxOperationController.java
...nmuseum/party/web/controller/TBoxOperationController.java
+1
-1
BaseController.java
...y/chnmuseum/party/web/controller/base/BaseController.java
+5
-0
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/LanguageEnum.java
View file @
f75cc9f4
...
@@ -2,11 +2,11 @@ package cn.wisenergy.chnmuseum.party.common.enums;
...
@@ -2,11 +2,11 @@ package cn.wisenergy.chnmuseum.party.common.enums;
public
enum
LanguageEnum
{
public
enum
LanguageEnum
{
CHINESE
(
"Chinese"
,
"汉语"
),
zh
(
"Chinese"
,
"汉语"
),
MONGOLIAN
(
"Mongolian"
,
"蒙语"
),
mn
(
"Mongolian"
,
"蒙语"
),
TIBETAN
(
"Tibetan"
,
"藏语"
),
bo
(
"Tibetan"
,
"藏语"
),
UYGHUR
(
"Uyghur"
,
"维吾尔语"
),
uyg
(
"Uyghur"
,
"维吾尔语"
),
ENGLISH
(
"English"
,
"英语"
);
en
(
"English"
,
"英语"
);
// 错误编码
// 错误编码
private
String
code
;
private
String
code
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/common/log/SystemOperationLogService.java
View file @
f75cc9f4
...
@@ -15,6 +15,7 @@ import cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl;
...
@@ -15,6 +15,7 @@ import cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
javassist.util.HotSwapper
;
import
javassist.util.HotSwapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.Signature
;
import
org.aspectj.lang.Signature
;
...
@@ -60,7 +61,7 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
...
@@ -60,7 +61,7 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
public
TUser
getCurAdmin
(
HttpServletRequest
request
)
{
public
TUser
getCurAdmin
(
HttpServletRequest
request
)
{
String
header
=
request
.
getHeader
(
"Authorization"
);
String
header
=
request
.
getHeader
(
"Authorization"
);
if
(
StringUtils
.
isBlank
(
header
))
{
if
(
StringUtils
.
isBlank
(
header
))
{
return
null
;
throw
new
AuthenticationException
(
"token失效,请重新登录"
)
;
}
}
String
username
=
JwtTokenUtil
.
getUsername
(
header
);
String
username
=
JwtTokenUtil
.
getUsername
(
header
);
TUser
user
=
userService
.
selectByUsername
(
username
);
TUser
user
=
userService
.
selectByUsername
(
username
);
...
@@ -89,7 +90,15 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
...
@@ -89,7 +90,15 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
.
getRequestAttributes
()).
getRequest
();
.
getRequestAttributes
()).
getRequest
();
MethodLog
methodLog
=
getAnnotationLog
(
point
);
MethodLog
methodLog
=
getAnnotationLog
(
point
);
String
ip
=
getIp
(
request
);
String
ip
=
getIp
(
request
);
TUser
user
=
getCurAdmin
(
request
);
TUser
user
=
null
;
try
{
user
=
getCurAdmin
(
request
);
}
catch
(
Exception
e
)
{
HashMap
<
Object
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"resultCode"
,
"500"
);
resultMap
.
put
(
"message"
,
e
.
getMessage
());
return
resultMap
;
}
// if (user==null){
// if (user==null){
// HashMap<String, Object> resultMap = new HashMap<>();
// HashMap<String, Object> resultMap = new HashMap<>();
// resultMap.put("resultCode", "500");
// resultMap.put("resultCode", "500");
...
...
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/AuditServiceImpl.java
View file @
f75cc9f4
...
@@ -73,7 +73,8 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
...
@@ -73,7 +73,8 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
auditPage
.
setSize
(
page
.
getSize
());
auditPage
.
setSize
(
page
.
getSize
());
//条件
//条件
QueryWrapper
<
Audit
>
ew
=
new
QueryWrapper
<
Audit
>()
QueryWrapper
<
Audit
>
ew
=
new
QueryWrapper
<
Audit
>()
.
eq
(
"a.level"
,
auditStatusLevel
.
name
())
//暂时注掉
// .eq("a.level", auditStatusLevel.name())
.
eq
(
"a.type"
,
type
.
name
())
.
eq
(
"a.type"
,
type
.
name
())
.
orderByDesc
(
"a.create_time"
,
"a.id"
);
.
orderByDesc
(
"a.create_time"
,
"a.id"
);
//
//
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AuditController.java
View file @
f75cc9f4
...
@@ -66,6 +66,7 @@ public class AuditController extends BaseController {
...
@@ -66,6 +66,7 @@ public class AuditController extends BaseController {
public
Map
<
String
,
Object
>
getUserList
(
String
name
,
String
status
,
String
level
)
{
public
Map
<
String
,
Object
>
getUserList
(
String
name
,
String
status
,
String
level
)
{
Page
<
Audit
>
auditList
;
Page
<
Audit
>
auditList
;
try
{
try
{
TUser
user1
=
getcurUser
();
TUser
user
=
new
TUser
();
TUser
user
=
new
TUser
();
if
(
StringUtils
.
isNotBlank
(
name
))
{
if
(
StringUtils
.
isNotBlank
(
name
))
{
user
.
setUserName
(
name
);
user
.
setUserName
(
name
);
...
@@ -76,6 +77,12 @@ public class AuditController extends BaseController {
...
@@ -76,6 +77,12 @@ public class AuditController extends BaseController {
if
(
StringUtils
.
isNotBlank
(
level
))
{
if
(
StringUtils
.
isNotBlank
(
level
))
{
user
.
setAuditStatus
(
level
);
user
.
setAuditStatus
(
level
);
}
}
//如果是账号禁用初审员,设置层级为初审
if
(
user1
.
getRoleList
().
contains
(
"15"
)){
user
.
setAuditStatus
(
AuditStatusEnum
.
TBC
.
name
());
}
else
{
user
.
setAuditStatus
(
AuditStatusEnum
.
TBCA
.
name
());
}
auditList
=
auditService
.
getUserList
(
getPage
(),
user
);
auditList
=
auditService
.
getUserList
(
getPage
(),
user
);
return
getResult
(
auditList
);
return
getResult
(
auditList
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -149,48 +156,48 @@ public class AuditController extends BaseController {
...
@@ -149,48 +156,48 @@ public class AuditController extends BaseController {
return
getFailResult
();
return
getFailResult
();
}
}
@GetMapping
(
"/getList"
)
//
@GetMapping("/getList")
@RequiresPermissions
(
"/audit/getList"
)
//
@RequiresPermissions("/audit/getList")
@ApiOperation
(
value
=
"获取禁用审核全部列表(无分页)"
,
notes
=
"获取禁用审核全部列表(无分页)"
)
//
@ApiOperation(value = "获取禁用审核全部列表(无分页)", notes = "获取禁用审核全部列表(无分页)")
@ApiImplicitParams
(
value
=
{
//
@ApiImplicitParams(value = {
@ApiImplicitParam
(
name
=
"auditStatus"
,
value
=
"审核状态"
,
paramType
=
"query"
,
dataType
=
"String"
)
//
@ApiImplicitParam(name = "auditStatus", value = "审核状态", paramType = "query", dataType = "String")
})
//
})
public
Map
<
String
,
Object
>
getAuditList
(
@RequestParam
(
value
=
"auditStatus"
,
defaultValue
=
"APPROVED_FINAL"
,
required
=
false
)
AuditStatusEnum
auditStatus
)
{
//
public Map<String, Object> getAuditList(@RequestParam(value = "auditStatus", defaultValue = "APPROVED_FINAL", required = false) AuditStatusEnum auditStatus) {
List
<
Audit
>
auditList
=
auditService
.
list
();
//
List<Audit> auditList = auditService.list();
return
getResult
(
auditList
);
//
return getResult(auditList);
}
//
}
//
@ApiImplicitParams
(
value
=
{
//
@ApiImplicitParams(value = {
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
//
@ApiImplicitParam(name = "_index", value = "分页起始偏移量", paramType = "query", dataType = "Integer"),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
//
@ApiImplicitParam(name = "_size", value = "返回条数", paramType = "query", dataType = "Integer"),
@ApiImplicitParam
(
name
=
"nameOrCode"
,
value
=
"名称或编码"
,
paramType
=
"query"
,
dataType
=
"String"
),
//
@ApiImplicitParam(name = "nameOrCode", value = "名称或编码", paramType = "query", dataType = "String"),
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"创建时间-开始"
,
paramType
=
"query"
,
dataType
=
"String"
),
//
@ApiImplicitParam(name = "startDate", value = "创建时间-开始", paramType = "query", dataType = "String"),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"创建时间-结束"
,
paramType
=
"query"
,
dataType
=
"String"
)
//
@ApiImplicitParam(name = "endDate", value = "创建时间-结束", paramType = "query", dataType = "String")
})
//
})
@PostMapping
(
"/getPageList"
)
//
@PostMapping("/getPageList")
@RequiresPermissions
(
"/audit/getPageList"
)
//
@RequiresPermissions("/audit/getPageList")
@ApiOperation
(
value
=
"获取禁用审核分页列表"
,
notes
=
"获取禁用审核分页列表"
)
//
@ApiOperation(value = "获取禁用审核分页列表", notes = "获取禁用审核分页列表")
public
Map
<
String
,
Object
>
getAuditPageList
(
GenericPageParam
genericPageParam
)
{
//
public Map<String, Object> getAuditPageList(GenericPageParam genericPageParam) {
LambdaQueryWrapper
<
Audit
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
//
LambdaQueryWrapper<Audit> queryWrapper = new LambdaQueryWrapper<>();
// 对名称或编码模糊查询
//
// 对名称或编码模糊查询
if
(
StringUtils
.
isNotBlank
(
genericPageParam
.
getNameOrCode
()))
{
//
if (StringUtils.isNotBlank(genericPageParam.getNameOrCode())) {
queryWrapper
.
like
(
Audit:
:
getContent
,
genericPageParam
.
getNameOrCode
());
//
queryWrapper.like(Audit::getContent, genericPageParam.getNameOrCode());
}
//
}
// 根据创建时间区间检索
//
// 根据创建时间区间检索
if
(
genericPageParam
.
getStartDate
()
!=
null
&&
genericPageParam
.
getEndDate
()
!=
null
)
{
//
if (genericPageParam.getStartDate() != null && genericPageParam.getEndDate() != null) {
queryWrapper
.
ge
(
Audit:
:
getCreateTime
,
genericPageParam
.
getStartDate
().
atTime
(
0
,
0
,
0
))
//
queryWrapper.ge(Audit::getCreateTime, genericPageParam.getStartDate().atTime(0, 0, 0))
.
le
(
Audit:
:
getCreateTime
,
genericPageParam
.
getEndDate
().
atTime
(
23
,
59
,
59
));
//
.le(Audit::getCreateTime, genericPageParam.getEndDate().atTime(23, 59, 59));
}
//
}
// 设置排序规则
//
// 设置排序规则
queryWrapper
.
orderByDesc
(
Audit:
:
getCreateTime
);
//
queryWrapper.orderByDesc(Audit::getCreateTime);
// 设置查询内容
//
// 设置查询内容
queryWrapper
.
select
(
//
queryWrapper.select(
Audit:
:
getId
,
//
Audit::getId,
Audit:
:
getContent
,
//
Audit::getContent,
Audit:
:
getCreateTime
);
//
Audit::getCreateTime);
Page
<
Audit
>
page
=
this
.
auditService
.
page
(
getPage
(),
queryWrapper
);
//
Page<Audit> page = this.auditService.page(getPage(), queryWrapper);
return
getResult
(
page
);
//
return getResult(page);
}
//
}
@ApiOperation
(
value
=
"获取禁用审核详情"
,
notes
=
"获取禁用审核详情"
)
@ApiOperation
(
value
=
"获取禁用审核详情"
,
notes
=
"获取禁用审核详情"
)
@GetMapping
(
"/getById"
)
@GetMapping
(
"/getById"
)
...
@@ -221,20 +228,44 @@ public class AuditController extends BaseController {
...
@@ -221,20 +228,44 @@ public class AuditController extends BaseController {
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"账号名称或提交人"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"name"
,
value
=
"账号名称或提交人"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"待初审:TBC, 驳回:REFUSED,待复审:TBCA, 通过:APPROVED_FINAL"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"待初审:TBC, 驳回:REFUSED,待复审:TBCA, 通过:APPROVED_FINAL"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"level"
,
value
=
"审核级别:TBC,TBCA"
,
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"视频内容:ASSET,展板内容:EXHIBITION_BOARD,学习内容:LEARNING_CONTENT"
,
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
)
@ApiImplicitParam
(
name
=
"type"
,
value
=
"视频内容:ASSET,展板内容:EXHIBITION_BOARD,学习内容:LEARNING_CONTENT"
,
paramType
=
"query"
,
dataType
=
"String"
,
required
=
true
)
})
})
public
Map
<
String
,
Object
>
getPageAllList
(
String
name
,
String
status
,
public
Map
<
String
,
Object
>
getPageAllList
(
String
name
,
String
status
,
@NotBlank
(
message
=
"level参数不能为空"
)
String
level
,
@NotBlank
(
message
=
"type参数不能为空"
)
String
type
)
{
@NotBlank
(
message
=
"type参数不能为空"
)
String
type
)
{
//分页
//分页
Page
<
Object
>
page
=
getPage
();
Page
<
Object
>
page
=
getPage
();
AuditStatusEnum
auditStatus
=
null
;
AuditStatusEnum
auditStatus
=
null
;
AuditStatusEnum
auditStatusLevel
=
AuditStatusEnum
.
valueOf
(
level
)
;
AuditStatusEnum
auditStatusLevel
=
null
;
AuditTypeEnum
auditTypeEnum
=
AuditTypeEnum
.
valueOf
(
type
);
AuditTypeEnum
auditTypeEnum
=
AuditTypeEnum
.
valueOf
(
type
);
if
(
auditTypeEnum
==
null
||
auditStatusLevel
==
null
)
{
// TUser user = getcurUser();
return
getFailResult
(
"type或level参数不正确"
);
// switch (auditTypeEnum){
// case ASSET:
// if (user.getRoleList().contains("9")){
// auditStatusLevel=AuditStatusEnum.TBC;
// }else {
// auditStatusLevel=AuditStatusEnum.TBCA;
// }
// break;
// case EXHIBITION_BOARD:
// if (user.getRoleList().contains("11")){
// auditStatusLevel=AuditStatusEnum.TBC;
// }else {
// auditStatusLevel=AuditStatusEnum.TBCA;
// }
// break;
// case LEARNING_CONTENT:
// if (user.getRoleList().contains("13")){
// auditStatusLevel=AuditStatusEnum.TBC;
// }else {
// auditStatusLevel=AuditStatusEnum.TBCA;
// }
// break;
//
// }
if
(
auditTypeEnum
==
null
)
{
return
getFailResult
(
"type参数不正确"
);
}
}
if
(
StringUtils
.
isNotBlank
(
status
))
{
if
(
StringUtils
.
isNotBlank
(
status
))
{
auditStatus
=
AuditStatusEnum
.
valueOf
(
status
);
auditStatus
=
AuditStatusEnum
.
valueOf
(
status
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TBoxOperationController.java
View file @
f75cc9f4
...
@@ -64,7 +64,7 @@ public class TBoxOperationController extends BaseController {
...
@@ -64,7 +64,7 @@ public class TBoxOperationController extends BaseController {
//设置数据权限
//设置数据权限
if
(
StringUtils
.
isNotBlank
(
user1
.
getAreaId
()))
{
if
(
StringUtils
.
isNotBlank
(
user1
.
getAreaId
()))
{
String
areaId1
=
getAreaId
(
user1
.
getAreaId
());
String
areaId1
=
getAreaId
(
user1
.
getAreaId
());
user
.
setAreaName
(
getAreaId
(
areaId1
)
);
user
.
setAreaName
(
areaId1
);
}
}
user
.
setOrgCode
(
user1
.
getOrgCode
());
user
.
setOrgCode
(
user1
.
getOrgCode
());
try
{
try
{
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/base/BaseController.java
View file @
f75cc9f4
...
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.alibaba.fastjson.serializer.SimplePropertyPreFilter
;
import
com.alibaba.fastjson.serializer.SimplePropertyPreFilter
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -189,6 +190,8 @@ public class BaseController implements Serializable {
...
@@ -189,6 +190,8 @@ public class BaseController implements Serializable {
if
(
authorization
.
startsWith
(
"Bearer "
))
{
if
(
authorization
.
startsWith
(
"Bearer "
))
{
authorization
=
authorization
.
substring
(
7
);
authorization
=
authorization
.
substring
(
7
);
}
}
}
else
{
throw
new
AuthenticationException
(
"token失效,请重新登录"
);
}
}
return
JwtTokenUtil
.
getEmployeeId
(
authorization
);
return
JwtTokenUtil
.
getEmployeeId
(
authorization
);
}
}
...
@@ -204,6 +207,8 @@ public class BaseController implements Serializable {
...
@@ -204,6 +207,8 @@ public class BaseController implements Serializable {
if
(
authorization
.
startsWith
(
"Bearer "
))
{
if
(
authorization
.
startsWith
(
"Bearer "
))
{
authorization
=
authorization
.
substring
(
7
);
authorization
=
authorization
.
substring
(
7
);
}
}
}
else
{
throw
new
AuthenticationException
(
"token失效,请重新登录"
);
}
}
return
JwtTokenUtil
.
getUsername
(
authorization
);
return
JwtTokenUtil
.
getUsername
(
authorization
);
}
}
...
...
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