浏览代码

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

lyhzzz 3 年之前
父节点
当前提交
0ab85e7178

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

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

+ 9 - 4
platform-shop/src/main/java/com/platform/controller/SysUserController.java

@@ -2,8 +2,10 @@ package com.platform.controller;
 
 import com.alibaba.fastjson.JSONObject;
 import com.platform.MysqlTest;
+import com.platform.entity.BrandEntity;
 import com.platform.entity.Result;
 import com.platform.entity.SysUserBrand;
+import com.platform.service.BrandService;
 import com.platform.service.custom.MySysUserBrandService;
 import com.platform.service.impl.ZhiHouseService;
 import com.platform.utils.PageUtilsPlus;
@@ -32,6 +34,9 @@ public class SysUserController extends AbstractController {
     private MySysUserBrandService mySysUserBrandService;
 
     @Autowired
+    private BrandService brandService;
+
+    @Autowired
     private ZhiHouseService zhiHouseService;
 
     /**
@@ -43,14 +48,14 @@ public class SysUserController extends AbstractController {
         if(param.get("brandId") == null){
             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("直播间为空");
         }
-        if(brand.getCreateUserDeptId() == null){
+        if(brandEntity.getCreateUserDeptId() == null){
             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);
         List<Object> users = result.getJSONArray("list");
         if(!ObjectUtils.isEmpty(users)){