luodangjia
2025-01-14 f6bd8d2355a37d3fd72f23494db4661f3983b32c
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
@@ -15,6 +15,7 @@
import com.ruoyi.other.mapper.TechnicianSubscribeMapper;
import com.ruoyi.other.service.TechnicianSubscribeService;
import com.ruoyi.other.vo.TechnicianSubscribeVO;
import org.springframework.data.redis.connection.RedisZSetCommands;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
@@ -101,7 +102,8 @@
     */
    @Override
    public void taskEditStstus() {
        Set<String> technician_subscribe = redisTemplate.opsForZSet().range("technician_subscribe", 0, LocalDateTime.now().toEpochSecond(ZoneOffset.UTC));
        long second = LocalDateTime.now().toEpochSecond(ZoneOffset.UTC);
        Set<String> technician_subscribe = redisTemplate.opsForZSet().rangeByScore("technician_subscribe", 0, second);
        if(technician_subscribe.size() > 0){
            List<TechnicianSubscribe> list = this.listByIds(technician_subscribe);
            list.forEach(s->s.setStatus(3));