| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | /** |
| | | * AI外呼流程Controller |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/ivrflow") |
| | | public class IvrSceneFlowController extends BaseController |
| | | { |
| | | public class IvrSceneFlowController extends BaseController { |
| | | @Autowired |
| | | private IIvrSceneFlowService ivrSceneFlowService; |
| | | |
| | |
| | | * 查询AI外呼流程列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrflow:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrSceneFlow ivrSceneFlow) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody IvrSceneFlow ivrSceneFlow) { |
| | | startPage(); |
| | | List<IvrSceneFlow> list = ivrSceneFlowService.selectIvrSceneFlowList(ivrSceneFlow); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrflow:export')") |
| | | @Log(title = "AI外呼流程", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrSceneFlow ivrSceneFlow) |
| | | { |
| | | public void export(HttpServletResponse response, IvrSceneFlow ivrSceneFlow) { |
| | | List<IvrSceneFlow> list = ivrSceneFlowService.selectIvrSceneFlowList(ivrSceneFlow); |
| | | ExcelUtil<IvrSceneFlow> util = new ExcelUtil<IvrSceneFlow>(IvrSceneFlow.class); |
| | | util.exportExcel(response, list, "AI外呼流程数据"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrflow:query')") |
| | | @GetMapping(value = "/{flowid}") |
| | | public AjaxResult getInfo(@PathVariable("flowid") Long flowid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("flowid") Long flowid) { |
| | | return success(ivrSceneFlowService.selectIvrSceneFlowByFlowid(flowid)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrflow:add')") |
| | | @Log(title = "AI外呼流程", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrSceneFlow ivrSceneFlow) |
| | | { |
| | | public AjaxResult add(@RequestBody IvrSceneFlow ivrSceneFlow) { |
| | | return toAjax(ivrSceneFlowService.insertIvrSceneFlow(ivrSceneFlow)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrflow:edit')") |
| | | @Log(title = "AI外呼流程", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrSceneFlow ivrSceneFlow) |
| | | { |
| | | public AjaxResult edit(@RequestBody IvrSceneFlow ivrSceneFlow) { |
| | | return toAjax(ivrSceneFlowService.updateIvrSceneFlow(ivrSceneFlow)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrflow:remove')") |
| | | @Log(title = "AI外呼流程", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{flowids}") |
| | | public AjaxResult remove(@PathVariable Long[] flowids) |
| | | { |
| | | @GetMapping("/remove/{flowids}") |
| | | public AjaxResult remove(@PathVariable Long[] flowids) { |
| | | return toAjax(ivrSceneFlowService.deleteIvrSceneFlowByFlowids(flowids)); |
| | | } |
| | | } |