|
@@ -117,8 +117,6 @@ public class SysUserController {
|
|
|
userCompanyQueryWrapper.last("limit 1");
|
|
|
UserCompany userCompany = userCompanyMapper.selectOne(userCompanyQueryWrapper);
|
|
|
String companyId = userCompany.getCompanyId();
|
|
|
- log.info(user.toString());
|
|
|
- log.info("公司id:{}",userCompany.getCompanyId());
|
|
|
List<SysUserVo> userList;
|
|
|
if ("4b10089775c040119e139087517aed88".equals(companyId) || "6608ed13c0dd42de93c790dbdf124234".equals(companyId) || "d57fecdcf7a94d009736d9c850731582".equals(companyId)) {
|
|
|
userList = sysUserService.getAllUser();
|
|
@@ -143,7 +141,19 @@ public class SysUserController {
|
|
|
public Result<List<SysUserVo>> getAllList() {
|
|
|
Result<List<SysUserVo>> result = new Result<>();
|
|
|
try {
|
|
|
- List<SysUserVo> userList = sysUserService.getAllUser();
|
|
|
+ LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ QueryWrapper<UserCompany> userCompanyQueryWrapper = new QueryWrapper<>();
|
|
|
+ userCompanyQueryWrapper.eq("user_id", user.getId());
|
|
|
+ userCompanyQueryWrapper.orderByDesc("create_time");
|
|
|
+ userCompanyQueryWrapper.last("limit 1");
|
|
|
+ UserCompany userCompany = userCompanyMapper.selectOne(userCompanyQueryWrapper);
|
|
|
+ String companyId = userCompany.getCompanyId();
|
|
|
+ List<SysUserVo> userList;
|
|
|
+ if ("4b10089775c040119e139087517aed88".equals(companyId) || "6608ed13c0dd42de93c790dbdf124234".equals(companyId) || "d57fecdcf7a94d009736d9c850731582".equals(companyId)) {
|
|
|
+ userList = sysUserService.getAllUser();
|
|
|
+ } else {
|
|
|
+ userList = sysUserService.getUserListByCompany(companyId);
|
|
|
+ }
|
|
|
result.setSuccess(true);
|
|
|
result.setResult(userList);
|
|
|
} catch (Exception e) {
|