| | |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.smartor.domain.OutboundConfigAddReqVO; |
| | | import com.smartor.domain.OutboundInstanceResVO; |
| | | import com.smartor.domain.PhoneCallBackSHVO; |
| | | import com.smartor.domain.PhoneCallReqYQVO; |
| | | import com.smartor.domain.PhoneCallResultYQVO; |
| | | import com.smartor.service.IServicePhoneService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | /** |
| | | * 三汇电话流程服务 Controller |
| | | * <p> |
| | | * ⚠️ 该前缀下的<b>电话流程端点</b>({@code /smartor/shphone/getFirstQues}、 |
| | | * {@code /smartor/shphone/processResust})已随电话模块化搬进 {@code ruoyi-phone} |
| | | * 的 {@code ShPhoneController}(URL 保持不变,三汇平台无需改回调地址)。 |
| | | * <p> |
| | | * 这里只留 {@code /smartor/shphone/addOutboundInstance}:它依赖 smartor 侧的外呼实例配置 |
| | | * ({@code IServicePhoneService}),属于"外呼实例开通"而非电话会话链路,不归电话模块。 |
| | | * |
| | | * @author ls |
| | | * @date 2026-08-26 |
| | |
| | | @RestController |
| | | @RequestMapping("/smartor/shphone") |
| | | public class ServicePhoneController extends BaseController { |
| | | @Autowired |
| | | private IServiceSubtaskService serviceSubtaskService; |
| | | |
| | | @Autowired |
| | | private IServicePhoneService iServicePhoneService; |
| | | |
| | | @ApiOperation("根据电话号码,获取首个问题") |
| | | @PostMapping("/getFirstQues") |
| | | public Map<String, Object> getFirstQues(@RequestBody PhoneCallReqYQVO phoneCallReqYQVO) { |
| | | log.info("根据电话号码,获取首个问题?{}", phoneCallReqYQVO); |
| | | PhoneCallBackSHVO phoneCallBackSHVO = serviceSubtaskService.getFirstQues(phoneCallReqYQVO); |
| | | return success(phoneCallBackSHVO); |
| | | } |
| | | |
| | | @ApiOperation("三汇 ASR 结果处理") |
| | | @PostMapping("/processResust") |
| | | public Map<String, Object> processResust(@RequestBody PhoneCallResultYQVO resultYQVO) { |
| | | log.info("三汇 ASR 结果处理 (三汇)?{}", resultYQVO); |
| | | PhoneCallBackSHVO phoneCallBackSHVO = serviceSubtaskService.processResust(resultYQVO); |
| | | return success(phoneCallBackSHVO); |
| | | } |
| | | |
| | | @ApiOperation("新增外呼实例配置") |
| | | @PostMapping("/addOutboundInstance") |