Pārlūkot izejas kodu

http://192.168.0.21/index.php?m=bug&f=view&bugID=25782

lyhzzz 3 gadi atpakaļ
vecāks
revīzija
3d1cdff2e5

+ 2 - 0
platform-common/src/main/java/com/platform/entity/SysUserBrand.java

@@ -59,4 +59,6 @@ public class SysUserBrand implements Serializable {
 
     @ApiModelProperty(value = "是否占线: 1->占线;0->空闲")
     private Integer isBusy;
+
+    private Long createUserDeptId;
 }

+ 13 - 1
platform-shop/src/main/java/com/platform/controller/SysUserController.java

@@ -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)){