|
@@ -105,7 +105,7 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accountIdsList,signature,cost);
|
|
|
}else{
|
|
|
- List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(1,userId);
|
|
|
+ List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(userId);
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accoutnIds,signature,cost);
|
|
|
}
|
|
@@ -115,7 +115,7 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
}else if(roleCode.equals("plan")){
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlan(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
- }else if(roleCode.equals("plane")){
|
|
|
+ }else if(roleCode.equals("plane") || roleCode.equals("planeLeader")){
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlaneAndPlaneLeader(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
}else if(roleCode.equals("clip")){
|
|
@@ -174,7 +174,7 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accountIdsList,signature,cost);
|
|
|
}else{
|
|
|
- List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(1,userId);
|
|
|
+ List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(userId);
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accoutnIds,signature,cost);
|
|
|
}
|
|
@@ -184,7 +184,7 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
}else if(roleCode.equals("plan")){
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlan(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
- }else if(roleCode.equals("plane")){
|
|
|
+ }else if(roleCode.equals("plane") || roleCode.equals("planeLeader")){
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlaneAndPlaneLeader(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
}else if(roleCode.equals("clip")){
|
|
@@ -242,7 +242,7 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accountIdsList,signature,cost);
|
|
|
}else{
|
|
|
- List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(1,userId);
|
|
|
+ List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(userId);
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accoutnIds,signature,cost);
|
|
|
}
|
|
@@ -252,7 +252,7 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
}else if(roleCode.equals("plan")){
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlan(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
- }else if(roleCode.equals("plane")){
|
|
|
+ }else if(roleCode.equals("plane") || roleCode.equals("planeLeader")){
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlaneAndPlaneLeader(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
}else if(roleCode.equals("clip")){
|
|
@@ -288,31 +288,49 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
String userId = sysUser.getId();
|
|
|
String roleCode = byteDanceVideoReportDailyMapper.getRoleCodeByUserId(userId);
|
|
|
String companyId = byteDanceVideoReportDailyMapper.getCompanyIdByUserId(userId);
|
|
|
+
|
|
|
+ //排序
|
|
|
+ if(StringUtils.isBlank(sort)){
|
|
|
+ sort = "cost-";
|
|
|
+ }
|
|
|
+ sort = sort.replace("-", " desc,").replace("+", " asc,"); //sort=id-name+age+
|
|
|
+ sort = sort.substring(0, sort.length() - 1);
|
|
|
+ //
|
|
|
+
|
|
|
List<ByteDanceVideoReportDaily> mList = new ArrayList<>();
|
|
|
|
|
|
List<Long> accountIdsList = null;
|
|
|
if(accountIds != null && accountIds.length != 0){
|
|
|
accountIdsList = Arrays.asList(accountIds);
|
|
|
}
|
|
|
+
|
|
|
//admin能看所有视频
|
|
|
if(roleCode.equals(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN)){
|
|
|
+ PageHelper.orderBy(sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupAdmin(startDate, endDate, accountIdsList, signature, cost);
|
|
|
}else if(roleCode.equals("touTiaoOperationManager") || roleCode.equals("operator") || roleCode.equals("operationAssistant")) {
|
|
|
if (accountIdsList != null && !accountIdsList.isEmpty()){
|
|
|
+ PageHelper.orderBy(sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accountIdsList,signature,cost);
|
|
|
}else{
|
|
|
- List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(1,userId);
|
|
|
+ List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(userId);
|
|
|
+ PageHelper.orderBy(sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accoutnIds,signature,cost);
|
|
|
}
|
|
|
}else if(roleCode.equals("shot")){
|
|
|
+ PageHelper.orderBy(sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupShot(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
}else if(roleCode.equals("plan")){
|
|
|
+ PageHelper.orderBy(sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlan(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
- }else if(roleCode.equals("plane")){
|
|
|
+ }else if(roleCode.equals("plane") || roleCode.equals("planeLeader")){
|
|
|
+ PageHelper.orderBy(sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlaneAndPlaneLeader(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
}else if(roleCode.equals("clip")){
|
|
|
+ PageHelper.orderBy(sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupClip(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
}else if(roleCode.equals("designTeamLeader")){
|
|
|
+ PageHelper.orderBy(sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupdesignTeamLeader(startDate, endDate, companyId, accountIdsList, signature, cost);
|
|
|
}
|
|
|
return mList;
|
|
@@ -346,7 +364,7 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accountIdsList,signature,cost);
|
|
|
}else{
|
|
|
- List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(1,userId);
|
|
|
+ List<Long> accoutnIds= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(userId);
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupOperator(startDate,endDate,accoutnIds,signature,cost);
|
|
|
}
|
|
@@ -356,7 +374,7 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
}else if(roleCode.equals("plan")){
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlan(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
- }else if(roleCode.equals("plane")){
|
|
|
+ }else if(roleCode.equals("plane") || roleCode.equals("planeLeader")){
|
|
|
PageHelper.startPage(pageNo,pageSize,sort);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListGroupPlaneAndPlaneLeader(startDate, endDate, companyId, userId, accountIdsList, signature, cost);
|
|
|
}else if(roleCode.equals("clip")){
|
|
@@ -406,21 +424,11 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
if (accountIdsList != null && !accountIdsList.isEmpty()){
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListDetailOperator(companyId, startDate,endDate,signature, accountIdsList);
|
|
|
}else{
|
|
|
- accountIdsList= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(1,userId);
|
|
|
+ accountIdsList= byteDanceVideoReportDailyMapper.getAccountIdsByOperatorIdAndMediaId(userId);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListDetailOperator(companyId, startDate,endDate,signature, accountIdsList);
|
|
|
}
|
|
|
- }else if(roleCode.equals("shot")){
|
|
|
- accountIdsList = byteDanceVideoReportDailyMapper.getAccountIds(companyId, signature);
|
|
|
- mList = byteDanceVideoReportDailyMapper.videoInfoListDetailDesign(companyId, startDate,endDate,signature, accountIdsList);
|
|
|
- }else if(roleCode.equals("plan")){
|
|
|
- accountIdsList = byteDanceVideoReportDailyMapper.getAccountIds(companyId, signature);
|
|
|
- mList = byteDanceVideoReportDailyMapper.videoInfoListDetailDesign(companyId, startDate,endDate,signature, accountIdsList);
|
|
|
- }else if(roleCode.equals("plane")){
|
|
|
- accountIdsList = byteDanceVideoReportDailyMapper.getAccountIds(companyId, signature);
|
|
|
- mList = byteDanceVideoReportDailyMapper.videoInfoListDetailDesign(companyId, startDate,endDate,signature, accountIdsList);
|
|
|
- }else if(roleCode.equals("clip")){
|
|
|
- accountIdsList = byteDanceVideoReportDailyMapper.getAccountIds(companyId, signature);
|
|
|
- mList = byteDanceVideoReportDailyMapper.videoInfoListDetailDesign(companyId, startDate,endDate,signature, accountIdsList);
|
|
|
+ }else if(roleCode.equals("shot") || roleCode.equals("plan") || roleCode.equals("plane") || roleCode.equals("planeLeader") || roleCode.equals("clip") || roleCode.equals("designTeamLeader")){
|
|
|
+ mList = byteDanceVideoReportDailyMapper.videoInfoListDetailDesign(companyId, startDate, endDate, signature, accountIdsList);
|
|
|
}else if(roleCode.equals("designTeamLeader")){
|
|
|
accountIdsList = byteDanceVideoReportDailyMapper.getAccountIds(companyId, signature);
|
|
|
mList = byteDanceVideoReportDailyMapper.videoInfoListDetailDesign(companyId, startDate,endDate,signature, accountIdsList);
|
|
@@ -468,7 +476,11 @@ public class ByteDanceVideoReportDailyServiceImpl extends ServiceImpl<ByteDanceV
|
|
|
String userId = sysUser.getId();
|
|
|
String roleCode = byteDanceVideoReportDailyMapper.getRoleCodeByUserId(userId);
|
|
|
|
|
|
- if(roleCode.equals(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN) || roleCode.equals("designTeamLeader") ){
|
|
|
+ //拥有头条视频报表权限的是 管理员-可看所有公司视频 设计组长-可看所在公司所有视频 设计-可以自己所在项目的所有视频
|
|
|
+ if(roleCode.equals(CtopRoleCodeConstant.COMMON_ROLE_CODE_ADMIN)
|
|
|
+ || roleCode.equals("designTeamLeader") || roleCode.equals("plan") ||
|
|
|
+ roleCode.equals("plane") || roleCode.equals("clip") || roleCode.equals("shot") || roleCode.equals("planeLeader")
|
|
|
+ ){
|
|
|
return 1;
|
|
|
}else{
|
|
|
return 0;
|