Просмотр исходного кода

租户总后台-个微客户管理接口404问题修复

Long 1 месяц назад
Родитель
Сommit
50664b34ae

+ 152 - 0
fs-admin-saas/src/main/java/com/fs/company/controller/CompanyVoiceRoboticController.java

@@ -0,0 +1,152 @@
+package com.fs.company.controller;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.company.domain.CompanyVoiceRobotic;
+import com.fs.company.domain.CompanyVoiceRoboticCallees;
+import com.fs.company.domain.CompanyVoiceRoboticWx;
+import com.fs.company.service.ICompanyVoiceRoboticCalleesService;
+import com.fs.company.service.ICompanyVoiceRoboticService;
+import com.fs.company.service.ICompanyVoiceRoboticWxService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 机器人外呼任务Controller(SaaS管理端)
+ *
+ * @author fs
+ * @date 2025-05-30
+ */
+@RestController
+@RequestMapping("/company/companyVoiceRobotic")
+public class CompanyVoiceRoboticController extends BaseController {
+
+    @Autowired
+    private ICompanyVoiceRoboticService companyVoiceRoboticService;
+
+    @Autowired
+    private ICompanyVoiceRoboticCalleesService companyVoiceRoboticCalleesService;
+
+    @Autowired
+    private ICompanyVoiceRoboticWxService companyVoiceRoboticWxService;
+
+    /**
+     * 查询机器人外呼任务列表(分页)
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CompanyVoiceRobotic companyVoiceRobotic) {
+        startPage();
+        List<CompanyVoiceRobotic> list = companyVoiceRoboticService.selectCompanyVoiceRoboticList(companyVoiceRobotic);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询机器人外呼任务列表(全部,用于下拉选择)
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:list')")
+    @GetMapping("/listAll")
+    public R listAll(CompanyVoiceRobotic companyVoiceRobotic) {
+        return R.ok().put("data", companyVoiceRoboticService.selectCompanyVoiceRoboticList(companyVoiceRobotic));
+    }
+
+    /**
+     * 查询被叫号码列表
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:list')")
+    @GetMapping("/calleesList")
+    public TableDataInfo calleesList(Long id) {
+        startPage();
+        List<CompanyVoiceRoboticCallees> list = companyVoiceRoboticCalleesService.selectCompanyVoiceRoboticCalleesListByRoboticId(id);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询加微方式列表
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:list')")
+    @GetMapping("/wxList")
+    public TableDataInfo wxList(Long id) {
+        startPage();
+        List<CompanyVoiceRoboticWx> list = companyVoiceRoboticWxService.selectWxList(id);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询企微加微方式列表
+     */
+    @GetMapping("/wxListQw")
+    public TableDataInfo wxListQw(Long id) {
+        startPage();
+        List<CompanyVoiceRoboticWx> list = companyVoiceRoboticWxService.selectWxListQw(id);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出机器人外呼任务列表
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:export')")
+    @Log(title = "机器人外呼任务", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CompanyVoiceRobotic companyVoiceRobotic) {
+        List<CompanyVoiceRobotic> list = companyVoiceRoboticService.selectCompanyVoiceRoboticList(companyVoiceRobotic);
+        ExcelUtil<CompanyVoiceRobotic> util = new ExcelUtil<CompanyVoiceRobotic>(CompanyVoiceRobotic.class);
+        return util.exportExcel(list, "robotic");
+    }
+
+    /**
+     * 获取机器人外呼任务详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(companyVoiceRoboticService.selectCompanyVoiceRoboticById(id));
+    }
+
+    /**
+     * 新增机器人外呼任务
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:add')")
+    @Log(title = "机器人外呼任务", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CompanyVoiceRobotic companyVoiceRobotic) {
+        return toAjax(companyVoiceRoboticService.insertCompanyVoiceRobotic(companyVoiceRobotic));
+    }
+
+    /**
+     * 修改机器人外呼任务
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:edit')")
+    @Log(title = "机器人外呼任务", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CompanyVoiceRobotic companyVoiceRobotic) {
+        return toAjax(companyVoiceRoboticService.updateCompanyVoiceRobotic(companyVoiceRobotic));
+    }
+
+    /**
+     * 删除机器人外呼任务
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:remove')")
+    @Log(title = "机器人外呼任务", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(companyVoiceRoboticService.deleteCompanyVoiceRoboticByIds(ids));
+    }
+
+    /**
+     * 员工列表(全部,用于下拉选择)
+     */
+    @PreAuthorize("@ss.hasPermi('company:companyVoiceRobotic:list')")
+    @GetMapping("/companyUserList")
+    public R companyUserList() {
+        return R.ok().put("data", companyVoiceRoboticService.qwUserList());
+    }
+}