|
@@ -25,10 +25,9 @@ import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
|
|
|
-import java.util.List;
|
|
|
+import java.util.*;
|
|
|
import java.io.IOException;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Date;
|
|
|
+
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import com.huaxu.entity.UserEntity;
|
|
|
import com.huaxu.service.UserService;
|
|
@@ -98,6 +97,7 @@ public class UserController {
|
|
|
return new AjaxMessage<>(ResultStatus.OK, userEntity);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 按用户查询一级菜单信息(入口菜单)
|
|
|
*/
|
|
@@ -267,9 +267,22 @@ public class UserController {
|
|
|
|
|
|
@RequestMapping(value = "/findUserIdsByOrgId", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
- public AjaxMessage<List<UserEntity>> findUserIdsByOrgId(String ids) {
|
|
|
- List list = JSONObject.parseObject(ids, List.class);
|
|
|
+ public AjaxMessage<List<UserEntity>> findUserIdsByOrgId(Long[] ids) {
|
|
|
+ List list = Arrays.asList(ids.clone());
|
|
|
List<UserEntity> result = userService.findUserIdsByOrgId(list);
|
|
|
return new AjaxMessage<>(ResultStatus.OK,result);
|
|
|
}
|
|
|
+
|
|
|
+ @RequestMapping(value = "/findUserIdsByUserIds", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public Map<Long,String> findUserIdsByUserIds(Long[] ids) {
|
|
|
+ List list = Arrays.asList(ids.clone());
|
|
|
+ List<UserEntity> result = userService.findUserIdsByUserIds(list);
|
|
|
+ Map<Long,String> userInfos = new HashMap<>();
|
|
|
+ for(UserEntity item : result)
|
|
|
+ {
|
|
|
+ userInfos.put(item.getId(),item.getUsername());
|
|
|
+ }
|
|
|
+ return userInfos;
|
|
|
+ }
|
|
|
}
|