|
|
@@ -69,16 +69,14 @@ public class WorkContactEmployeeController extends BaseController<WorkContactEmp
|
|
|
@ResponseBody
|
|
|
public Object getList(
|
|
|
@AuthUser User authUser,
|
|
|
- @Valid @RequestBody GetWorkContactEmployeeHandle handle, BindingResult bindingResult,
|
|
|
- HttpServletRequest request) {
|
|
|
+ @Valid @RequestBody GetWorkContactEmployeeHandle handle, BindingResult bindingResult) {
|
|
|
|
|
|
- XxlSsoUser user = (XxlSsoUser) request.getAttribute(Conf.SSO_USER);
|
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
}
|
|
|
|
|
|
- List<Integer> corpIds = userCorpService.getAuthUserCorpIds(user.getUserid());
|
|
|
+ List<Integer> corpIds = userCorpService.getAuthUserCorpIds(authUser.getId().toString());
|
|
|
|
|
|
if(corpIds.size() <=0){
|
|
|
return AjaxResult.error(HttpStatus.ERROR, UserCorpService.USER_MSG);
|
|
|
@@ -88,22 +86,19 @@ public class WorkContactEmployeeController extends BaseController<WorkContactEmp
|
|
|
Map<String, Object> resMap = WorkContactEmployeeService.getPageList(handle);//所有
|
|
|
|
|
|
return AjaxResult.success(resMap);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/export")
|
|
|
@ResponseBody
|
|
|
public Object export(
|
|
|
@AuthUser User authUser,
|
|
|
- @Valid @RequestBody GetWorkContactEmployeeHandle handle, BindingResult bindingResult,
|
|
|
- HttpServletRequest request) {
|
|
|
- XxlSsoUser user = (XxlSsoUser) request.getAttribute(Conf.SSO_USER);
|
|
|
+ @Valid @RequestBody GetWorkContactEmployeeHandle handle, BindingResult bindingResult) {
|
|
|
|
|
|
if (bindingResult.hasErrors()) {
|
|
|
return AjaxResult.error(HttpStatus.ERROR, bindingResult.getFieldError().getDefaultMessage());
|
|
|
}
|
|
|
|
|
|
- List<Integer> corpIds = userCorpService.getAuthUserCorpIds(user.getUserid());
|
|
|
+ List<Integer> corpIds = userCorpService.getAuthUserCorpIds(authUser.getId().toString());
|
|
|
if(corpIds.size() <=0){
|
|
|
return AjaxResult.error(HttpStatus.ERROR, UserCorpService.USER_MSG);
|
|
|
}
|
|
|
@@ -112,8 +107,9 @@ public class WorkContactEmployeeController extends BaseController<WorkContactEmp
|
|
|
|
|
|
Downfile downObj = new Downfile();
|
|
|
downObj.setMsg(Downfile.DEFAULT_MSG);
|
|
|
- downObj.setAuthId(authUser.getId());
|
|
|
+ downObj.setAuthId(Integer.parseInt(authUser.getId().toString()));
|
|
|
downObj.setAuthName(authUser.getName());
|
|
|
+
|
|
|
downObj.setTitle(Downfile.WORK_CONTACT_EMPLOYEE);
|
|
|
downfileService.save(downObj);
|
|
|
|