|
|
@@ -58,23 +58,30 @@ public class WorkEmployeeController extends BaseController<WorkEmployee> {
|
|
|
* 默认生成的控制器所继承的父类中有index/add/edit/del四个基础方法,均为post json请求
|
|
|
* 如果需要定制化,需要将BaseController中对应的方法复制到当前控制器,然后进行修改
|
|
|
*/
|
|
|
- @PostMapping("/getWorkEmployeeList")
|
|
|
- public Object getWorkEmployeeList(@Valid @RequestBody WorkEmployeeHandle workEmployee, @AuthUser User authUser,
|
|
|
- BindingResult bindingResult, HttpServletRequest request) {
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取客服列表 旧版
|
|
|
+ *
|
|
|
+ * @param workEmployee
|
|
|
+ * @param authUser
|
|
|
+ * @param bindingResult
|
|
|
+ * @param request
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("/getWorkEmployeeList")
|
|
|
+ public Object getWorkEmployeeList(@Valid @RequestBody WorkEmployeeHandle workEmployee, @AuthUser User authUser, BindingResult bindingResult, HttpServletRequest request) {
|
|
|
XxlSsoUser user = (XxlSsoUser) request.getAttribute(Conf.SSO_USER);
|
|
|
-
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
return AjaxResult.error(HttpStatus.LOGIN_ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
}
|
|
|
-
|
|
|
List<Integer> userCorpIds = userCorpService.getAuthUserCorpIds(authUser.getId().toString());
|
|
|
Object res = workEmployeeService.selectWorkEmployeeList(authUser.getId().toString(), workEmployee);
|
|
|
return AjaxResult.success(res);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 客服列表查询接口
|
|
|
+ * 客服列表查询接口 新版
|
|
|
+ *
|
|
|
* @param authUser
|
|
|
* @param handle
|
|
|
* @param bindingResult
|
|
|
@@ -86,9 +93,9 @@ public class WorkEmployeeController extends BaseController<WorkEmployee> {
|
|
|
return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
}
|
|
|
List<Integer> corpIds = new ArrayList<Integer>();
|
|
|
- if(authUser.getIsSuperAdmin() == 1){
|
|
|
+ if (authUser.getIsSuperAdmin() == 1) {
|
|
|
corpIds = userCorpService.getAllCorpIds();
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
corpIds = userCorpService.getAuthUserCorpIds(authUser.getId().toString());
|
|
|
}
|
|
|
if (corpIds.size() <= 0) {
|
|
|
@@ -117,11 +124,12 @@ public class WorkEmployeeController extends BaseController<WorkEmployee> {
|
|
|
|
|
|
/**
|
|
|
* 设置封禁时间和状态
|
|
|
+ *
|
|
|
* @param setForbbidenHandle
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/setForbidden")
|
|
|
- public Object setForbidden(@RequestBody SetForbbidenHandle setForbbidenHandle, BindingResult bindingResult){
|
|
|
+ public Object setForbidden(@RequestBody SetForbbidenHandle setForbbidenHandle, BindingResult bindingResult) {
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
}
|
|
|
@@ -131,6 +139,7 @@ public class WorkEmployeeController extends BaseController<WorkEmployee> {
|
|
|
|
|
|
/**
|
|
|
* 导出客服列表
|
|
|
+ *
|
|
|
* @param authUser
|
|
|
* @param handle
|
|
|
* @param bindingResult
|