liusheng
3 天以前 c80135e5c3f7bfab96ba558a910a06f1e587c53c
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/IvrLibScriptcategoryController.java
@@ -3,6 +3,7 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.annotation.AddOrgId;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
@@ -31,8 +32,7 @@
 */
@RestController
@RequestMapping("/smartor/ivrlibscriptcategory")
public class IvrLibScriptcategoryController extends BaseController
{
public class IvrLibScriptcategoryController extends BaseController {
    @Autowired
    private IIvrLibScriptcategoryService ivrLibScriptcategoryService;
@@ -40,9 +40,9 @@
     * 查询AI话术库分类列表
     */
    //@PreAuthorize("@ss.hasPermi('smartor:ivrlibscriptcategory:list')")
   @PostMapping("/list")
    public TableDataInfo list(@RequestBody IvrLibScriptcategory ivrLibScriptcategory)
    {
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("list")
    public TableDataInfo list(@RequestBody IvrLibScriptcategory ivrLibScriptcategory) {
        startPage();
        List<IvrLibScriptcategory> list = ivrLibScriptcategoryService.selectIvrLibScriptcategoryList(ivrLibScriptcategory);
        return getDataTable(list);
@@ -54,8 +54,7 @@
    //@PreAuthorize("@ss.hasPermi('smartor:ivrlibscriptcategory:export')")
    @Log(title = "AI话术库分类", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, IvrLibScriptcategory ivrLibScriptcategory)
    {
    public void export(HttpServletResponse response, IvrLibScriptcategory ivrLibScriptcategory) {
        List<IvrLibScriptcategory> list = ivrLibScriptcategoryService.selectIvrLibScriptcategoryList(ivrLibScriptcategory);
        ExcelUtil<IvrLibScriptcategory> util = new ExcelUtil<IvrLibScriptcategory>(IvrLibScriptcategory.class);
        util.exportExcel(response, list, "AI话术库分类数据");
@@ -66,8 +65,7 @@
     */
    //@PreAuthorize("@ss.hasPermi('smartor:ivrlibscriptcategory:query')")
    @GetMapping(value = "/{categoryid}")
    public AjaxResult getInfo(@PathVariable("categoryid") Long categoryid)
    {
    public AjaxResult getInfo(@PathVariable("categoryid") Long categoryid) {
        return success(ivrLibScriptcategoryService.selectIvrLibScriptcategoryByCategoryid(categoryid));
    }
@@ -76,9 +74,9 @@
     */
    //@PreAuthorize("@ss.hasPermi('smartor:ivrlibscriptcategory:add')")
    @Log(title = "AI话术库分类", businessType = BusinessType.INSERT)
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/add")
    public AjaxResult add(@RequestBody IvrLibScriptcategory ivrLibScriptcategory)
    {
    public AjaxResult add(@RequestBody IvrLibScriptcategory ivrLibScriptcategory) {
        SysUser user = getLoginUser().getUser();
        ivrLibScriptcategory.setOrgid(user.getOrgid());
        return toAjax(ivrLibScriptcategoryService.insertIvrLibScriptcategory(ivrLibScriptcategory));
@@ -89,9 +87,9 @@
     */
    //@PreAuthorize("@ss.hasPermi('smartor:ivrlibscriptcategory:edit')")
    @Log(title = "AI话术库分类", businessType = BusinessType.UPDATE)
    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody IvrLibScriptcategory ivrLibScriptcategory)
    {
    public AjaxResult edit(@RequestBody IvrLibScriptcategory ivrLibScriptcategory) {
        return toAjax(ivrLibScriptcategoryService.updateIvrLibScriptcategory(ivrLibScriptcategory));
    }
@@ -100,9 +98,8 @@
     */
    //@PreAuthorize("@ss.hasPermi('smartor:ivrlibscriptcategory:remove')")
    @Log(title = "AI话术库分类", businessType = BusinessType.DELETE)
   @GetMapping("/remove/{categoryids}")
    public AjaxResult remove(@PathVariable Long[] categoryids)
    {
    @GetMapping("/remove/{categoryids}")
    public AjaxResult remove(@PathVariable Long[] categoryids) {
        return toAjax(ivrLibScriptcategoryService.deleteIvrLibScriptcategoryByCategoryids(categoryids));
    }
}