Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit abdf6814
authored
Mar 09, 2022
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签到数据删除了历史数据
1 parent
eefbce7c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
src/main/java/com/subsidy/service/impl/SignInRecordServiceImpl.java
src/main/resources/mapper/CompanyDictMapper.xml
src/main/java/com/subsidy/service/impl/SignInRecordServiceImpl.java
View file @
abdf681
...
...
@@ -56,6 +56,9 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
//private RedisUtil redisUtil;
@Autowired
private
SignInRecordMapper
signInRecordMapper
;
@Autowired
private
ClassDictMapper
classDictMapper
;
@Autowired
...
...
@@ -86,11 +89,6 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
//}
//redisUtil.set(RedisPrefixConstant.SUBSIDY_SIGN_INFO_PREFIX + signInRecordDO.getMemberId() + ":classId:" + classDictDO.getId() + ":" + DateFormatUtil.format(new Date(), "yyyy-MM-dd") + ":" + System.currentTimeMillis(), null);
this
.
baseMapper
.
delete
(
new
QueryWrapper
<
SignInRecordDO
>()
.
lambda
()
.
eq
(
SignInRecordDO:
:
getMemberId
,
signInRecordDO
.
getMemberId
())
.
gt
(
SignInRecordDO:
:
getSignInDate
,
LocalDate
.
now
()));
// 存储到缓存到同时保存到数据库
SignInRecordDO
sign
=
this
.
baseMapper
.
selectOne
(
new
QueryWrapper
<
SignInRecordDO
>()
.
lambda
()
...
...
@@ -135,7 +133,7 @@ public class SignInRecordServiceImpl extends ServiceImpl<SignInRecordMapper, Sig
for
(
ClassMemberMappingDO
classMemberMappingDO
:
classMemberMappingDOS
)
{
//签到
Integer
signCount
=
this
.
base
Mapper
.
selectCount
(
new
QueryWrapper
<
SignInRecordDO
>()
Integer
signCount
=
signInRecord
Mapper
.
selectCount
(
new
QueryWrapper
<
SignInRecordDO
>()
.
lambda
()
.
eq
(
SignInRecordDO:
:
getMemberId
,
classMemberMappingDO
.
getMemberId
())
.
eq
(
SignInRecordDO:
:
getClassId
,
dataViewVO
.
getClassId
()));
...
...
src/main/resources/mapper/CompanyDictMapper.xml
View file @
abdf681
...
...
@@ -42,10 +42,10 @@
and t2.delete_date is null
and t3.delete_date is null
<if
test=
"role == 1"
>
(and t4.rol
e
= 1 or t4.role_id = 3)
(and t4.rol
_id
= 1 or t4.role_id = 3)
</if>
<if
test=
"role == 2"
>
(and t4.role = 2)
(and t4.role
_id
= 2)
</if>
<if
test=
"id != null and id != ''"
>
and t2.id = #{id}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment