浏览代码

批量查询canshow

lyhzzz 3 年之前
父节点
当前提交
2e8bfe2a51

+ 1 - 1
platform-common/src/main/java/com/platform/controller/ZfbController.java

@@ -31,7 +31,7 @@ public class ZfbController {
     @PostMapping("/preDeleteStaff")
     public Result preDeleteStaff(@RequestBody HashMap<String,Long> param) {
         Long userId = param.get("userId");
-        Long deptId = param.get("deptId");
+        Long deptId = param.get("companyId");
         // 获取直播间绑定信息
         List<Long> bindUsers = mySysUserBrandService.queryBrandIdList(userId);
         if (!ObjectUtils.isEmpty(bindUsers)) {

+ 12 - 12
platform-common/src/main/java/com/platform/service/custom/MySysUserBrandService.java

@@ -98,18 +98,18 @@ public class MySysUserBrandService extends SysUserBrandServiceImpl {
         return brands;
     }
 
-//    public void reBindUser(Long fromUserId,SysUserEntity toUser) {
-//        if ( ObjectUtils.isEmpty(fromUserId)) {
-//            throw new RuntimeException("参数有误!");
-//        }
-//
-//        UpdateWrapper<SysUserBrand> updateWrapper = new UpdateWrapper<>();
-//        updateWrapper.set("user_id",toUser.getUserId());
-//        updateWrapper.set("phone_num",toUser.getMobile());
-//        updateWrapper.eq("user_id" , fromUserId);
-//        updateWrapper.eq("enable" , 1);
-//        update(updateWrapper);
-//    }
+    public void reBindUser(Long fromUserId,Long userId ,String phone) {
+        if ( ObjectUtils.isEmpty(fromUserId)) {
+            throw new RuntimeException("参数有误!");
+        }
+
+        UpdateWrapper<SysUserBrand> updateWrapper = new UpdateWrapper<>();
+        updateWrapper.set("user_id",userId);
+        updateWrapper.set("phone_num",phone);
+        updateWrapper.eq("user_id" , fromUserId);
+        updateWrapper.eq("enable" , 1);
+        update(updateWrapper);
+    }
 
     public void deleteByBrandIds(Integer[] ids) {
         QueryWrapper wrapper = new QueryWrapper();