|
|
@@ -5,9 +5,12 @@ import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
|
+import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.company.domain.CompanyVoiceDialog;
|
|
|
import com.fs.company.service.ICompanyVoiceDialogService;
|
|
|
+import com.fs.framework.security.LoginUser;
|
|
|
+import com.fs.framework.service.TokenService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
@@ -26,6 +29,8 @@ public class CompanyVoiceDialogController extends BaseController
|
|
|
{
|
|
|
@Autowired
|
|
|
private ICompanyVoiceDialogService companyVoiceDialogService;
|
|
|
+ @Autowired
|
|
|
+ private TokenService tokenService;
|
|
|
|
|
|
/**
|
|
|
* 查询AI外呼话术列表
|
|
|
@@ -70,6 +75,9 @@ public class CompanyVoiceDialogController extends BaseController
|
|
|
@PostMapping
|
|
|
public AjaxResult add(@RequestBody CompanyVoiceDialog companyVoiceDialog)
|
|
|
{
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ companyVoiceDialog.setCompanyId(loginUser.getCompany().getCompanyId());
|
|
|
+ companyVoiceDialog.setCompanyUserId(loginUser.getUser().getUserId());
|
|
|
return toAjax(companyVoiceDialogService.insertCompanyVoiceDialog(companyVoiceDialog));
|
|
|
}
|
|
|
|