|
@@ -2,8 +2,10 @@ package com.platform.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.platform.MysqlTest;
|
|
import com.platform.MysqlTest;
|
|
|
|
+import com.platform.entity.BrandEntity;
|
|
import com.platform.entity.Result;
|
|
import com.platform.entity.Result;
|
|
import com.platform.entity.SysUserBrand;
|
|
import com.platform.entity.SysUserBrand;
|
|
|
|
+import com.platform.service.BrandService;
|
|
import com.platform.service.custom.MySysUserBrandService;
|
|
import com.platform.service.custom.MySysUserBrandService;
|
|
import com.platform.service.impl.ZhiHouseService;
|
|
import com.platform.service.impl.ZhiHouseService;
|
|
import com.platform.utils.PageUtilsPlus;
|
|
import com.platform.utils.PageUtilsPlus;
|
|
@@ -32,6 +34,9 @@ public class SysUserController extends AbstractController {
|
|
private MySysUserBrandService mySysUserBrandService;
|
|
private MySysUserBrandService mySysUserBrandService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private BrandService brandService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
private ZhiHouseService zhiHouseService;
|
|
private ZhiHouseService zhiHouseService;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -43,14 +48,14 @@ public class SysUserController extends AbstractController {
|
|
if(param.get("brandId") == null){
|
|
if(param.get("brandId") == null){
|
|
throw new RRException("缺少必要参数");
|
|
throw new RRException("缺少必要参数");
|
|
}
|
|
}
|
|
- SysUserBrand brand = mySysUserBrandService.getById(param.getLong("brandId"));
|
|
|
|
- if(brand == null){
|
|
|
|
|
|
+ BrandEntity brandEntity = brandService.queryObject(param.getInteger("brandId"));
|
|
|
|
+ if(brandEntity == null){
|
|
throw new RRException("直播间为空");
|
|
throw new RRException("直播间为空");
|
|
}
|
|
}
|
|
- if(brand.getCreateUserDeptId() == null){
|
|
|
|
|
|
+ if(brandEntity.getCreateUserDeptId() == null){
|
|
throw new RRException("直播归属公司为空");
|
|
throw new RRException("直播归属公司为空");
|
|
}
|
|
}
|
|
- JSONObject result = zhiHouseService.getSysUserListPageByDeptIdsAndUserName(brand.getCreateUserDeptId(),
|
|
|
|
|
|
+ JSONObject result = zhiHouseService.getSysUserListPageByDeptIdsAndUserName(brandEntity.getCreateUserDeptId(),
|
|
param.getLong("page"),param.getLong("limit"), param.getString("username"),token);
|
|
param.getLong("page"),param.getLong("limit"), param.getString("username"),token);
|
|
List<Object> users = result.getJSONArray("list");
|
|
List<Object> users = result.getJSONArray("list");
|
|
if(!ObjectUtils.isEmpty(users)){
|
|
if(!ObjectUtils.isEmpty(users)){
|