|
@@ -261,10 +261,10 @@ public class IndexStatisticsController {
|
|
|
// 参考watchCourseTopTen方法的处理逻辑
|
|
// 参考watchCourseTopTen方法的处理逻辑
|
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
|
String key = String.format("%s:%d:%d", DATA_OVERVIEW_DEALER_CHARTS, type,userType);
|
|
String key = String.format("%s:%d:%d", DATA_OVERVIEW_DEALER_CHARTS, type,userType);
|
|
|
- watchEndPlayTrendDTOS = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ watchEndPlayTrendDTOS = redisCache.getCacheObjectList(key, WatchEndPlayTrendDTO.class);
|
|
|
}else if(param.getCompanyId() != null){
|
|
}else if(param.getCompanyId() != null){
|
|
|
String key = String.format("%s:%d:%d:%d", DATA_OVERVIEW_DEALER_CHARTS, type,userType,param.getCompanyId());
|
|
String key = String.format("%s:%d:%d:%d", DATA_OVERVIEW_DEALER_CHARTS, type,userType,param.getCompanyId());
|
|
|
- watchEndPlayTrendDTOS = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ watchEndPlayTrendDTOS = redisCache.getCacheObjectList(key, WatchEndPlayTrendDTO.class);
|
|
|
}else{
|
|
}else{
|
|
|
Company company = new Company();
|
|
Company company = new Company();
|
|
|
company.setDeptId(param.getDeptId());
|
|
company.setDeptId(param.getDeptId());
|
|
@@ -272,7 +272,7 @@ public class IndexStatisticsController {
|
|
|
List<WatchEndPlayTrendDTO> tempDTOS = new ArrayList<>();
|
|
List<WatchEndPlayTrendDTO> tempDTOS = new ArrayList<>();
|
|
|
for(Long companyId : companyIds){
|
|
for(Long companyId : companyIds){
|
|
|
String key = String.format("%s:%d:%d:%d", DATA_OVERVIEW_DEALER_CHARTS, type,userType,companyId);
|
|
String key = String.format("%s:%d:%d:%d", DATA_OVERVIEW_DEALER_CHARTS, type,userType,companyId);
|
|
|
- List<WatchEndPlayTrendDTO> companyData = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ List<WatchEndPlayTrendDTO> companyData = redisCache.getCacheObjectList(key, WatchEndPlayTrendDTO.class);
|
|
|
if (companyData != null) {
|
|
if (companyData != null) {
|
|
|
tempDTOS.addAll(companyData);
|
|
tempDTOS.addAll(companyData);
|
|
|
}
|
|
}
|
|
@@ -345,10 +345,10 @@ public class IndexStatisticsController {
|
|
|
// 参考deaMemberTopTen方法处理逻辑
|
|
// 参考deaMemberTopTen方法处理逻辑
|
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
|
String key = String.format("%s:%d:%d:%d", CHARTS_MEMBER_TOP_TEN_WATCH, type, statisticalType,userType);
|
|
String key = String.format("%s:%d:%d:%d", CHARTS_MEMBER_TOP_TEN_WATCH, type, statisticalType,userType);
|
|
|
- deaMemberTopTenDTOS = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ deaMemberTopTenDTOS = redisCache.getCacheObjectList(key, DeaMemberTopTenDTO.class);
|
|
|
}else if(param.getCompanyId() != null){
|
|
}else if(param.getCompanyId() != null){
|
|
|
String key = String.format("%s:%d:%d:%d:%d", CHARTS_MEMBER_TOP_TEN_WATCH, type, statisticalType,userType,param.getCompanyId());
|
|
String key = String.format("%s:%d:%d:%d:%d", CHARTS_MEMBER_TOP_TEN_WATCH, type, statisticalType,userType,param.getCompanyId());
|
|
|
- deaMemberTopTenDTOS = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ deaMemberTopTenDTOS = redisCache.getCacheObjectList(key, DeaMemberTopTenDTO.class);
|
|
|
}else{
|
|
}else{
|
|
|
Company company = new Company();
|
|
Company company = new Company();
|
|
|
company.setDeptId(param.getDeptId());
|
|
company.setDeptId(param.getDeptId());
|
|
@@ -356,7 +356,7 @@ public class IndexStatisticsController {
|
|
|
List<DeaMemberTopTenDTO> tempDTOS = new ArrayList<>();
|
|
List<DeaMemberTopTenDTO> tempDTOS = new ArrayList<>();
|
|
|
for(Long companyId : companyIds){
|
|
for(Long companyId : companyIds){
|
|
|
String key = String.format("%s:%d:%d:%d:%d", CHARTS_MEMBER_TOP_TEN_WATCH, type, statisticalType,userType,companyId);
|
|
String key = String.format("%s:%d:%d:%d:%d", CHARTS_MEMBER_TOP_TEN_WATCH, type, statisticalType,userType,companyId);
|
|
|
- List<DeaMemberTopTenDTO> companyData = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ List<DeaMemberTopTenDTO> companyData = redisCache.getCacheObjectList(key, DeaMemberTopTenDTO.class);
|
|
|
if (companyData != null) {
|
|
if (companyData != null) {
|
|
|
tempDTOS.addAll(companyData);
|
|
tempDTOS.addAll(companyData);
|
|
|
}
|
|
}
|
|
@@ -402,10 +402,10 @@ public class IndexStatisticsController {
|
|
|
// 参考rewardMoneyTopTen方法处理逻辑
|
|
// 参考rewardMoneyTopTen方法处理逻辑
|
|
|
if(!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
if(!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
|
String key = String.format("%s:%d:%d:%d", CHARTS_REWARD_MONEY_TOP_TEN, type,dataType,userType);
|
|
String key = String.format("%s:%d:%d:%d", CHARTS_REWARD_MONEY_TOP_TEN, type,dataType,userType);
|
|
|
- rewardMoneyTopTenDTOS = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ rewardMoneyTopTenDTOS = redisCache.getCacheObjectList(key, RewardMoneyTopTenDTO.class);
|
|
|
}else if(param.getCompanyId() != null){
|
|
}else if(param.getCompanyId() != null){
|
|
|
String key = String.format("%s:%d:%d:%d:%d", CHARTS_REWARD_MONEY_TOP_TEN, type,dataType,userType,param.getCompanyId());
|
|
String key = String.format("%s:%d:%d:%d:%d", CHARTS_REWARD_MONEY_TOP_TEN, type,dataType,userType,param.getCompanyId());
|
|
|
- rewardMoneyTopTenDTOS = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ rewardMoneyTopTenDTOS = redisCache.getCacheObjectList(key, RewardMoneyTopTenDTO.class);
|
|
|
}else{
|
|
}else{
|
|
|
Company company = new Company();
|
|
Company company = new Company();
|
|
|
company.setDeptId(param.getDeptId());
|
|
company.setDeptId(param.getDeptId());
|
|
@@ -413,7 +413,7 @@ public class IndexStatisticsController {
|
|
|
List<RewardMoneyTopTenDTO> tempDTOS = new ArrayList<>();
|
|
List<RewardMoneyTopTenDTO> tempDTOS = new ArrayList<>();
|
|
|
for(Long companyId : companyIds){
|
|
for(Long companyId : companyIds){
|
|
|
String key = String.format("%s:%d:%d:%d:%d", CHARTS_REWARD_MONEY_TOP_TEN, type,dataType,userType,companyId);
|
|
String key = String.format("%s:%d:%d:%d:%d", CHARTS_REWARD_MONEY_TOP_TEN, type,dataType,userType,companyId);
|
|
|
- List<RewardMoneyTopTenDTO> companyData = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ List<RewardMoneyTopTenDTO> companyData = redisCache.getCacheObjectList(key, RewardMoneyTopTenDTO.class);
|
|
|
if (companyData != null) {
|
|
if (companyData != null) {
|
|
|
tempDTOS.addAll(companyData);
|
|
tempDTOS.addAll(companyData);
|
|
|
}
|
|
}
|
|
@@ -456,10 +456,10 @@ public class IndexStatisticsController {
|
|
|
// 参考rewardMoneyTrend方法处理逻辑
|
|
// 参考rewardMoneyTrend方法处理逻辑
|
|
|
if(!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
if(!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
|
String key = String.format("%s:%d:%d", CHARTS_REWARD_MONEY_TREND, type,userType);
|
|
String key = String.format("%s:%d:%d", CHARTS_REWARD_MONEY_TREND, type,userType);
|
|
|
- rewardMoneyTrendDTOS = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ rewardMoneyTrendDTOS = redisCache.getCacheObjectList(key, RewardMoneyTrendDTO.class);
|
|
|
}else if(param.getCompanyId() != null){
|
|
}else if(param.getCompanyId() != null){
|
|
|
String key = String.format("%s:%d:%d:%d", CHARTS_REWARD_MONEY_TREND, type,userType,param.getCompanyId());
|
|
String key = String.format("%s:%d:%d:%d", CHARTS_REWARD_MONEY_TREND, type,userType,param.getCompanyId());
|
|
|
- rewardMoneyTrendDTOS = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ rewardMoneyTrendDTOS = redisCache.getCacheObjectList(key, RewardMoneyTrendDTO.class);
|
|
|
}else{
|
|
}else{
|
|
|
Company company = new Company();
|
|
Company company = new Company();
|
|
|
company.setDeptId(param.getDeptId());
|
|
company.setDeptId(param.getDeptId());
|
|
@@ -467,7 +467,7 @@ public class IndexStatisticsController {
|
|
|
List<RewardMoneyTrendDTO> tempDTOS = new ArrayList<>();
|
|
List<RewardMoneyTrendDTO> tempDTOS = new ArrayList<>();
|
|
|
for(Long companyId : companyIds){
|
|
for(Long companyId : companyIds){
|
|
|
String key = String.format("%s:%d:%d:%d", CHARTS_REWARD_MONEY_TREND, type,userType,companyId);
|
|
String key = String.format("%s:%d:%d:%d", CHARTS_REWARD_MONEY_TREND, type,userType,companyId);
|
|
|
- List<RewardMoneyTrendDTO> companyData = redisCache.getCacheObject(key);
|
|
|
|
|
|
|
+ List<RewardMoneyTrendDTO> companyData = redisCache.getCacheObjectList(key, RewardMoneyTrendDTO.class);
|
|
|
if (companyData != null) {
|
|
if (companyData != null) {
|
|
|
tempDTOS.addAll(companyData);
|
|
tempDTOS.addAll(companyData);
|
|
|
}
|
|
}
|
|
@@ -507,16 +507,16 @@ public class IndexStatisticsController {
|
|
|
Integer userType = param.getUserType();
|
|
Integer userType = param.getUserType();
|
|
|
List<CourseStatsDTO> courseStatsDTOS;
|
|
List<CourseStatsDTO> courseStatsDTOS;
|
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
|
- courseStatsDTOS = redisCache.getCacheObject(String.format("%s:%d:%d:%d:%s", CHARTS_WATCH_TOP_TEN, type,statisticalType,userType,sort));
|
|
|
|
|
|
|
+ courseStatsDTOS = redisCache.getCacheObjectList(String.format("%s:%d:%d:%d:%s", CHARTS_WATCH_TOP_TEN, type,statisticalType,userType,sort), CourseStatsDTO.class);
|
|
|
}else if(param.getCompanyId() != null){
|
|
}else if(param.getCompanyId() != null){
|
|
|
- courseStatsDTOS = redisCache.getCacheObject(String.format("%s:%d:%d:%d:%s:%d", CHARTS_WATCH_TOP_TEN, type,statisticalType,userType,sort,param.getCompanyId()));
|
|
|
|
|
|
|
+ courseStatsDTOS = redisCache.getCacheObjectList(String.format("%s:%d:%d:%d:%s:%d", CHARTS_WATCH_TOP_TEN, type,statisticalType,userType,sort,param.getCompanyId()), CourseStatsDTO.class);
|
|
|
}else{
|
|
}else{
|
|
|
Company company = new Company();
|
|
Company company = new Company();
|
|
|
company.setDeptId(param.getDeptId());
|
|
company.setDeptId(param.getDeptId());
|
|
|
Long[] companyIds = companyService.selectCompanyList(company).stream().map(Company::getCompanyId).toArray(Long[]::new);
|
|
Long[] companyIds = companyService.selectCompanyList(company).stream().map(Company::getCompanyId).toArray(Long[]::new);
|
|
|
List<CourseStatsDTO> tempDTOS = new ArrayList<>();
|
|
List<CourseStatsDTO> tempDTOS = new ArrayList<>();
|
|
|
for(Long companyId : companyIds){
|
|
for(Long companyId : companyIds){
|
|
|
- List<CourseStatsDTO> companyDTO = redisCache.getCacheObject(String.format("%s:%d:%d:%d:%s:%d", CHARTS_WATCH_TOP_TEN, type,statisticalType,userType,sort,companyId));
|
|
|
|
|
|
|
+ List<CourseStatsDTO> companyDTO = redisCache.getCacheObjectList(String.format("%s:%d:%d:%d:%s:%d", CHARTS_WATCH_TOP_TEN, type,statisticalType,userType,sort,companyId), CourseStatsDTO.class);
|
|
|
if (companyDTO != null) {
|
|
if (companyDTO != null) {
|
|
|
tempDTOS.addAll(companyDTO);
|
|
tempDTOS.addAll(companyDTO);
|
|
|
}
|
|
}
|
|
@@ -685,7 +685,7 @@ public class IndexStatisticsController {
|
|
|
@GetMapping("/smsBalance")
|
|
@GetMapping("/smsBalance")
|
|
|
public R smsBalance(StatisticsDeptCompanyParam param){
|
|
public R smsBalance(StatisticsDeptCompanyParam param){
|
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
|
- return R.ok().put("data", redisCache.getCacheObject(StatisticsRedisConstant.DATA_OVERVIEW_DEALER_SMS_BALANCE));
|
|
|
|
|
|
|
+ return R.ok().put("data", redisCache.getCacheObject(StatisticsRedisConstant.DATA_OVERVIEW_DEALER_SMS_BALANCE, Long.class));
|
|
|
}else if(param.getCompanyId() != null){
|
|
}else if(param.getCompanyId() != null){
|
|
|
return R.ok().put("data", redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_SMS_BALANCE, param.getCompanyId())));
|
|
return R.ok().put("data", redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_SMS_BALANCE, param.getCompanyId())));
|
|
|
}else{
|
|
}else{
|
|
@@ -694,7 +694,7 @@ public class IndexStatisticsController {
|
|
|
long smsBalance = 0L;
|
|
long smsBalance = 0L;
|
|
|
Long[] companyIds = companyService.selectCompanyList(company).stream().map(Company::getCompanyId).toArray(Long[]::new);
|
|
Long[] companyIds = companyService.selectCompanyList(company).stream().map(Company::getCompanyId).toArray(Long[]::new);
|
|
|
for(Long companyId : companyIds) {
|
|
for(Long companyId : companyIds) {
|
|
|
- Long smsBalanceCompany = redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_SMS_BALANCE, companyId));
|
|
|
|
|
|
|
+ Long smsBalanceCompany = redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_SMS_BALANCE, companyId), Long.class);
|
|
|
if (smsBalanceCompany != null) {
|
|
if (smsBalanceCompany != null) {
|
|
|
smsBalance += smsBalanceCompany;
|
|
smsBalance += smsBalanceCompany;
|
|
|
}
|
|
}
|
|
@@ -711,7 +711,7 @@ public class IndexStatisticsController {
|
|
|
public R authorizationInfo(StatisticsDeptCompanyParam param){
|
|
public R authorizationInfo(StatisticsDeptCompanyParam param){
|
|
|
AuthorizationInfoDTO authorizationInfoDTO = new AuthorizationInfoDTO();
|
|
AuthorizationInfoDTO authorizationInfoDTO = new AuthorizationInfoDTO();
|
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
if (!medicalMallConfig.isStatics() || (param.getCompanyId() == null && param.getDeptId() == null) || (param.getCompanyId() == null && param.getDeptId() == 1)){
|
|
|
- return R.ok().put("data", redisCache.getCacheObject(StatisticsRedisConstant.DATA_OVERVIEW_DEALER_AUTHORIZATION_INFO));
|
|
|
|
|
|
|
+ return R.ok().put("data", redisCache.getCacheObject(StatisticsRedisConstant.DATA_OVERVIEW_DEALER_AUTHORIZATION_INFO, AuthorizationInfoDTO.class));
|
|
|
}else if(param.getCompanyId() != null){
|
|
}else if(param.getCompanyId() != null){
|
|
|
return R.ok().put("data", redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_AUTHORIZATION_INFO, param.getCompanyId())));
|
|
return R.ok().put("data", redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_AUTHORIZATION_INFO, param.getCompanyId())));
|
|
|
}else{
|
|
}else{
|
|
@@ -720,7 +720,7 @@ public class IndexStatisticsController {
|
|
|
AuthorizationInfoDTO authorizationInfoDTO1 = new AuthorizationInfoDTO();
|
|
AuthorizationInfoDTO authorizationInfoDTO1 = new AuthorizationInfoDTO();
|
|
|
Long[] companyIds = companyService.selectCompanyList(company).stream().map(Company::getCompanyId).toArray(Long[]::new);
|
|
Long[] companyIds = companyService.selectCompanyList(company).stream().map(Company::getCompanyId).toArray(Long[]::new);
|
|
|
for(Long companyId : companyIds) {
|
|
for(Long companyId : companyIds) {
|
|
|
- AuthorizationInfoDTO companyDTO = redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_AUTHORIZATION_INFO, companyId));
|
|
|
|
|
|
|
+ AuthorizationInfoDTO companyDTO = redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_AUTHORIZATION_INFO, companyId), AuthorizationInfoDTO.class);
|
|
|
log.info("授权信息:{}", authorizationInfoDTO);
|
|
log.info("授权信息:{}", authorizationInfoDTO);
|
|
|
if (companyDTO != null) {
|
|
if (companyDTO != null) {
|
|
|
authorizationInfoDTO1.setTodayWatchUserCount(
|
|
authorizationInfoDTO1.setTodayWatchUserCount(
|