From afb277a81e060c6275f11e9f9f102b5dcfd80a72 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 27 六月 2024 09:46:05 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java |   44 ++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java
index 82885bf..4ec3a5e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrTaskController.java
@@ -1,5 +1,6 @@
 package com.ruoyi.web.controller.smartor;
 
+import com.github.pagehelper.ISelect;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -7,16 +8,17 @@
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.DtoConversionUtils;
 import com.ruoyi.common.utils.PageUtils;
+import com.ruoyi.common.utils.RSAPublicKeyExample;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.IvrTask;
-import com.smartor.domain.IvrTaskVO;
-import com.smartor.domain.IvrTaskSingle;
+import com.smartor.domain.*;
 import com.smartor.service.IIvrTaskService;
 import com.smartor.service.IIvrTaskSingleService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
@@ -30,6 +32,7 @@
  * @author smartor
  * @date 2023-03-24
  */
+@Slf4j
 @Api(description = "闅忚浠诲姟")
 @RestController
 @RequestMapping("/smartor/ivrtask")
@@ -39,6 +42,12 @@
 
     @Autowired
     private IIvrTaskSingleService iIvrTaskCallService;
+
+    @Value("${pub_key}")
+    private String pub_key;
+
+    @Value("${pri_key}")
+    private String pri_key;
 
     /**
      * 鏌ヨ璇煶浠诲姟鍒楄〃
@@ -50,6 +59,7 @@
         PageUtils.startPageByPost(ivrTask.getPageNum(), ivrTask.getPageSize());
         List<IvrTask> list = ivrTaskService.selectIvrTaskList(ivrTask);
         List<IvrTaskVO> ivrTaskVOS = DtoConversionUtils.sourceToTarget(list, IvrTaskVO.class);
+
         if (CollectionUtils.isNotEmpty(ivrTaskVOS)) {
             for (IvrTaskVO ivrTaskVO : ivrTaskVOS) {
                 IvrTaskSingle ivrTaskcall = new IvrTaskSingle();
@@ -64,8 +74,20 @@
                     ivrTaskVO.setWfs(wfs);
                 }
             }
+            //鑾峰彇total
+            long total = PageUtils.count(new ISelect() {
+                @Override
+                public void doSelect() {
+                    ivrTask.setPageNum(null);
+                    ivrTask.setPageSize(null);
+                    ivrTaskService.selectIvrTaskList(ivrTask);
+                }
+            });
+
+            return getDataTable2(total, ivrTaskVOS);
         }
-        return getDataTable(ivrTaskVOS);
+
+        return getDataTable2(0, ivrTaskVOS);
     }
 
     /**
@@ -136,5 +158,19 @@
         return toAjax(ivrTaskService.deleteIvrTaskByTaskid(taskId));
     }
 
+    /**
+     * 閫氳繃浠诲姟ID鍜屾偅鑰匢D鑾峰彇鍗曚釜浜虹殑棰樼洰淇℃伅
+     *
+     * @return
+     */
+    @ApiOperation("閫氳繃浠诲姟ID鍜屾偅鑰匢D鑾峰彇鍗曚釜浜虹殑棰樼洰淇℃伅")
+    @PostMapping("/getScriptInfoByCondition")
+    public TableDataInfo getScriptInfoByCondition(@RequestBody IvrTaskScriptQues ivrTaskScriptQues) {
+        RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
+        Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(ivrTaskScriptQues.getParam1(), pri_key));
+        Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(ivrTaskScriptQues.getParam2(), pri_key));
+        log.info("tid鍜宲id鐨勫�间负锛歿},{}", tid, pid);
+        return getDataTable(ivrTaskService.getScriptInfoByCondition(tid, pid));
+    }
 
 }

--
Gitblit v1.9.3