Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
03245a3f
Commit
03245a3f
authored
Oct 11, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹窗提示查询、修改扩展
parent
98f5b139
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
35 deletions
+44
-35
UserCheckStatus.java
...join/amos/boot/module/tcm/api/entity/UserCheckStatus.java
+6
-0
IUserCheckStatusService.java
.../boot/module/tcm/api/service/IUserCheckStatusService.java
+2
-2
UserCheckStatusController.java
.../module/tcm/biz/controller/UserCheckStatusController.java
+27
-27
UserCheckStatusServiceImpl.java
...dule/tcm/biz/service/impl/UserCheckStatusServiceImpl.java
+9
-6
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/entity/UserCheckStatus.java
View file @
03245a3f
...
...
@@ -32,5 +32,11 @@ public class UserCheckStatus extends BaseEntity {
@TableField
(
"status"
)
private
String
status
;
/**
* 说明类型
*/
@TableField
(
"type"
)
private
String
type
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/IUserCheckStatusService.java
View file @
03245a3f
...
...
@@ -9,7 +9,7 @@ import com.yeejoin.amos.boot.module.tcm.api.entity.UserCheckStatus;
*/
public
interface
IUserCheckStatusService
{
UserCheckStatus
getUserCheckStatus
(
ReginParams
reginParams
);
UserCheckStatus
getUserCheckStatus
(
ReginParams
reginParams
,
String
type
);
UserCheckStatus
updateUserCheckStatus
(
String
useName
,
String
status
);
UserCheckStatus
updateUserCheckStatus
(
String
useName
,
String
status
,
String
type
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/UserCheckStatusController.java
View file @
03245a3f
...
...
@@ -22,44 +22,44 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
/**
*
装备分类
*
弹窗实体
*
* @author system_generator
* @date 2021-10-20
*/
@RestController
@Api
(
tags
=
"
首页
弹窗提示"
)
@Api
(
tags
=
"弹窗提示"
)
@RequestMapping
(
value
=
"/user-check"
)
public
class
UserCheckStatusController
extends
BaseController
{
@Autowired
IUserCheckStatusService
userCheckStatusService
;
@Autowired
IUserCheckStatusService
userCheckStatusService
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
RedisUtils
redisUtils
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getUserCheckStatus"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户是否点击下次不在提示"
,
notes
=
"获取用户是否点击下次不在提示"
)
public
ResponseModel
<
UserCheckStatus
>
getUserCheckStatus
(
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
}
return
ResponseHelper
.
buildResponse
(
userCheckStatusService
.
getUserCheckStatus
(
reginParams
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getUserCheckStatus"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取用户是否点击下次不在提示"
,
notes
=
"获取用户是否点击下次不在提示"
)
public
ResponseModel
<
UserCheckStatus
>
getUserCheckStatus
(
@RequestParam
(
value
=
"type"
)
String
type
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
}
return
ResponseHelper
.
buildResponse
(
userCheckStatusService
.
getUserCheckStatus
(
reginParams
,
type
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateUserCheckStatus"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"更改用户选择状态"
,
notes
=
"更改用户选择状态"
)
public
ResponseModel
<
UserCheckStatus
>
updateUserCheckStatus
(
@RequestParam
(
value
=
"status"
)
String
status
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
}
String
useName
=
reginParams
.
getUserModel
().
getUserName
();
return
ResponseHelper
.
buildResponse
(
userCheckStatusService
.
updateUserCheckStatus
(
useName
,
status
));
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateUserCheckStatus"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"更改用户选择状态"
,
notes
=
"更改用户选择状态"
)
public
ResponseModel
<
UserCheckStatus
>
updateUserCheckStatus
(
@RequestParam
(
value
=
"status"
)
String
status
,
@RequestParam
(
value
=
"type"
)
String
type
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
ObjectUtils
.
isEmpty
(
reginParams
))
{
return
null
;
}
String
useName
=
reginParams
.
getUserModel
().
getUserName
();
return
ResponseHelper
.
buildResponse
(
userCheckStatusService
.
updateUserCheckStatus
(
useName
,
status
,
type
));
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/UserCheckStatusServiceImpl.java
View file @
03245a3f
...
...
@@ -31,10 +31,12 @@ public class UserCheckStatusServiceImpl extends BaseService<UserCheckStatusDto,
UserCheckStatusMapper
userCheckStatusMapper
;
//使用单位sequence_nbr
private
final
Long
USEUNITID
=
1460532889249755137L
;
private
final
Long
USE_UNIT_ID
=
1460532889249755137L
;
private
final
Long
PERSONAGE_ID
=
1697171841505849345L
;
@Override
public
UserCheckStatus
getUserCheckStatus
(
ReginParams
reginParams
)
{
public
UserCheckStatus
getUserCheckStatus
(
ReginParams
reginParams
,
String
type
)
{
UserCheckStatus
userCheckStatus
=
new
UserCheckStatus
();
userCheckStatus
.
setStatus
(
"1"
);
Map
<
Long
,
List
<
RoleModel
>>
orgRoles
=
reginParams
.
getUserModel
().
getOrgRoles
();
...
...
@@ -42,13 +44,14 @@ public class UserCheckStatusServiceImpl extends BaseService<UserCheckStatusDto,
Set
<
Long
>
longs
=
orgRoles
.
keySet
();
for
(
Long
aLong
:
longs
)
{
for
(
RoleModel
roleModel
:
orgRoles
.
get
(
aLong
))
{
if
(
USEUNITID
.
equals
(
roleModel
.
getSequenceNbr
()))
{
if
(
USE_UNIT_ID
.
equals
(
roleModel
.
getSequenceNbr
())
||
PERSONAGE_ID
.
equals
(
roleModel
.
getSequenceNbr
()))
{
String
useName
=
reginParams
.
getUserModel
().
getUserName
();
userCheckStatus
=
userCheckStatusMapper
.
selectOne
(
new
QueryWrapper
<
UserCheckStatus
>().
eq
(
"use_name"
,
useName
));
userCheckStatus
=
userCheckStatusMapper
.
selectOne
(
new
QueryWrapper
<
UserCheckStatus
>().
eq
(
"use_name"
,
useName
)
.
eq
(
"type"
,
type
)
);
if
(
ObjectUtils
.
isEmpty
(
userCheckStatus
))
{
UserCheckStatus
checkStatus
=
new
UserCheckStatus
();
checkStatus
.
setUseName
(
useName
);
checkStatus
.
setStatus
(
"0"
);
checkStatus
.
setType
(
type
);
int
result
=
userCheckStatusMapper
.
insert
(
checkStatus
);
if
(
result
==
1
)
{
return
checkStatus
;
...
...
@@ -64,12 +67,12 @@ public class UserCheckStatusServiceImpl extends BaseService<UserCheckStatusDto,
}
@Override
public
UserCheckStatus
updateUserCheckStatus
(
String
useName
,
String
status
)
{
public
UserCheckStatus
updateUserCheckStatus
(
String
useName
,
String
status
,
String
type
)
{
if
(!
ObjectUtils
.
isEmpty
(
useName
)){
UserCheckStatus
checkStatus
=
new
UserCheckStatus
();
checkStatus
.
setUseName
(
useName
);
checkStatus
.
setStatus
(
status
);
int
result
=
userCheckStatusMapper
.
update
(
checkStatus
,
new
QueryWrapper
<
UserCheckStatus
>().
eq
(
"use_name"
,
useNam
e
));
int
result
=
userCheckStatusMapper
.
update
(
checkStatus
,
new
QueryWrapper
<
UserCheckStatus
>().
eq
(
"use_name"
,
useName
).
eq
(
"type"
,
typ
e
));
if
(
result
==
1
)
{
return
checkStatus
;
}
...
...
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