|
@@ -30,6 +30,7 @@ import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
@@ -672,11 +673,11 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
|
|
|
|
|
|
String key = "updateCourseActualPrice";
|
|
|
|
|
|
- if(redisCache.exists(key)){
|
|
|
+ if(redisCache.getRedisTemplate().opsForValue().size(key)>0){
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- redisCache.expire(key, 7200);
|
|
|
+ redisCache.getRedisTemplate().opsForValue().setIfAbsent(key, Thread.currentThread().getId(), 1, TimeUnit.HOURS);
|
|
|
|
|
|
try {
|
|
|
List<CourseScheduleStudentPaymentDto> courseScheduleStudentPayments = courseScheduleStudentPaymentDao.findNeedUpdateActualPriceStudentCourses();
|