Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
520ff6e5
Commit
520ff6e5
authored
Mar 31, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/lee/chnmuseum-party
into master
parents
ba9024ca
f5377f7c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
8 deletions
+28
-8
MvcConfiguration.java
...a/cn/wisenergy/chnmuseum/party/conf/MvcConfiguration.java
+1
-1
AuditController.java
...nergy/chnmuseum/party/web/controller/AuditController.java
+27
-7
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/conf/MvcConfiguration.java
View file @
520ff6e5
...
...
@@ -81,7 +81,7 @@ public class MvcConfiguration extends WebMvcConfigurationSupport {
// serializeConfig.put(Long.class, ToStringSerializer.instance);
// serializeConfig.put(Long.TYPE, ToStringSerializer.instance);
serializeConfig
.
setPropertyNamingStrategy
(
PropertyNamingStrategy
.
CamelCase
);
serializeConfig
.
put
(
LocalDateTime
.
class
,
new
MyLocalDateTimeSerializer
(
"yyyy-MM-dd
hh
:mm:ss"
));
serializeConfig
.
put
(
LocalDateTime
.
class
,
new
MyLocalDateTimeSerializer
(
"yyyy-MM-dd
HH
:mm:ss"
));
serializeConfig
.
put
(
LocalDate
.
class
,
new
MyLocalDateSerializer
(
"yyyy-MM-dd"
));
fastJsonConfig
.
setSerializeConfig
(
serializeConfig
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AuditController.java
View file @
520ff6e5
...
...
@@ -88,32 +88,42 @@ public class AuditController extends BaseController {
@ApiOperation
(
value
=
"修改禁用审核信息"
,
notes
=
"修改禁用审核信息"
)
public
Map
<
String
,
Object
>
updateAudit
(
@RequestBody
@Validated
(
value
=
{
Update
.
class
})
Audit
audit
)
{
boolean
flag
;
if
(
AuditStatusEnum
.
APPROVED_FINAL
.
name
().
equals
(
audit
.
getStatus
())&&
AuditStatusEnum
.
TBC
.
name
().
equals
(
audit
.
getLevel
()))
{
//如果当前审核状态为通过,并且审核层级为初审
if
(
AuditStatusEnum
.
APPROVED_FINAL
.
name
().
equals
(
audit
.
getStatus
())
&&
AuditStatusEnum
.
TBC
.
name
().
equals
(
audit
.
getLevel
()))
{
//初审通过,提交复审,设置层级为复审
audit
.
setLevel
(
AuditStatusEnum
.
TBCA
.
name
());
audit
.
setStatus
(
AuditStatusEnum
.
TBCA
.
name
());
}
//如果层级是初审,设置初审时间
if
(
AuditStatusEnum
.
TBC
.
name
().
equals
(
audit
.
getLevel
()))
{
audit
.
setFirstTime
(
LocalDateTime
.
now
());
//如果审核状态不是驳回,清空驳回原因
if
(!
AuditStatusEnum
.
REFUSED
.
name
().
equals
(
audit
.
getStatus
()))
{
audit
.
setFirstRemarks
(
""
);
}
}
else
{
}
else
{
//如果层级是复审,设置复审时间
audit
.
setSecondTime
(
LocalDateTime
.
now
());
//如果审核状态不是驳回,清空驳回原因
if
(!
AuditStatusEnum
.
REFUSED
.
name
().
equals
(
audit
.
getStatus
()))
{
audit
.
setSecondRemarks
(
""
);
}
}
try
{
//如果类型是用户禁用审核
if
(
AuditTypeEnum
.
ACCOUNT
.
name
().
equals
(
audit
.
getType
()))
{
Audit
audit1
=
auditService
.
getById
(
audit
.
getId
());
//设置用户原始数据状态
TUser
user
=
new
TUser
();
user
.
setId
(
audit1
.
getRefItemId
());
user
.
setAuditStatus
(
audit
.
getStatus
());
//如果复审通过,真正禁用用户
if
(
AuditStatusEnum
.
APPROVED_FINAL
.
name
().
equals
(
audit
.
getStatus
()))
{
user
.
setStatus
(
AuditOperationEnum
.
DISABLE
.
name
());
}
userService
.
updateById
(
user
);
}
//更新审核数据
flag
=
auditService
.
updateById
(
audit
);
if
(!
flag
)
{
return
getFailResult
();
...
...
@@ -185,13 +195,23 @@ public class AuditController extends BaseController {
@ApiOperation
(
value
=
"获取禁用审核详情"
,
notes
=
"获取禁用审核详情"
)
@GetMapping
(
"/getById"
)
@RequiresPermissions
(
"/audit/getById"
)
public
Map
<
String
,
Object
>
getById
(
String
id
)
{
public
Map
<
String
,
Object
>
getById
(
String
id
,
String
type
)
{
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
try
{
Audit
audit
=
n
ew
Audit
()
;
Audit
audit
=
n
ull
;
UpdateWrapper
<
Audit
>
wrapper
=
new
UpdateWrapper
<>();
if
(
StringUtils
.
isNotBlank
(
id
))
{
wrapper
.
eq
(
"ref_item_id"
,
id
);
audit
=
auditService
.
getOne
(
wrapper
);
}
if
(
StringUtils
.
isNotBlank
(
type
))
{
wrapper
.
eq
(
"type"
,
type
);
}
wrapper
.
orderByDesc
(
"create_time"
);
//只获取最新的一条审核数据
List
<
Audit
>
list
=
auditService
.
list
(
wrapper
);
if
(
list
.
size
()
>
0
)
{
audit
=
list
.
get
(
0
);
}
resultMap
.
put
(
"resultCode"
,
"200"
);
resultMap
.
put
(
"message"
,
"操作成功"
);
resultMap
.
put
(
"data"
,
audit
);
...
...
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