|
@@ -13,6 +13,7 @@ import com.ruoyi.aicall.service.ICcCallTaskService;
|
|
|
import com.ruoyi.aicall.service.ICcLlmAgentAccountService;
|
|
import com.ruoyi.aicall.service.ICcLlmAgentAccountService;
|
|
|
import com.ruoyi.aicall.service.ICcTtsAliyunService;
|
|
import com.ruoyi.aicall.service.ICcTtsAliyunService;
|
|
|
import com.ruoyi.aicall.utils.ClientIpCheck;
|
|
import com.ruoyi.aicall.utils.ClientIpCheck;
|
|
|
|
|
+import com.ruoyi.aicall.utils.DESUtil;
|
|
|
import com.ruoyi.cc.domain.*;
|
|
import com.ruoyi.cc.domain.*;
|
|
|
import com.ruoyi.cc.service.*;
|
|
import com.ruoyi.cc.service.*;
|
|
|
import com.ruoyi.cc.utils.DateValidatorUtils;
|
|
import com.ruoyi.cc.utils.DateValidatorUtils;
|
|
@@ -1023,13 +1024,20 @@ public class ApiController extends BaseController {
|
|
|
|
|
|
|
|
String extnum = ccExtNum.getExtNum().toString();
|
|
String extnum = ccExtNum.getExtNum().toString();
|
|
|
String opnum = ccExtNum.getUserCode();
|
|
String opnum = ccExtNum.getUserCode();
|
|
|
|
|
+ String password = ccExtNum.getExtPass();
|
|
|
String groupId = "1";
|
|
String groupId = "1";
|
|
|
String skillLevel = "9";
|
|
String skillLevel = "9";
|
|
|
String projectId = "1";
|
|
String projectId = "1";
|
|
|
|
|
+ //1.创建token
|
|
|
String loginToken = ccExtNumService.createToken(extnum, opnum, groupId, skillLevel, projectId);
|
|
String loginToken = ccExtNumService.createToken(extnum, opnum, groupId, skillLevel, projectId);
|
|
|
|
|
+ //2.获取加密密码
|
|
|
|
|
+ String encryptStr = DESUtil.encrypt(password + "," + DateUtils.format(DateUtils.addDays(new Date(), 1), "yyyyMMddHHmm"));
|
|
|
|
|
+ encryptStr = String.format("var _phoneEncryptPassword='%s';", encryptStr);
|
|
|
|
|
+
|
|
|
// 网关用途 0 dropped; 1 phonebar; 2 outbound tasks; 3. Unlimited
|
|
// 网关用途 0 dropped; 1 phonebar; 2 outbound tasks; 3. Unlimited
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("purposes", Arrays.asList(1,3));
|
|
params.put("purposes", Arrays.asList(1,3));
|
|
|
|
|
+ //3.获取工具条能用的所有网关列表
|
|
|
List<CcGateways> gatewaysList = ccGatewaysService.selectCcGatewaysList(new CcGateways().setParams(params));
|
|
List<CcGateways> gatewaysList = ccGatewaysService.selectCcGatewaysList(new CcGateways().setParams(params));
|
|
|
List<JSONObject> gatewayList = new ArrayList<>();
|
|
List<JSONObject> gatewayList = new ArrayList<>();
|
|
|
for (CcGateways ccGateways: gatewaysList) {
|
|
for (CcGateways ccGateways: gatewaysList) {
|
|
@@ -1055,6 +1063,7 @@ public class ApiController extends BaseController {
|
|
|
callConfig.put("scriptServer", scriptServer);
|
|
callConfig.put("scriptServer", scriptServer);
|
|
|
callConfig.put("scriptPort", scriptPort);
|
|
callConfig.put("scriptPort", scriptPort);
|
|
|
callConfig.put("loginToken", loginToken);
|
|
callConfig.put("loginToken", loginToken);
|
|
|
|
|
+ callConfig.put("encryptPsw", encryptStr);
|
|
|
callConfig.put("gatewayList", gatewayList);
|
|
callConfig.put("gatewayList", gatewayList);
|
|
|
|
|
|
|
|
return AjaxResult.success(callConfig);
|
|
return AjaxResult.success(callConfig);
|