| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/ivrlibintentcategory") |
| | | public class IvrLibIntentcategoryController extends BaseController |
| | | { |
| | | public class IvrLibIntentcategoryController extends BaseController { |
| | | @Autowired |
| | | private IIvrLibIntentcategoryService ivrLibIntentcategoryService; |
| | | |
| | |
| | | * 查询AI意图库分类列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrlibintentcategory:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrLibIntentcategory ivrLibIntentcategory) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody IvrLibIntentcategory ivrLibIntentcategory) { |
| | | startPage(); |
| | | List<IvrLibIntentcategory> list = ivrLibIntentcategoryService.selectIvrLibIntentcategoryList(ivrLibIntentcategory); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrlibintentcategory:export')") |
| | | @Log(title = "AI意图库分类", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, IvrLibIntentcategory ivrLibIntentcategory) |
| | | { |
| | | public void export(HttpServletResponse response, IvrLibIntentcategory ivrLibIntentcategory) { |
| | | List<IvrLibIntentcategory> list = ivrLibIntentcategoryService.selectIvrLibIntentcategoryList(ivrLibIntentcategory); |
| | | ExcelUtil<IvrLibIntentcategory> util = new ExcelUtil<IvrLibIntentcategory>(IvrLibIntentcategory.class); |
| | | util.exportExcel(response, list, "AI意图库分类数据"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrlibintentcategory:query')") |
| | | @GetMapping(value = "/{intertcatid}") |
| | | public AjaxResult getInfo(@PathVariable("intertcatid") Long intertcatid) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("intertcatid") Long intertcatid) { |
| | | return success(ivrLibIntentcategoryService.selectIvrLibIntentcategoryByIntertcatid(intertcatid)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrlibintentcategory:add')") |
| | | @Log(title = "AI意图库分类", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody IvrLibIntentcategory ivrLibIntentcategory) |
| | | { |
| | | SysUser user = getLoginUser().getUser(); |
| | | ivrLibIntentcategory.setOrgid(user.getOrgid()); |
| | | public AjaxResult add(@RequestBody IvrLibIntentcategory ivrLibIntentcategory) { |
| | | return toAjax(ivrLibIntentcategoryService.insertIvrLibIntentcategory(ivrLibIntentcategory)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrlibintentcategory:edit')") |
| | | @Log(title = "AI意图库分类", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody IvrLibIntentcategory ivrLibIntentcategory) |
| | | { |
| | | public AjaxResult edit(@RequestBody IvrLibIntentcategory ivrLibIntentcategory) { |
| | | return toAjax(ivrLibIntentcategoryService.updateIvrLibIntentcategory(ivrLibIntentcategory)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ivrlibintentcategory:remove')") |
| | | @Log(title = "AI意图库分类", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{intertcatids}") |
| | | public AjaxResult remove(@PathVariable Long[] intertcatids) |
| | | { |
| | | @GetMapping("/remove/{intertcatids}") |
| | | public AjaxResult remove(@PathVariable Long[] intertcatids) { |
| | | return toAjax(ivrLibIntentcategoryService.deleteIvrLibIntentcategoryByIntertcatids(intertcatids)); |
| | | } |
| | | } |