|
@@ -1,23 +1,22 @@
|
|
|
package com.platform.controller;
|
|
|
|
|
|
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.vos.TbUser;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@RestController
|
|
|
-@RequestMapping("/api/zfb")
|
|
|
+@RequestMapping("/zfb")
|
|
|
public class ZfbController {
|
|
|
|
|
|
@Autowired
|
|
@@ -27,8 +26,9 @@ public class ZfbController {
|
|
|
private ZhiHouseService zhiHouseService;
|
|
|
|
|
|
@PostMapping("/preDeleteStaff")
|
|
|
- @RequiresPermissions("sys:user:delete")
|
|
|
- public Result preDeleteStaff(@RequestParam Long userId,@RequestParam Long deptId) {
|
|
|
+ public Result preDeleteStaff(@RequestBody HashMap<String,Long> param) {
|
|
|
+ Long userId = param.get("userId");
|
|
|
+ Long deptId = param.get("deptId");
|
|
|
// 获取直播间绑定信息
|
|
|
List<Long> bindUsers = mySysUserBrandService.queryBrandIdList(userId);
|
|
|
if (!ObjectUtils.isEmpty(bindUsers)) {
|
|
@@ -43,6 +43,16 @@ public class ZfbController {
|
|
|
}
|
|
|
return Result.success();
|
|
|
}
|
|
|
+ @PostMapping("/getCanShow")
|
|
|
+ public Result getCanShow(@RequestBody HashMap<String,Long> param) {
|
|
|
+ Long userId = param.get("userId");
|
|
|
+ Integer brandId = Math.toIntExact(param.get("brandId"));
|
|
|
+ SysUserBrand userBrandById = mySysUserBrandService.getUserBrandById(userId, brandId);
|
|
|
+ if(userBrandById == null){
|
|
|
+ return Result.failure("暂无数据");
|
|
|
+ }
|
|
|
+ return Result.success(userBrandById.getCanShow());
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|