|
|
@ -1,6 +1,7 @@ |
|
|
package com.zdxt.auth.project.system.user.controller; |
|
|
package com.zdxt.auth.project.system.user.controller; |
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.zdxt.auth.common.constant.UserConstants; |
|
|
import com.zdxt.auth.common.constant.UserConstants; |
|
|
import com.zdxt.auth.common.utils.poi.ExcelUtil; |
|
|
import com.zdxt.auth.common.utils.poi.ExcelUtil; |
|
|
import com.zdxt.auth.common.utils.security.ShiroUtils; |
|
|
import com.zdxt.auth.common.utils.security.ShiroUtils; |
|
|
@ -14,6 +15,8 @@ import com.zdxt.auth.project.system.post.service.IPostService; |
|
|
import com.zdxt.auth.project.system.role.service.IRoleService; |
|
|
import com.zdxt.auth.project.system.role.service.IRoleService; |
|
|
import com.zdxt.auth.project.system.user.mapper.UserMapper; |
|
|
import com.zdxt.auth.project.system.user.mapper.UserMapper; |
|
|
import com.zdxt.auth.project.system.user.service.IUserService; |
|
|
import com.zdxt.auth.project.system.user.service.IUserService; |
|
|
|
|
|
import com.zdxt.common.ZDResponse; |
|
|
|
|
|
import com.zdxt.common.util.StringUtils; |
|
|
import com.zdxt.domain.auth.Post; |
|
|
import com.zdxt.domain.auth.Post; |
|
|
import com.zdxt.domain.auth.User; |
|
|
import com.zdxt.domain.auth.User; |
|
|
import com.zdxt.log.aspectj.lang.annotation.Log; |
|
|
import com.zdxt.log.aspectj.lang.annotation.Log; |
|
|
@ -318,4 +321,28 @@ public class UserController extends BaseController |
|
|
userService.checkUserAllowed(user); |
|
|
userService.checkUserAllowed(user); |
|
|
return toAjax(userService.changeStatus(user)); |
|
|
return toAjax(userService.changeStatus(user)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@RequiresPermissions("system:user:list") |
|
|
|
|
|
@PostMapping("/listApp") |
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
public ZDResponse listApp(@RequestBody User user) { |
|
|
|
|
|
List<User> list = userService.selectUserList(user); |
|
|
|
|
|
// 查询出职务
|
|
|
|
|
|
for (User userData : list) { |
|
|
|
|
|
List<PostBean> postBeanList = postApi.selectPostsByUserId(userData.getUserId()); |
|
|
|
|
|
ArrayList<Post> postList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
// 职务bean转成实体
|
|
|
|
|
|
for (PostBean postBean : postBeanList) { |
|
|
|
|
|
Post post = new Post(); |
|
|
|
|
|
BeanUtil.copyProperties(postBean, post); |
|
|
|
|
|
postList.add(post); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!postList.isEmpty()) { |
|
|
|
|
|
userData.setPostList(postList); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return ZDResponse.success("查询成功",list); |
|
|
|
|
|
} |
|
|
} |
|
|
} |