|
@@ -117,13 +117,13 @@ public class AdvertiserController {
|
|
|
Result<IPage<Advertiser>> result = new Result<>();
|
|
|
String roleCode = sysRoleService.getRoleCodeByUserId(advertiser.getUserId());
|
|
|
String userId = advertiser.getUserId();
|
|
|
- if (CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN.equals(roleCode) || "kuaishouOperationManager".equals(roleCode) || "touTiaoOperationManager".equals(roleCode) || "sale".equals(roleCode) || "saleDirector".equals(roleCode)) {
|
|
|
+ if (CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN.equals(roleCode) || "kuaishouOperationManager".equals(roleCode) || "touTiaoOperationManager".equals(roleCode) || roleCode.contains("sale") || "meidaManager".equals(roleCode)) {
|
|
|
advertiser.setUserId(null);
|
|
|
}
|
|
|
String industryId = advertiser.getIndustryId();
|
|
|
advertiser.setIndustryId(null);
|
|
|
QueryWrapper<Advertiser> queryWrapper = QueryGenerator.initQueryWrapper(advertiser, req.getParameterMap());
|
|
|
- if ("kuaishouOperationManager".equals(roleCode)) {
|
|
|
+ if ("kuaishouOperationManager".equals(roleCode) || "touTiaoOperationManager".equals(roleCode)) {
|
|
|
QueryWrapper<UserCompany> userCompanyQueryWrapper = new QueryWrapper<>();
|
|
|
userCompanyQueryWrapper.eq("user_id", userId);
|
|
|
userCompanyQueryWrapper.orderByDesc("create_time");
|
|
@@ -133,10 +133,10 @@ public class AdvertiserController {
|
|
|
queryWrapper.eq("company_id", userCompany.getCompanyId());
|
|
|
}
|
|
|
}
|
|
|
- if(null!=industryId&&!"".equals(industryId.trim())){
|
|
|
+ if (null != industryId && !"".equals(industryId.trim())) {
|
|
|
SysCategory category = sysCategoryService.getById(industryId);
|
|
|
- if(null!=category){
|
|
|
- queryWrapper.likeRight("industry_code",category.getCode());
|
|
|
+ if (null != category) {
|
|
|
+ queryWrapper.likeRight("industry_code", category.getCode());
|
|
|
}
|
|
|
}
|
|
|
Page<Advertiser> page = new Page<>(pageNo, pageSize);
|
|
@@ -180,9 +180,9 @@ public class AdvertiserController {
|
|
|
advertiser.setCompanyId(userCompany.getCompanyId());
|
|
|
}
|
|
|
String industryId = advertiser.getIndustryId();
|
|
|
- if(null!=industryId&&!"".equals(industryId.trim())){
|
|
|
+ if (null != industryId && !"".equals(industryId.trim())) {
|
|
|
SysCategory category = sysCategoryService.getById(industryId);
|
|
|
- if(null!=category){
|
|
|
+ if (null != category) {
|
|
|
advertiser.setIndustryId(category.getId());
|
|
|
advertiser.setIndustryCode(category.getCode());
|
|
|
}
|
|
@@ -215,9 +215,9 @@ public class AdvertiserController {
|
|
|
result.error500("未找到对应实体");
|
|
|
} else {
|
|
|
String industryId = advertiser.getIndustryId();
|
|
|
- if(null!=industryId&&!"".equals(industryId.trim())){
|
|
|
+ if (null != industryId && !"".equals(industryId.trim())) {
|
|
|
SysCategory category = sysCategoryService.getById(industryId);
|
|
|
- if(null!=category){
|
|
|
+ if (null != category) {
|
|
|
advertiser.setIndustryId(category.getId());
|
|
|
advertiser.setIndustryCode(category.getCode());
|
|
|
}
|
|
@@ -386,7 +386,7 @@ public class AdvertiserController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- List<UserAllocation> allocations = userAllocationService.getByParams(projectId, systemType,null);
|
|
|
+ List<UserAllocation> allocations = userAllocationService.getByParams(projectId, systemType, null);
|
|
|
if (null != allocations && !allocations.isEmpty()) {
|
|
|
for (UserAllocation allocation : allocations) {
|
|
|
SheetInfoVo vo = advertiserService.getXxlStatisticInfo(projectId, systemType, allocation.getAccountId(), allocation.getAuthName());
|
|
@@ -421,7 +421,7 @@ public class AdvertiserController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- List<UserAllocation> allocations = userAllocationService.getByParams(projectId, systemType,null);
|
|
|
+ List<UserAllocation> allocations = userAllocationService.getByParams(projectId, systemType, null);
|
|
|
if (null != allocations && !allocations.isEmpty()) {
|
|
|
for (UserAllocation allocation : allocations) {
|
|
|
SheetInfoVo vo = advertiserService.getXxlStatisticInfo(projectId, systemType, allocation.getAccountId(), allocation.getAuthName());
|