|
@@ -22,6 +22,7 @@ import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
+import sun.rmi.runtime.Log;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
@@ -72,15 +73,14 @@ public class GoodsController extends AbstractController{
|
|
|
List<Long> roleIdList = getUser().getRoleIdList();
|
|
|
if (!roleIdList.contains(1L) && !roleIdList.contains(5L)) {
|
|
|
// 获取用户角色
|
|
|
- Long roleId = getUser().getRoleId();
|
|
|
HashMap<String, Object> brandQuery = new HashMap<>();
|
|
|
// 公司管理员能获取改公司下面所有的直播间的数据
|
|
|
- if (roleId == 6) {
|
|
|
+ if (roleIdList.contains(6L)) {
|
|
|
if (null == getDeptId()) {
|
|
|
return Result.success(pageUtil);
|
|
|
}
|
|
|
brandQuery.put("deptIdList", getDeptId());
|
|
|
- } else if (roleId == 8) {
|
|
|
+ } else if (roleIdList.contains(8L) || roleIdList.contains(2L)) {
|
|
|
// 公司员工只能获取当前绑定当前用户直播间的商品数据
|
|
|
List<Long> brandIds = mySysUserBrandService.queryBrandIdList(getUserId());
|
|
|
if(ObjectUtils.isEmpty(brandIds)){
|