|
@@ -28,7 +28,7 @@ public class AidingStudentsImportListRedisDAO {
|
|
|
|
|
|
|
|
|
|
public AidingStudentsImportExcelListDO get(String uniId,String studentCode) {
|
|
public AidingStudentsImportExcelListDO get(String uniId,String studentCode) {
|
|
- String redisKey = formatKey(uniId,studentCode);
|
|
|
|
|
|
+ String redisKey = formatKey(studentCode);
|
|
return JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(redisKey), AidingStudentsImportExcelListDO.class);
|
|
return JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(redisKey), AidingStudentsImportExcelListDO.class);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -75,22 +75,30 @@ public class AidingStudentsImportListRedisDAO {
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
- public void setWithredisUUID(String redisUUID,AidingStudentsImportExcelListDO aidingStudentsImportExcelListDO) {
|
|
|
|
|
|
+/* public void setWithredisUUID(String redisUUID,AidingStudentsImportExcelListDO aidingStudentsImportExcelListDO) {
|
|
String redisKey = formatKey(redisUUID,aidingStudentsImportExcelListDO.getStudentCode());
|
|
String redisKey = formatKey(redisUUID,aidingStudentsImportExcelListDO.getStudentCode());
|
|
// 清理多余字段,避免缓存
|
|
// 清理多余字段,避免缓存
|
|
aidingStudentsImportExcelListDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null);
|
|
aidingStudentsImportExcelListDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null);
|
|
|
|
|
|
stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(aidingStudentsImportExcelListDO), 60*60*24, TimeUnit.SECONDS);
|
|
stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(aidingStudentsImportExcelListDO), 60*60*24, TimeUnit.SECONDS);
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
+public void setWithredisUUID(AidingStudentsImportExcelListDO aidingStudentsImportExcelListDO) {
|
|
|
|
+ String redisKey = formatKey(aidingStudentsImportExcelListDO.getStudentCode());
|
|
|
|
+ // 清理多余字段,避免缓存
|
|
|
|
+ aidingStudentsImportExcelListDO.setUpdater(null).setUpdateTime(null).setCreateTime(null).setCreator(null).setDeleted(null);
|
|
|
|
+
|
|
|
|
+ stringRedisTemplate.opsForValue().set(redisKey, JsonUtils.toJsonString(aidingStudentsImportExcelListDO), 60*60*24, TimeUnit.SECONDS);
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- public void delete(String uniId,String studentCode) {
|
|
|
|
- String redisKey = formatKey(uniId,studentCode);
|
|
|
|
|
|
+ public void delete(String studentCode) {
|
|
|
|
+ String redisKey = formatKey(studentCode);
|
|
stringRedisTemplate.delete(redisKey);
|
|
stringRedisTemplate.delete(redisKey);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -105,7 +113,10 @@ public class AidingStudentsImportListRedisDAO {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- private static String formatKey(String uniId,String studentCode) {
|
|
|
|
|
|
+ /*private static String formatKey(String uniId,String studentCode) {
|
|
return String.format(AIDING_STUDENTS_IMPORT_LIST_KEY, uniId,studentCode);
|
|
return String.format(AIDING_STUDENTS_IMPORT_LIST_KEY, uniId,studentCode);
|
|
|
|
+ }*/
|
|
|
|
+ private static String formatKey(String studentCode) {
|
|
|
|
+ return String.format(AIDING_STUDENTS_IMPORT_LIST_KEY, studentCode);
|
|
}
|
|
}
|
|
}
|
|
}
|