| | |
| | | |
| | | 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/ivrscene") |
| | | public class IvrSceneController extends BaseController |
| | | { |
| | | public class IvrSceneController extends BaseController { |
| | | @Autowired |
| | | private IIvrSceneService ivrSceneService; |
| | | |
| | |
| | | * 查询AI外呼场景管理列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscene:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrScene ivrScene) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody IvrScene ivrScene) { |
| | | startPage(); |
| | | List<IvrScene> list = ivrSceneService.selectIvrSceneList(ivrScene); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscene:export')") |
| | | @Log(title = "AI外呼场景管理", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrScene ivrScene) |
| | | { |
| | | public void export(HttpServletResponse response, IvrScene ivrScene) { |
| | | List<IvrScene> list = ivrSceneService.selectIvrSceneList(ivrScene); |
| | | ExcelUtil<IvrScene> util = new ExcelUtil<IvrScene>(IvrScene.class); |
| | | util.exportExcel(response, list, "AI外呼场景管理数据"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscene:query')") |
| | | @GetMapping(value = "/{sceneid}") |
| | | public AjaxResult getInfo(@PathVariable("sceneid") Long sceneid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("sceneid") Long sceneid) { |
| | | return success(ivrSceneService.selectIvrSceneBySceneid(sceneid)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscene:add')") |
| | | @Log(title = "AI外呼场景管理", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrScene ivrScene) |
| | | { |
| | | public AjaxResult add(@RequestBody IvrScene ivrScene) { |
| | | return toAjax(ivrSceneService.insertIvrScene(ivrScene)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscene:edit')") |
| | | @Log(title = "AI外呼场景管理", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrScene ivrScene) |
| | | { |
| | | public AjaxResult edit(@RequestBody IvrScene ivrScene) { |
| | | return toAjax(ivrSceneService.updateIvrScene(ivrScene)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrscene:remove')") |
| | | @Log(title = "AI外呼场景管理", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{sceneids}") |
| | | public AjaxResult remove(@PathVariable Long[] sceneids) |
| | | { |
| | | @GetMapping("/remove/{sceneids}") |
| | | public AjaxResult remove(@PathVariable Long[] sceneids) { |
| | | return toAjax(ivrSceneService.deleteIvrSceneBySceneids(sceneids)); |
| | | } |
| | | } |