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
e2264a09
Commit
e2264a09
authored
May 21, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
赋码说明相关
parent
82df05e8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
207 additions
and
0 deletions
+207
-0
UserCheckStatusDto.java
...join/amos/boot/module/tzs/api/dto/UserCheckStatusDto.java
+24
-0
UserCheckStatus.java
...join/amos/boot/module/tzs/api/entity/UserCheckStatus.java
+36
-0
UserCheckStatusMapper.java
...mos/boot/module/tzs/api/mapper/UserCheckStatusMapper.java
+9
-0
IUserCheckStatusService.java
.../boot/module/tzs/api/service/IUserCheckStatusService.java
+14
-0
UserCheckStatusController.java
.../module/tzs/biz/controller/UserCheckStatusController.java
+66
-0
UserCheckStatusServiceImpl.java
...dule/tzs/biz/service/impl/UserCheckStatusServiceImpl.java
+58
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/UserCheckStatusDto.java
0 → 100644
View file @
e2264a09
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
@Data
@ApiModel
(
value
=
"UserCheckStatusDto"
,
description
=
"用户是否点击下次不在提示"
)
public
class
UserCheckStatusDto
{
/**
* 用户名
*/
@TableField
(
"user_name"
)
private
String
userName
;
/**
* 是否勾选下次不在提示
*/
@TableField
(
"status"
)
private
String
status
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/entity/UserCheckStatus.java
0 → 100644
View file @
e2264a09
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
/**
* 装备分类
*
* @author system_generator
* @date 2021-10-20
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"biz_user_check_status"
)
public
class
UserCheckStatus
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 用户名
*/
@TableField
(
"use_name"
)
private
String
useName
;
/**
* 是否勾选下次不在提示
*/
@TableField
(
"status"
)
private
String
status
;
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/mapper/UserCheckStatusMapper.java
0 → 100644
View file @
e2264a09
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus
;
public
interface
UserCheckStatusMapper
extends
BaseMapper
<
UserCheckStatus
>
{
}
amos-boot-system-tzs/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/service/IUserCheckStatusService.java
0 → 100644
View file @
e2264a09
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
service
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus
;
/**
* 首页弹窗相关
*/
public
interface
IUserCheckStatusService
{
UserCheckStatus
getUserCheckStatus
(
String
useName
);
UserCheckStatus
updateUserCheckStatus
(
String
useName
,
String
status
);
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/UserCheckStatusController.java
0 → 100644
View file @
e2264a09
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IUserCheckStatusService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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
=
"首页弹窗提示"
)
@RequestMapping
(
value
=
"/user-check"
)
public
class
UserCheckStatusController
extends
BaseController
{
@Autowired
IUserCheckStatusService
userCheckStatusService
;
@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
;
}
String
useName
=
reginParams
.
getUserModel
().
getUserName
();
return
ResponseHelper
.
buildResponse
(
userCheckStatusService
.
getUserCheckStatus
(
useName
));
}
@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
));
}
}
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/UserCheckStatusServiceImpl.java
0 → 100644
View file @
e2264a09
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.UserCheckStatusDto
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.UserCheckStatus
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.UserCheckStatusMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IUserCheckStatusService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
/**
* 装备分类服务实现类
*
* @author system_generator
* @date 2021-10-20
*/
@Service
@Slf4j
public
class
UserCheckStatusServiceImpl
extends
BaseService
<
UserCheckStatusDto
,
UserCheckStatus
,
UserCheckStatusMapper
>
implements
IUserCheckStatusService
{
@Autowired
UserCheckStatusMapper
userCheckStatusMapper
;
@Override
public
UserCheckStatus
getUserCheckStatus
(
String
useName
)
{
UserCheckStatus
userCheckStatus
=
userCheckStatusMapper
.
selectOne
(
new
QueryWrapper
<
UserCheckStatus
>().
eq
(
"use_name"
,
useName
));
if
(
ObjectUtils
.
isEmpty
(
userCheckStatus
))
{
UserCheckStatus
checkStatus
=
new
UserCheckStatus
();
checkStatus
.
setUseName
(
useName
);
checkStatus
.
setStatus
(
"0"
);
int
result
=
userCheckStatusMapper
.
insert
(
checkStatus
);
if
(
result
==
1
)
{
return
userCheckStatus
;
}
else
{
return
null
;
}
}
return
userCheckStatus
;
}
@Override
public
UserCheckStatus
updateUserCheckStatus
(
String
useName
,
String
status
)
{
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"
,
useName
));
if
(
result
==
1
)
{
return
checkStatus
;
}
}
return
null
;
}
}
\ No newline at end of file
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