liusheng
2025-02-17 1a773eb0a62ac5d0b43408f2db5ad2a80538f5ba
往队列新增是,判断是往头部新增还是往尾部新增
已修改6个文件
113 ■■■■■ 文件已修改
.idea/workspace.xml 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.idea/workspace.xml
@@ -5,28 +5,12 @@
  </component>
  <component name="ChangeListManager">
    <list default="true" id="d7325e97-ef1a-4946-a53e-fea72f2992f8" name="Changes" comment="代码提交">
      <change afterPath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskdeptController.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/utils/OkHttpExample.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/common/LyraTokenUtil.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/BingRenXX.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ExternalTaskInfo.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/QuerUserinfo.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceQueryFocus.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceQueryInfo.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceTaskInfo.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/ServiceTaskdept.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/XiaoXiTou.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/YeWuXX.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/domain/YongHuXX.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/ServiceTaskdeptMapper.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/SysTaskMapper.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/mapper/SysUserDeptMapper.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/IServiceTaskdeptService.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceTaskdeptServiceImpl.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/resources/mapper/smartor/ServiceTaskdeptMapper.xml" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -83,7 +67,7 @@
    <property name="ToolWindow问题.ShowToolbar" value="false" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="aspect.path.notification.shown" value="true" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/../smartor" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/../smartor-wuxi" />
    <property name="node.js.detected.package.eslint" value="true" />
    <property name="node.js.detected.package.tslint" value="true" />
    <property name="node.js.path.for.package.eslint" value="project" />
@@ -142,6 +126,14 @@
          <option name="password" value="Smartor" />
          <option name="port" value="6020" />
          <option name="url" value="192.168.191.181" />
        </ConnectionInfo>
        <ConnectionInfo>
          <option name="global" value="false" />
          <option name="id" value="58aa81a0-3273-4f33-8973-55a6deb8702e" />
          <option name="name" value="116.62.18.175" />
          <option name="password" value="Smartor" />
          <option name="port" value="6020" />
          <option name="url" value="116.62.18.175" />
        </ConnectionInfo>
      </list>
    </option>
@@ -339,6 +331,8 @@
      <workItem from="1739323404849" duration="23795000" />
      <workItem from="1739411538383" duration="21710000" />
      <workItem from="1739501318573" duration="2373000" />
      <workItem from="1739507523684" duration="15221000" />
      <workItem from="1739766088739" duration="469000" />
    </task>
    <task id="LOCAL-00001" summary="代码提交">
      <created>1730948127775</created>
@@ -646,48 +640,73 @@
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>522</line>
          <line>523</line>
          <option name="timeStamp" value="383" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>661</line>
          <line>662</line>
          <option name="timeStamp" value="384" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>633</line>
          <line>634</line>
          <option name="timeStamp" value="385" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1965</line>
          <line>1983</line>
          <option name="timeStamp" value="386" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1961</line>
          <line>1979</line>
          <option name="timeStamp" value="387" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java</url>
          <line>249</line>
          <option name="timeStamp" value="390" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java</url>
          <line>248</line>
          <option name="timeStamp" value="393" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java</url>
          <line>107</line>
          <option name="timeStamp" value="395" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>298</line>
          <option name="timeStamp" value="404" />
        </line-breakpoint>
        <line-breakpoint type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>313</line>
          <option name="timeStamp" value="405" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java</url>
          <line>255</line>
          <option name="timeStamp" value="412" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
          <url>file://$PROJECT_DIR$/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java</url>
          <line>205</line>
          <option name="timeStamp" value="415" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1447</line>
          <option name="timeStamp" value="397" />
          <line>1440</line>
          <option name="timeStamp" value="416" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-line">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java</url>
          <line>1489</line>
          <option name="timeStamp" value="417" />
        </line-breakpoint>
        <line-breakpoint enabled="true" type="java-method">
          <url>file://$PROJECT_DIR$/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java</url>
ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
@@ -211,7 +211,7 @@
                                    list.add(serviceSubtask2.getId().toString());
                                }
                                log.error("缓存中cache-0的值为:{}", list);
                                redisCache.setCacheList("cache-0", list);
                                redisCache.setCacheListLeft("cache-0", list);
                            } else {
                                //非立即发送
                                ServiceSubtaskVO serviceSubtask1 = new ServiceSubtaskVO();
@@ -221,7 +221,7 @@
                                for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) {
                                    list.add(serviceSubtask2.getId().toString());
                                }
                                redisCache.setCacheList(key, list);
                                redisCache.setCacheListLeft(key, list);
                            }
                        } catch (Exception exception) {
                            ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord();
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
@@ -124,12 +124,24 @@
     * @param dataList 待缓存的List数据
     * @return 缓存的对象
     */
    public <T> long setCacheList(final String key, final List<T> dataList) {
    public <T> long setCacheListRight(final String key, final List<T> dataList) {
        Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
        return count == null ? 0 : count;
    }
    /**
     * 缓存List数据
     *
     * @param key      缓存的键值
     * @param dataList 待缓存的List数据(这里如果新增的话,是往头部新增)
     * @return 缓存的对象
     */
    public <T> long setCacheListLeft(final String key, final List<T> dataList) {
        Long count = redisTemplate.opsForList().leftPushAll(key, dataList);
        return count == null ? 0 : count;
    }
    /**
     * 获得缓存的list对象
     *
     * @param key 缓存的键值
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -344,7 +344,7 @@
                    }
                    //将要执行的放到缓存中
                    if (list.size() > 0) {
                        redisCache.setCacheList("cache-0", list);
                        redisCache.setCacheListLeft("cache-0", list);
                    }
                } else if (descByCode.equals("多媒体")) {
                    //多媒体
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
@@ -276,7 +276,7 @@
            if (serviceSubTaskCacheReq.getType() != null && serviceSubTaskCacheReq.getType() == 2) {
                //问卷
                redisCache.deleteObject(pid + "-" + tid + "-WJscriptCache");
                redisCache.setCacheList(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyLibTemplateScriptVOS());
                redisCache.setCacheListRight(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyLibTemplateScriptVOS());
                //设置过期时间 3天
                Long tims = Long.valueOf(3 * 24 * 3600);
                boolean expire = redisCache.expire(pid + "-" + tid + "-WJscriptCache", tims);
@@ -284,7 +284,7 @@
            } else if (serviceSubTaskCacheReq.getType() != null && serviceSubTaskCacheReq.getType() == 1) {
                //问卷
                redisCache.deleteObject(pid + "-" + tid + "-SFscriptCache");
                redisCache.setCacheList(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrLibaTemplateScriptVOList());
                redisCache.setCacheListRight(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrLibaTemplateScriptVOList());
                //设置过期时间 3天
                Long tims = Long.valueOf(3 * 24 * 3600);
                redisCache.expire(pid + "-" + tid + "-SFscriptCache", tims);
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -1487,7 +1487,7 @@
                pullTaskVO.setAsrcallback(ASRCallBackPath);
            }
        }
        if (existList.size() != 0) redisCache.setCacheList("cache-exist", existList);
        if (existList.size() != 0) redisCache.setCacheListRight("cache-exist", existList);
        log.error("-----------实际拉取的电话数据量:{}", pullTaskVOList.size());
        return pullTaskVOList;
    }
@@ -1541,7 +1541,7 @@
                redisCache.setCacheObject(subId.trim() + "-" + serviceSubtask.getPhone().trim(), ivrTaskTemplateScript.getId().toString(), 120, TimeUnit.MINUTES);
            } else {
                newValue0.add(subIds.get(i));
                redisCache.setCacheList(cacheName, newValue0);
                redisCache.setCacheListRight(cacheName, newValue0);
            }
        }