|
@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 系统用户
|
|
* 系统用户
|
|
@@ -42,15 +43,18 @@ public class SysUserController extends AbstractController {
|
|
// 查询用户信息
|
|
// 查询用户信息
|
|
JSONObject result = zhiHouseService.getSysUserListPageByDeptIdsAndUserName(getDeptId(),
|
|
JSONObject result = zhiHouseService.getSysUserListPageByDeptIdsAndUserName(getDeptId(),
|
|
param.getLong("page"),param.getLong("limit"), param.getString("username"));
|
|
param.getLong("page"),param.getLong("limit"), param.getString("username"));
|
|
- List<Object> users = result.getJSONArray("records");
|
|
|
|
|
|
+ List<Object> users = result.getJSONArray("list");
|
|
if(!ObjectUtils.isEmpty(users)){
|
|
if(!ObjectUtils.isEmpty(users)){
|
|
- users.stream().map(object->JSONObject.parseObject(JSONObject.toJSONString(object))).forEach(user->{
|
|
|
|
|
|
+ users = users.stream().map(object -> {
|
|
|
|
+ JSONObject user = JSONObject.parseObject(JSONObject.toJSONString(object));
|
|
// 查找直播间数据
|
|
// 查找直播间数据
|
|
SysUserBrand userBrand = mySysUserBrandService.getUserBrandById(user.getLong("id"), param.getInteger("brandId"));
|
|
SysUserBrand userBrand = mySysUserBrandService.getUserBrandById(user.getLong("id"), param.getInteger("brandId"));
|
|
- if(!ObjectUtils.isEmpty(userBrand.getCanShow())){
|
|
|
|
- user.put("canShow",userBrand.getCanShow());
|
|
|
|
|
|
+ if (!ObjectUtils.isEmpty(userBrand)){
|
|
|
|
+ user.put("isBind", 1);
|
|
|
|
+ user.put("canShow", userBrand.getCanShow());
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ return user;
|
|
|
|
+ }).collect(Collectors.toList());
|
|
}
|
|
}
|
|
// 处理场景数据
|
|
// 处理场景数据
|
|
PageUtilsPlus pageResult = PageUtilsPlus.page(users, result.getLong("totalCount"), param.getLong("limit"), param.getLong("page"));
|
|
PageUtilsPlus pageResult = PageUtilsPlus.page(users, result.getLong("totalCount"), param.getLong("limit"), param.getLong("page"));
|