|
@@ -83,14 +83,14 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouSaleAccountInfoByProjectId(Long projectId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
+ public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouSaleAccountInfoByProjectId(List<Long> projectList, Long projectId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
//String userId = "e9ca23d68d884d4ebb19d07889727dae";
|
|
|
String userId = sysUser.getId();
|
|
|
String roleCode = dailyAccountMapper.getRoleCodeByUserId(userId);
|
|
|
|
|
|
List<Long> accountIds = null;
|
|
|
- if(projectId == null){
|
|
|
+ if(projectList == null && projectId==null){
|
|
|
if("admin".equals(roleCode)){
|
|
|
accountIds = dailyAccountMapper.getUserProjectAccountIdsByAdmin(0);
|
|
|
}else {
|
|
@@ -99,19 +99,23 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
|
|
|
}
|
|
|
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
- return new PageInfo<>(dailyAccountMapper.getKuaishouAccountInfoByProjectId(startDate, endDate, projectId, accountIds, yn));
|
|
|
+ return new PageInfo<>(dailyAccountMapper.getKuaishouAccountInfoByProjectId(projectId, startDate, endDate, projectList, accountIds, yn));
|
|
|
}
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouAccountInfoByProjectId(Long projectId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
+ public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouAccountInfoByProjectId(Long projectId, List<Long> projectList, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
//String userId = "e9ca23d68d884d4ebb19d07889727dae";
|
|
|
String userId = sysUser.getId();
|
|
|
String roleCode = dailyAccountMapper.getRoleCodeByUserId(userId);
|
|
|
|
|
|
+ //List<Long> mediaIds = new ArrayList<>();
|
|
|
+ //mediaIds.add(2L);
|
|
|
+ //mediaIds.add(4L);
|
|
|
+
|
|
|
List<Long> accountIds = null;
|
|
|
- if(projectId == null){
|
|
|
+ if(projectId==null && projectList==null){
|
|
|
if("admin".equals(roleCode)){
|
|
|
accountIds = dailyAccountMapper.getUserProjectAccountIdsByAdmin(0);
|
|
|
}else {
|
|
@@ -120,18 +124,18 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
|
|
|
}
|
|
|
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
- return new PageInfo<>(dailyAccountMapper.getKuaishouAccountInfoByProjectId(startDate, endDate, projectId, accountIds, yn));
|
|
|
+ return new PageInfo<>(dailyAccountMapper.getKuaishouAccountInfoByProjectId(projectId, startDate, endDate, projectList, accountIds, yn));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouCampaignInfoByAccountId(Long accountId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
+ public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouCampaignInfoByAccountId(List<Long> projectList, Long accountId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
//String userId = "e9ca23d68d884d4ebb19d07889727dae";
|
|
|
String userId = sysUser.getId();
|
|
|
String roleCode = dailyAccountMapper.getRoleCodeByUserId(userId);
|
|
|
|
|
|
List<Long> accountIds = null;
|
|
|
- if(accountId == null){
|
|
|
+ if(accountId == null && projectList==null){
|
|
|
if("admin".equals(roleCode)){
|
|
|
accountIds = dailyAccountMapper.getUserProjectAccountIdsByAdmin(1);
|
|
|
}else {
|
|
@@ -140,11 +144,11 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
|
|
|
}
|
|
|
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
- return new PageInfo<>(dailyAccountMapper.getKuaishouCampaignInfoByAccountId(startDate, endDate, accountId,accountIds,yn));
|
|
|
+ return new PageInfo<>(dailyAccountMapper.getKuaishouCampaignInfoByAccountId(projectList, startDate, endDate, accountId,accountIds,yn));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouUnitInfoByCampaignId(Long campaignId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
+ public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouUnitInfoByCampaignId(List<Long> projectList, Long campaignId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
//String userId = "e9ca23d68d884d4ebb19d07889727dae";
|
|
@@ -152,7 +156,7 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
|
|
|
String roleCode = dailyAccountMapper.getRoleCodeByUserId(userId);
|
|
|
|
|
|
List<Long> accountIds = null;
|
|
|
- if(campaignId == null){
|
|
|
+ if(campaignId == null && projectList == null){
|
|
|
if("admin".equals(roleCode)){
|
|
|
accountIds = dailyAccountMapper.getUserProjectAccountIdsByAdmin(1);
|
|
|
}else {
|
|
@@ -161,18 +165,18 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
|
|
|
}
|
|
|
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
- return new PageInfo<>(dailyAccountMapper.getKuaishouUnitInfoByCampaignId(startDate, endDate, campaignId,accountIds, yn));
|
|
|
+ return new PageInfo<>(dailyAccountMapper.getKuaishouUnitInfoByCampaignId(projectList, startDate, endDate, campaignId,accountIds, yn));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouCreativeInfoByUnitId(Long unitId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
+ public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouCreativeInfoByUnitId(List<Long> projectList, Long unitId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
//String userId = "e9ca23d68d884d4ebb19d07889727dae";
|
|
|
String userId = sysUser.getId();
|
|
|
String roleCode = dailyAccountMapper.getRoleCodeByUserId(userId);
|
|
|
|
|
|
List<Long> accountIds = null;
|
|
|
- if(unitId == null){
|
|
|
+ if(unitId == null && projectList ==null){
|
|
|
if("admin".equals(roleCode)){
|
|
|
accountIds = dailyAccountMapper.getUserProjectAccountIdsByAdmin(1);
|
|
|
}else {
|
|
@@ -181,7 +185,7 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
|
|
|
}
|
|
|
|
|
|
PageHelper.startPage(pageNum,pageSize);
|
|
|
- List<KuaishouReportDailyAccountDTO> kuaishouCreativeInfoList = dailyAccountMapper.getKuaishouCreativeInfoByUnitId(startDate, endDate, unitId,accountIds, yn);
|
|
|
+ List<KuaishouReportDailyAccountDTO> kuaishouCreativeInfoList = dailyAccountMapper.getKuaishouCreativeInfoByUnitId(projectList, startDate, endDate, unitId,accountIds, yn);
|
|
|
//for(KuaishouReportDailyAccountDTO creativeInfo:kuaishouCreativeInfoList){
|
|
|
// KuaishouVideoInfoDTO videoInfo = dailyAccountMapper.getVideoUrl(creativeInfo.getPhotoId());
|
|
|
// creativeInfo.setUrl(videoInfo.getUrl());
|