|
@@ -1,11 +1,13 @@
|
|
|
package com.platform.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.platform.MysqlTest;
|
|
|
import com.platform.entity.Result;
|
|
|
import com.platform.entity.SysUserBrand;
|
|
|
import com.platform.service.custom.MySysUserBrandService;
|
|
|
import com.platform.service.impl.ZhiHouseService;
|
|
|
import com.platform.utils.PageUtilsPlus;
|
|
|
+import com.platform.utils.RRException;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
@@ -38,7 +40,17 @@ public class SysUserController extends AbstractController {
|
|
|
@PostMapping("/bindList")
|
|
|
public Result userBindList( @RequestHeader String token ,@RequestBody JSONObject param) {
|
|
|
// 查询用户信息
|
|
|
- JSONObject result = zhiHouseService.getSysUserListPageByDeptIdsAndUserName(getCompanyId(),
|
|
|
+ if(param.get("brandId") == null){
|
|
|
+ throw new RRException("缺少必要参数");
|
|
|
+ }
|
|
|
+ SysUserBrand brand = mySysUserBrandService.getById(param.getLong("brandId"));
|
|
|
+ if(brand == null){
|
|
|
+ throw new RRException("直播间为空");
|
|
|
+ }
|
|
|
+ if(brand.getCreateUserDeptId() == null){
|
|
|
+ throw new RRException("直播归属公司为空");
|
|
|
+ }
|
|
|
+ JSONObject result = zhiHouseService.getSysUserListPageByDeptIdsAndUserName(brand.getCreateUserDeptId(),
|
|
|
param.getLong("page"),param.getLong("limit"), param.getString("username"),token);
|
|
|
List<Object> users = result.getJSONArray("list");
|
|
|
if(!ObjectUtils.isEmpty(users)){
|