|
@@ -83,6 +83,26 @@ public class KuaishouReportDailyAccountServiceImpl extends ServiceImpl<KuaishouR
|
|
|
return new PageInfo<>(dailyAccountMapper.getKuaishouProjectInfo(startDate,endDate,projectList,yn));
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouSaleAccountInfoByProjectId(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("admin".equals(roleCode)){
|
|
|
+ accountIds = dailyAccountMapper.getUserProjectAccountIdsByAdmin();
|
|
|
+ }else {
|
|
|
+ accountIds = dailyAccountMapper.getSaleProjectAccountIds(userId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ PageHelper.startPage(pageNum,pageSize);
|
|
|
+ return new PageInfo<>(dailyAccountMapper.getKuaishouAccountInfoByProjectId(startDate, endDate, projectId, accountIds, yn));
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public PageInfo<KuaishouReportDailyAccountDTO> getKuaishouAccountInfoByProjectId(Long projectId, String startDate, String endDate, Integer pageSize, Integer pageNum, Integer yn){
|