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
9681ddef
Commit
9681ddef
authored
Mar 29, 2021
by
wzp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户审核状态值
parent
cf0df255
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
92 additions
and
72 deletions
+92
-72
AuditOperationEnum.java
...ergy/chnmuseum/party/common/enums/AuditOperationEnum.java
+2
-1
TBoxOperationMapper.java
...wisenergy/chnmuseum/party/mapper/TBoxOperationMapper.java
+1
-1
Audit.java
src/main/java/cn/wisenergy/chnmuseum/party/model/Audit.java
+6
-2
TUser.java
src/main/java/cn/wisenergy/chnmuseum/party/model/TUser.java
+2
-2
TBoxOperationService.java
...senergy/chnmuseum/party/service/TBoxOperationService.java
+1
-1
TBoxOperationServiceImpl.java
...hnmuseum/party/service/impl/TBoxOperationServiceImpl.java
+2
-2
TOrganServiceImpl.java
...nergy/chnmuseum/party/service/impl/TOrganServiceImpl.java
+0
-1
AuditController.java
...nergy/chnmuseum/party/web/controller/AuditController.java
+30
-23
TBoxOperationController.java
...nmuseum/party/web/controller/TBoxOperationController.java
+4
-2
TUserController.java
...nergy/chnmuseum/party/web/controller/TUserController.java
+35
-35
TBoxOperationMapper.xml
src/main/resources/mapper/TBoxOperationMapper.xml
+7
-0
TUserMapper.xml
src/main/resources/mapper/TUserMapper.xml
+2
-2
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/common/enums/AuditOperationEnum.java
View file @
9681ddef
...
@@ -8,7 +8,8 @@ public enum AuditOperationEnum {
...
@@ -8,7 +8,8 @@ public enum AuditOperationEnum {
ADD
(
1
,
"新增"
),
ADD
(
1
,
"新增"
),
EDIT
(
2
,
"修改"
),
EDIT
(
2
,
"修改"
),
REMOVE
(
3
,
"下架"
),
REMOVE
(
3
,
"下架"
),
DISABLE
(
4
,
"禁用"
);
DISABLE
(
4
,
"禁用"
),
UNABLE
(
5
,
"启用"
);
// 错误编码
// 错误编码
private
Integer
code
;
private
Integer
code
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/mapper/TBoxOperationMapper.java
View file @
9681ddef
...
@@ -18,7 +18,7 @@ import java.util.List;
...
@@ -18,7 +18,7 @@ import java.util.List;
*/
*/
public
interface
TBoxOperationMapper
extends
BaseMapper
<
TBoxOperation
>
{
public
interface
TBoxOperationMapper
extends
BaseMapper
<
TBoxOperation
>
{
List
<
TBoxOperation
>
getList
();
List
<
TBoxOperation
>
getList
(
@Param
(
"status"
)
String
status
);
List
<
TBoxOperation
>
selectBoxPage
(
Page
<
TBoxOperation
>
page
,
@Param
(
"user"
)
TUser
user
);
List
<
TBoxOperation
>
selectBoxPage
(
Page
<
TBoxOperation
>
page
,
@Param
(
"user"
)
TUser
user
);
}
}
src/main/java/cn/wisenergy/chnmuseum/party/model/Audit.java
View file @
9681ddef
...
@@ -56,7 +56,7 @@ public class Audit implements Serializable {
...
@@ -56,7 +56,7 @@ public class Audit implements Serializable {
@NotBlank
(
message
=
"提交人员不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"提交人员不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
userId
;
private
String
userId
;
@ApiModelProperty
(
"0,看板;1 视频;2 学习内容;3 账号禁用
"
)
@ApiModelProperty
(
value
=
"审核内容"
,
allowableValues
=
"视频内容 ASSET, 展板内容 EXHIBITION_BOARD, 学习内容 LEARNING_CONTENT, 账户 ACCOUNT
"
)
@TableField
(
"type"
)
@TableField
(
"type"
)
@NotBlank
(
message
=
"0,看板;1 视频;2 学习内容;3 账号禁用不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"0,看板;1 视频;2 学习内容;3 账号禁用不能为空"
,
groups
=
{
Add
.
class
,
Update
.
class
})
private
String
type
;
private
String
type
;
...
@@ -65,7 +65,7 @@ public class Audit implements Serializable {
...
@@ -65,7 +65,7 @@ public class Audit implements Serializable {
@TableField
(
"operation"
)
@TableField
(
"operation"
)
private
String
operation
;
private
String
operation
;
@ApiModelProperty
(
"审核状态
"
)
@ApiModelProperty
(
value
=
"审核状态"
,
allowableValues
=
"待初审 TBC, 驳回 REFUSED,待复审 TBCA, 通过APPROVED_FINAL
"
)
@TableField
(
"status"
)
@TableField
(
"status"
)
private
String
status
;
private
String
status
;
...
@@ -86,6 +86,10 @@ public class Audit implements Serializable {
...
@@ -86,6 +86,10 @@ public class Audit implements Serializable {
@TableField
(
"remarks"
)
@TableField
(
"remarks"
)
private
String
remarks
;
private
String
remarks
;
@ApiModelProperty
(
value
=
"审核层级"
,
allowableValues
=
"初审 TBC,复审 TBCA"
)
@TableField
(
"level"
)
private
String
level
;
@ApiModelProperty
(
"机构名"
)
@ApiModelProperty
(
"机构名"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
orgName
;
private
String
orgName
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/model/TUser.java
View file @
9681ddef
...
@@ -89,7 +89,7 @@ public class TUser implements Serializable {
...
@@ -89,7 +89,7 @@ public class TUser implements Serializable {
@TableField
(
"exired_date"
)
@TableField
(
"exired_date"
)
private
LocalDate
exiredDate
;
private
LocalDate
exiredDate
;
@ApiModelProperty
(
"状态 1.启用 2.禁用
"
)
@ApiModelProperty
(
value
=
"状态"
,
allowableValues
=
"启用 UNABLE, 禁用DISABLE
"
)
@TableField
(
"status"
)
@TableField
(
"status"
)
private
String
status
;
private
String
status
;
...
@@ -121,7 +121,7 @@ public class TUser implements Serializable {
...
@@ -121,7 +121,7 @@ public class TUser implements Serializable {
@TableField
(
"type"
)
@TableField
(
"type"
)
private
String
type
;
private
String
type
;
@ApiModelProperty
(
"审核状态 1.待初审 2.已驳回 3.待复审 4.通过
"
)
@ApiModelProperty
(
value
=
"审核状态"
,
allowableValues
=
"待初审 TBC, 驳回 REFUSED,待复审 TBCA, 通过APPROVED_FINAL
"
)
@TableField
(
"audit_status"
)
@TableField
(
"audit_status"
)
private
String
auditStatus
;
private
String
auditStatus
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/service/TBoxOperationService.java
View file @
9681ddef
...
@@ -17,7 +17,7 @@ import java.util.List;
...
@@ -17,7 +17,7 @@ import java.util.List;
*/
*/
public
interface
TBoxOperationService
extends
IService
<
TBoxOperation
>
{
public
interface
TBoxOperationService
extends
IService
<
TBoxOperation
>
{
List
<
TBoxOperation
>
getList
();
List
<
TBoxOperation
>
getList
(
String
status
);
Page
<
TBoxOperation
>
selectBoxPage
(
Page
<
TBoxOperation
>
page
,
TUser
user
);
Page
<
TBoxOperation
>
selectBoxPage
(
Page
<
TBoxOperation
>
page
,
TUser
user
);
}
}
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/TBoxOperationServiceImpl.java
View file @
9681ddef
...
@@ -30,8 +30,8 @@ public class TBoxOperationServiceImpl extends ServiceImpl<TBoxOperationMapper, T
...
@@ -30,8 +30,8 @@ public class TBoxOperationServiceImpl extends ServiceImpl<TBoxOperationMapper, T
private
TBoxOperationMapper
tBoxOperationMapper
;
private
TBoxOperationMapper
tBoxOperationMapper
;
@Override
@Override
public
List
<
TBoxOperation
>
getList
()
{
public
List
<
TBoxOperation
>
getList
(
String
status
)
{
return
tBoxOperationMapper
.
getList
();
return
tBoxOperationMapper
.
getList
(
status
);
}
}
@Override
@Override
...
...
src/main/java/cn/wisenergy/chnmuseum/party/service/impl/TOrganServiceImpl.java
View file @
9681ddef
...
@@ -89,7 +89,6 @@ public class TOrganServiceImpl extends ServiceImpl<TOrganMapper, TOrgan> impleme
...
@@ -89,7 +89,6 @@ public class TOrganServiceImpl extends ServiceImpl<TOrganMapper, TOrgan> impleme
String
organCode
=
getOrganCode
(
organ
.
getParentId
());
String
organCode
=
getOrganCode
(
organ
.
getParentId
());
organ
.
setCode
(
organCode
);
organ
.
setCode
(
organCode
);
organ
.
setAreaId
(
area
.
get
(
map
.
get
(
"区域"
)));
organ
.
setAreaId
(
area
.
get
(
map
.
get
(
"区域"
)));
organ
.
setIcon
(
map
.
get
(
"icon"
));
organ
.
setRemarks
(
map
.
get
(
"备注"
));
organ
.
setRemarks
(
map
.
get
(
"备注"
));
organ
.
setIsDeleted
(
false
);
organ
.
setIsDeleted
(
false
);
organ
.
setCreateTime
(
DateUtil80
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
organ
.
setCreateTime
(
DateUtil80
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/AuditController.java
View file @
9681ddef
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
import
cn.wisenergy.chnmuseum.party.common.enums.AuditOperationEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.AuditStatusEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.AuditStatusEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.AuditTypeEnum
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Update
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.common.vo.GenericPageParam
;
import
cn.wisenergy.chnmuseum.party.model.Audit
;
import
cn.wisenergy.chnmuseum.party.model.Audit
;
import
cn.wisenergy.chnmuseum.party.model.TUser
;
import
cn.wisenergy.chnmuseum.party.service.AuditService
;
import
cn.wisenergy.chnmuseum.party.service.AuditService
;
import
cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl
;
import
cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
...
@@ -47,6 +50,8 @@ public class AuditController extends BaseController {
...
@@ -47,6 +50,8 @@ public class AuditController extends BaseController {
@RequiresPermissions
(
"/audit/getUserList"
)
@RequiresPermissions
(
"/audit/getUserList"
)
@ApiOperation
(
value
=
"获取用户禁用审核列表"
,
notes
=
"获取用户禁用审核列表"
)
@ApiOperation
(
value
=
"获取用户禁用审核列表"
,
notes
=
"获取用户禁用审核列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
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
=
"1待初审 2 驳回 3 待复审 4通过"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"status"
,
value
=
"1待初审 2 驳回 3 待复审 4通过"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
...
@@ -66,29 +71,31 @@ public class AuditController extends BaseController {
...
@@ -66,29 +71,31 @@ public class AuditController extends BaseController {
@ApiOperation
(
value
=
"修改禁用审核信息"
,
notes
=
"修改禁用审核信息"
)
@ApiOperation
(
value
=
"修改禁用审核信息"
,
notes
=
"修改禁用审核信息"
)
public
Map
<
String
,
Object
>
updateAudit
(
@Validated
(
value
=
{
Update
.
class
})
Audit
audit
)
{
public
Map
<
String
,
Object
>
updateAudit
(
@Validated
(
value
=
{
Update
.
class
})
Audit
audit
)
{
boolean
flag
;
boolean
flag
;
//todo 禁止使用整形值标识状态值,应使用enum来标识
if
(!
AuditStatusEnum
.
TBCA
.
name
().
equals
(
audit
.
getStatus
())){
// if (audit.getStatus() != 2){
audit
.
setLevel
(
AuditStatusEnum
.
TBCA
.
name
());
// audit.setRemarks("");
}
// }
if
(!
AuditStatusEnum
.
REFUSED
.
name
().
equals
(
audit
.
getStatus
())){
// try {
audit
.
setRemarks
(
""
);
// if (audit.getType() == 3) {
}
// Audit audit1 = auditService.getById(audit.getId());
try
{
// TUser user = new TUser();
if
(
AuditTypeEnum
.
ACCOUNT
.
name
().
equals
(
audit
.
getType
()))
{
// user.setId(audit1.getRefItemId());
Audit
audit1
=
auditService
.
getById
(
audit
.
getId
());
// user.setAuditStatus(audit.getStatus());
TUser
user
=
new
TUser
();
// if (audit.getStatus()==4) {
user
.
setId
(
audit1
.
getRefItemId
());
// user.setStatus("2");
user
.
setAuditStatus
(
audit
.
getStatus
());
// }
if
(
AuditStatusEnum
.
APPROVED_FINAL
.
name
().
equals
(
audit
.
getStatus
()))
{
// userService.updateById(user);
user
.
setStatus
(
AuditOperationEnum
.
DISABLE
.
name
());
// }
}
// flag = auditService.updateById(audit);
userService
.
updateById
(
user
);
// if (!flag) {
}
// return getFailResult();
flag
=
auditService
.
updateById
(
audit
);
// }
if
(!
flag
)
{
// return getSuccessResult();
return
getFailResult
();
// } catch (Exception e) {
}
// e.printStackTrace();
return
getSuccessResult
();
// }
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
getFailResult
();
return
getFailResult
();
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TBoxOperationController.java
View file @
9681ddef
...
@@ -66,6 +66,7 @@ public class TBoxOperationController extends BaseController {
...
@@ -66,6 +66,7 @@ public class TBoxOperationController extends BaseController {
@RequiresPermissions
(
"/boxOperation/selectPageList"
)
@RequiresPermissions
(
"/boxOperation/selectPageList"
)
@ApiOperation
(
value
=
"获取机顶盒基础信息分页列表"
,
notes
=
"获取机顶盒基础信息分页列表"
)
@ApiOperation
(
value
=
"获取机顶盒基础信息分页列表"
,
notes
=
"获取机顶盒基础信息分页列表"
)
public
Map
<
String
,
Object
>
selectPageList
(
String
organId
,
String
areaId
)
{
public
Map
<
String
,
Object
>
selectPageList
(
String
organId
,
String
areaId
)
{
TUser
user1
=
getcurUser
();
TUser
user
=
new
TUser
();
TUser
user
=
new
TUser
();
if
(
StringUtils
.
isNotBlank
(
organId
))
{
if
(
StringUtils
.
isNotBlank
(
organId
))
{
user
.
setOrgId
(
organId
);
user
.
setOrgId
(
organId
);
...
@@ -73,6 +74,7 @@ public class TBoxOperationController extends BaseController {
...
@@ -73,6 +74,7 @@ public class TBoxOperationController extends BaseController {
if
(
StringUtils
.
isNotBlank
(
areaId
))
{
if
(
StringUtils
.
isNotBlank
(
areaId
))
{
user
.
setAreaId
(
areaId
);
user
.
setAreaId
(
areaId
);
}
}
user
.
setOrgCode
(
user1
.
getOrgCode
());
Page
<
TBoxOperation
>
page
=
null
;
Page
<
TBoxOperation
>
page
=
null
;
try
{
try
{
page
=
tBoxOperationService
.
selectBoxPage
(
getPage
(),
user
);
page
=
tBoxOperationService
.
selectBoxPage
(
getPage
(),
user
);
...
@@ -149,10 +151,10 @@ public class TBoxOperationController extends BaseController {
...
@@ -149,10 +151,10 @@ public class TBoxOperationController extends BaseController {
@GetMapping
(
"/getList"
)
@GetMapping
(
"/getList"
)
@RequiresPermissions
(
"/boxOperation/getList"
)
@RequiresPermissions
(
"/boxOperation/getList"
)
@ApiOperation
(
value
=
"获取机顶盒运维信息全部列表(无分页)"
,
notes
=
"获取机顶盒运维信息全部列表(无分页)"
)
@ApiOperation
(
value
=
"获取机顶盒运维信息全部列表(无分页)"
,
notes
=
"获取机顶盒运维信息全部列表(无分页)"
)
public
Map
<
String
,
Object
>
getTBoxOperationList
()
{
public
Map
<
String
,
Object
>
getTBoxOperationList
(
String
status
)
{
List
<
TBoxOperation
>
tBoxOperationList
=
null
;
List
<
TBoxOperation
>
tBoxOperationList
=
null
;
try
{
try
{
tBoxOperationList
=
tBoxOperationService
.
getList
();
tBoxOperationList
=
tBoxOperationService
.
getList
(
status
);
return
getResult
(
tBoxOperationList
);
return
getResult
(
tBoxOperationList
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TUserController.java
View file @
9681ddef
...
@@ -108,7 +108,7 @@ public class TUserController extends BaseController {
...
@@ -108,7 +108,7 @@ public class TUserController extends BaseController {
user
.
setAreaId
(
areaId
);
user
.
setAreaId
(
areaId
);
}
}
if
(
StringUtils
.
isNotBlank
(
status
))
{
if
(
StringUtils
.
isNotBlank
(
status
))
{
if
(
"1"
.
equals
(
status
)
||
"2"
.
equals
(
status
))
{
if
(
AuditOperationEnum
.
UNABLE
.
name
().
equals
(
status
)||
AuditOperationEnum
.
DISABLE
.
name
()
.
equals
(
status
))
{
user
.
setStatus
(
status
);
user
.
setStatus
(
status
);
}
else
{
}
else
{
user
.
setAuditStatus
(
status
);
user
.
setAuditStatus
(
status
);
...
@@ -143,7 +143,7 @@ public class TUserController extends BaseController {
...
@@ -143,7 +143,7 @@ public class TUserController extends BaseController {
user
.
setAuditStatus
(
auditStatus
);
user
.
setAuditStatus
(
auditStatus
);
}
}
if
(
StringUtils
.
isNotBlank
(
status
))
{
if
(
StringUtils
.
isNotBlank
(
status
))
{
if
(
"1"
.
equals
(
status
)
||
"2"
.
equals
(
status
))
{
if
(
AuditOperationEnum
.
UNABLE
.
name
().
equals
(
status
)||
AuditOperationEnum
.
DISABLE
.
name
()
.
equals
(
status
))
{
user
.
setStatus
(
status
);
user
.
setStatus
(
status
);
}
else
{
}
else
{
user
.
setAuditStatus
(
status
);
user
.
setAuditStatus
(
status
);
...
@@ -395,9 +395,8 @@ public class TUserController extends BaseController {
...
@@ -395,9 +395,8 @@ public class TUserController extends BaseController {
TUser
entity
=
new
TUser
();
TUser
entity
=
new
TUser
();
entity
.
setId
(
userId
);
entity
.
setId
(
userId
);
//提交禁用审核,没有真正禁用
//提交禁用审核,没有真正禁用
entity
.
setAuditStatus
(
"1"
);
String
code
=
AuditStatusEnum
.
TBC
.
name
();
Integer
code
=
AuditStatusEnum
.
TBC
.
getCode
();
entity
.
setAuditStatus
(
code
);
entity
.
setAuditStatus
(
code
.
toString
());
entity
.
setUpdateTime
(
DateUtil80
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
entity
.
setUpdateTime
(
DateUtil80
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
//添加到审核记录表
//添加到审核记录表
...
@@ -411,6 +410,7 @@ public class TUserController extends BaseController {
...
@@ -411,6 +410,7 @@ public class TUserController extends BaseController {
audit
.
setOperation
(
AuditOperationEnum
.
DISABLE
.
name
());
audit
.
setOperation
(
AuditOperationEnum
.
DISABLE
.
name
());
audit
.
setStatus
(
AuditStatusEnum
.
TBC
.
name
());
audit
.
setStatus
(
AuditStatusEnum
.
TBC
.
name
());
audit
.
setIsDeleted
(
false
);
audit
.
setIsDeleted
(
false
);
audit
.
setLevel
(
AuditStatusEnum
.
TBC
.
name
());
audit
.
setCreateTime
(
LocalDateTime
.
now
());
audit
.
setCreateTime
(
LocalDateTime
.
now
());
auditService
.
save
(
audit
);
auditService
.
save
(
audit
);
...
@@ -434,35 +434,35 @@ public class TUserController extends BaseController {
...
@@ -434,35 +434,35 @@ public class TUserController extends BaseController {
}
}
return
ResponseEntity
.
status
(
HttpStatus
.
INTERNAL_SERVER_ERROR
).
body
(
null
);
return
ResponseEntity
.
status
(
HttpStatus
.
INTERNAL_SERVER_ERROR
).
body
(
null
);
}
}
//
@PutMapping
(
"/updateAuditStatus"
)
//
@PutMapping("/updateAuditStatus")
@RequiresPermissions
(
"/user/updateAuditStatus"
)
//
@RequiresPermissions("/user/updateAuditStatus")
@ApiOperation
(
value
=
"更新用户审核状态"
,
notes
=
"更新用户审核状态"
)
//
@ApiOperation(value = "更新用户审核状态", notes = "更新用户审核状态")
@ApiImplicitParams
(
value
=
{
//
@ApiImplicitParams(value = {
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
dataType
=
"String"
,
paramType
=
"path"
),
//
@ApiImplicitParam(name = "id", value = "标识ID", dataType = "String", paramType = "path"),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态"
,
paramType
=
"query"
,
dataType
=
"String"
)
//
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataType = "String")
})
//
})
@MethodLog
(
operModule
=
OperModule
.
USER
,
operType
=
OperType
.
UPDATE
)
//
@MethodLog(operModule = OperModule.USER, operType = OperType.UPDATE)
public
Map
<
String
,
Object
>
updateStatus
(
@NotNull
(
message
=
"机构用户不能为空"
)
@PathVariable
(
"id"
)
String
id
,
@RequestParam
(
"status"
)
AuditStatusEnum
status
)
{
//
public Map<String, Object> updateStatus(@NotNull(message = "机构用户不能为空") @PathVariable("id") String id, @RequestParam("status") AuditStatusEnum status) {
boolean
flag
=
false
;
//
boolean flag = false;
try
{
//
try {
TUser
user
=
new
TUser
();
//
TUser user = new TUser();
user
.
setId
(
id
);
//
user.setId(id);
user
.
setAuditStatus
(
status
.
getCode
().
toString
());
//
user.setAuditStatus(status.getCode().toString());
//当禁用审核通过后,真正禁用
//
//当禁用审核通过后,真正禁用
if
(
"4"
.
equals
(
status
.
getCode
().
toString
()))
{
//
if ("4".equals(status.getCode().toString())) {
user
.
setStatus
(
"2"
);
//
user.setStatus("2");
}
//
}
flag
=
userService
.
updateById
(
user
);
//
flag = userService.updateById(user);
if
(!
flag
)
{
//
if (!flag) {
return
getFailResult
();
//
return getFailResult();
}
//
}
return
getSuccessResult
();
//
return getSuccessResult();
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
//
}
return
getFailResult
();
//
return getFailResult();
}
//
}
@OperationLog
(
"启用成员"
)
@OperationLog
(
"启用成员"
)
@ApiOperation
(
value
=
"启用"
)
@ApiOperation
(
value
=
"启用"
)
...
@@ -475,7 +475,7 @@ public class TUserController extends BaseController {
...
@@ -475,7 +475,7 @@ public class TUserController extends BaseController {
TUser
entity
=
new
TUser
();
TUser
entity
=
new
TUser
();
entity
.
setId
(
userId
);
entity
.
setId
(
userId
);
entity
.
setStatus
(
"1"
);
entity
.
setStatus
(
AuditOperationEnum
.
UNABLE
.
name
()
);
entity
.
setUpdateTime
(
DateUtil80
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
entity
.
setUpdateTime
(
DateUtil80
.
getDateTimeOfTimestamp
(
System
.
currentTimeMillis
()));
boolean
ret
=
this
.
userService
.
updateById
(
entity
);
boolean
ret
=
this
.
userService
.
updateById
(
entity
);
if
(!
ret
)
{
if
(!
ret
)
{
...
...
src/main/resources/mapper/TBoxOperationMapper.xml
View file @
9681ddef
...
@@ -24,6 +24,10 @@
...
@@ -24,6 +24,10 @@
SELECT b.*,r.`name` organ_name
SELECT b.*,r.`name` organ_name
FROM t_box_operation b
FROM t_box_operation b
left join t_organ r on r.id = b.organ_id
left join t_organ r on r.id = b.organ_id
where 1=1
<if
test=
"status!= null and status != '' "
>
and b.status =#{status}
</if>
</select>
</select>
<select
id=
"selectBoxPage"
resultMap=
"BaseResultMap"
>
<select
id=
"selectBoxPage"
resultMap=
"BaseResultMap"
>
...
@@ -39,6 +43,9 @@ left join t_organ r on r.id = b.organ_id
...
@@ -39,6 +43,9 @@ left join t_organ r on r.id = b.organ_id
<if
test=
"user.areaId!= null and user.areaId != '' "
>
<if
test=
"user.areaId!= null and user.areaId != '' "
>
and b.area_id =#{user.areaId}
and b.area_id =#{user.areaId}
</if>
</if>
<if
test=
" ser.orgCode != null and user.orgCode != '' "
>
and o.code LIKE concat(#{user.orgCode}, '%')
</if>
and u.is_deleted = false
and u.is_deleted = false
and u.type = 3
and u.type = 3
order by b.create_time desc
order by b.create_time desc
...
...
src/main/resources/mapper/TUserMapper.xml
View file @
9681ddef
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
and u.status = #{user.status}
and u.status = #{user.status}
</if>
</if>
<if
test=
" user.auditStatus != null and user.auditStatus != '' "
>
<if
test=
" user.auditStatus != null and user.auditStatus != '' "
>
and
(u.audit_status = "1" or u.audit_status = "3")
and
u.audit_status LIKE "TBC%"
</if>
</if>
<if
test=
" user.type != null and user.type != '' "
>
<if
test=
" user.type != null and user.type != '' "
>
and u.type = #{user.type}
and u.type = #{user.type}
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
<if
test=
" user.orgId != null and user.orgId != '' "
>
<if
test=
" user.orgId != null and user.orgId != '' "
>
and u.org_id = #{user.orgId}
and u.org_id = #{user.orgId}
</if>
</if>
<if
test=
"
user.orgCode != null and user.orgCode != '' "
>
<if
test=
"user.orgCode != null and user.orgCode != '' "
>
and o.code LIKE concat(#{user.orgCode}, '%')
and o.code LIKE concat(#{user.orgCode}, '%')
</if>
</if>
<if
test=
" user.areaId != null and user.areaId != '' "
>
<if
test=
" user.areaId != null and user.areaId != '' "
>
...
...
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