|
|
@@ -8,10 +8,7 @@ import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.redis.RedisCacheT;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.company.domain.*;
|
|
|
-import com.fs.company.mapper.CompanyAiWorkflowExecLogMapper;
|
|
|
-import com.fs.company.mapper.CompanyAiWorkflowExecMapper;
|
|
|
-import com.fs.company.mapper.CompanyWxAccountMapper;
|
|
|
-import com.fs.company.mapper.CompanyWxClientMapper;
|
|
|
+import com.fs.company.mapper.*;
|
|
|
import com.fs.company.service.*;
|
|
|
import com.fs.company.service.impl.call.node.AiAddWxTaskNode;
|
|
|
import com.fs.enums.ExecutionStatusEnum;
|
|
|
@@ -101,6 +98,8 @@ public class CompanyWxServiceImpl extends ServiceImpl<CompanyWxAccountMapper, Co
|
|
|
@Autowired
|
|
|
private CompanyAiWorkflowExecLogMapper companyAiWorkflowExecLogMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ CompanyAiWorkflowServerMapper companyAiWorkflowServerMapper;
|
|
|
|
|
|
|
|
|
/**
|
|
|
@@ -256,7 +255,13 @@ public class CompanyWxServiceImpl extends ServiceImpl<CompanyWxAccountMapper, Co
|
|
|
if (addressId==null || addressId.isEmpty()){
|
|
|
return R.error("请先绑定地址");
|
|
|
}
|
|
|
- Long serverId = cidIpadServerService.selectQwIpadServerByAddressId(addressId);
|
|
|
+ Long cidServerId = companyUser.getCidServerId();
|
|
|
+ if ( cidServerId==null ){
|
|
|
+ return R.error("请先绑定cid服务");
|
|
|
+ }
|
|
|
+ CompanyAiWorkflowServer cidServer = companyAiWorkflowServerMapper.selectCompanyAiWorkflowServerById(companyUser.getCidServerId());
|
|
|
+
|
|
|
+ Long serverId = cidIpadServerService.selectQwIpadServerByAddressId(addressId,cidServer.getGroupNo());
|
|
|
if (serverId==null){
|
|
|
return R.error(501,"该地区服务器剩余数量不足");
|
|
|
}
|
|
|
@@ -264,7 +269,7 @@ public class CompanyWxServiceImpl extends ServiceImpl<CompanyWxAccountMapper, Co
|
|
|
account.setServerStatus(1);
|
|
|
updateById(account);
|
|
|
|
|
|
- cidIpadServerService.subtractServer(serverId);
|
|
|
+// cidIpadServerService.subtractServer(serverId);
|
|
|
CidIpadServerUser qwIpadServerUser = new CidIpadServerUser();
|
|
|
qwIpadServerUser.setCompanyUserId(companyUser.getUserId());
|
|
|
qwIpadServerUser.setCompanyId(companyUser.getCompanyId());
|
|
|
@@ -608,7 +613,7 @@ public class CompanyWxServiceImpl extends ServiceImpl<CompanyWxAccountMapper, Co
|
|
|
}
|
|
|
|
|
|
// 清除超时检测Key(回调成功了,不需要超时检测了)
|
|
|
- AiAddWxTaskNode.clearTimeoutKey(workflowInstanceId, wxClientId);
|
|
|
+// AiAddWxTaskNode.clearTimeoutKey(workflowInstanceId, wxClientId);
|
|
|
|
|
|
// 触发工作流继续执行
|
|
|
Map<String, Object> inputData = new HashMap<>();
|