Commit abdf6814 by 涂亚平

签到数据删除了历史数据

1 parent eefbce7c
......@@ -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.baseMapper.selectCount(new QueryWrapper<SignInRecordDO>()
Integer signCount = signInRecordMapper.selectCount(new QueryWrapper<SignInRecordDO>()
.lambda()
.eq(SignInRecordDO::getMemberId, classMemberMappingDO.getMemberId())
.eq(SignInRecordDO::getClassId, dataViewVO.getClassId()));
......
......@@ -42,10 +42,10 @@
and t2.delete_date is null
and t3.delete_date is null
<if test="role == 1">
(and t4.role = 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}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!