|
@@ -70,7 +70,7 @@ public class IndexStatisticsController {
|
|
|
if(userType == null) {
|
|
|
userType = 0;
|
|
|
}
|
|
|
- if(!"1".equals(medicalMallConfig.getStatics()) || (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)){
|
|
|
analysisPreviewDTO = redisCache.getCacheObject(String.format("%s:%d:%d",DATA_OVERVIEW_DEALER_ANALYSISPREVIEW,type,userType));
|
|
|
}else if(param.getCompanyId() != null){
|
|
|
analysisPreviewDTO = redisCache.getCacheObject(String.format("%s:%d:%d:%d",DATA_OVERVIEW_DEALER_ANALYSISPREVIEW,type,userType,param.getCompanyId()));
|
|
@@ -144,7 +144,7 @@ public class IndexStatisticsController {
|
|
|
@GetMapping("/rechargeComsumption")
|
|
|
public R rechargeComsumption(StatisticsDeptCompanyParam param){
|
|
|
ConsumptionBalanceDataDTO consumptionBalanceDataDTO = new ConsumptionBalanceDataDTO();
|
|
|
- if(!"1".equals(medicalMallConfig.getStatics()) || (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)) {
|
|
|
consumptionBalanceDataDTO = redisCache.getCacheObject(StatisticsRedisConstant.DATA_OVERVIEW_DEALER_BALANCE);
|
|
|
}else if(param.getCompanyId() != null){
|
|
|
consumptionBalanceDataDTO = redisCache.getCacheObject(String.format("%s:%d",DATA_OVERVIEW_DEALER_BALANCE,param.getCompanyId()));
|
|
@@ -179,9 +179,9 @@ public class IndexStatisticsController {
|
|
|
@GetMapping("/trafficLog")
|
|
|
public R getTrafficLog(StatisticsDeptCompanyParam param){
|
|
|
TrafficLogDTO result = new TrafficLogDTO();
|
|
|
- if(!"1".equals(medicalMallConfig.getStatics()) || (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)) {
|
|
|
result = redisCache.getCacheObject(DATA_OVERVIEW_TRAFFIC_LOG);
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics())) {
|
|
|
+ if (!medicalMallConfig.isStatics()) {
|
|
|
SysConfig sysConfig = sysConfigService.selectConfigByConfigKey("redPacket.Traffic.config");
|
|
|
if(result == null || sysConfig == null) {
|
|
|
return null;
|
|
@@ -247,7 +247,7 @@ public class IndexStatisticsController {
|
|
|
}
|
|
|
List<WatchEndPlayTrendDTO> watchEndPlayTrendDTOS;
|
|
|
// 参考watchCourseTopTen方法的处理逻辑
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics()) || (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);
|
|
|
watchEndPlayTrendDTOS = redisCache.getCacheObject(key);
|
|
|
}else if(param.getCompanyId() != null){
|
|
@@ -331,7 +331,7 @@ public class IndexStatisticsController {
|
|
|
}
|
|
|
List<DeaMemberTopTenDTO> deaMemberTopTenDTOS = new ArrayList<>();
|
|
|
// 参考deaMemberTopTen方法处理逻辑
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics()) || (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);
|
|
|
deaMemberTopTenDTOS = redisCache.getCacheObject(key);
|
|
|
}else if(param.getCompanyId() != null){
|
|
@@ -388,7 +388,7 @@ public class IndexStatisticsController {
|
|
|
Integer userType = param.getUserType();
|
|
|
List<RewardMoneyTopTenDTO> rewardMoneyTopTenDTOS = new ArrayList<>();
|
|
|
// 参考rewardMoneyTopTen方法处理逻辑
|
|
|
- if(!"1".equals(medicalMallConfig.getStatics()) || (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);
|
|
|
rewardMoneyTopTenDTOS = redisCache.getCacheObject(key);
|
|
|
}else if(param.getCompanyId() != null){
|
|
@@ -442,7 +442,7 @@ public class IndexStatisticsController {
|
|
|
Integer userType = param.getUserType();
|
|
|
List<RewardMoneyTrendDTO> rewardMoneyTrendDTOS = new ArrayList<>();
|
|
|
// 参考rewardMoneyTrend方法处理逻辑
|
|
|
- if(!"1".equals(medicalMallConfig.getStatics()) || (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);
|
|
|
rewardMoneyTrendDTOS = redisCache.getCacheObject(key);
|
|
|
}else if(param.getCompanyId() != null){
|
|
@@ -494,7 +494,7 @@ public class IndexStatisticsController {
|
|
|
Integer statisticalType = param.getStatisticalType();
|
|
|
Integer userType = param.getUserType();
|
|
|
List<CourseStatsDTO> courseStatsDTOS;
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics()) || (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));
|
|
|
}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()));
|
|
@@ -611,7 +611,7 @@ public class IndexStatisticsController {
|
|
|
@GetMapping("/dealerAggregated")
|
|
|
public R dealerAggregated(StatisticsDeptCompanyParam param){
|
|
|
DealerAggregatedDTO result = new DealerAggregatedDTO();
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics()) || (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)) {
|
|
|
result = redisCache.getCacheObject(StatisticsRedisConstant.DATA_OVERVIEW_DEALER_AGGREGATED);
|
|
|
}else if (param.getCompanyId() != null) {
|
|
|
result = redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_AGGREGATED, param.getCompanyId()));
|
|
@@ -666,7 +666,7 @@ public class IndexStatisticsController {
|
|
|
*/
|
|
|
@GetMapping("/smsBalance")
|
|
|
public R smsBalance(StatisticsDeptCompanyParam param){
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics()) || (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));
|
|
|
}else if(param.getCompanyId() != null){
|
|
|
return R.ok().put("data", redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_SMS_BALANCE, param.getCompanyId())));
|
|
@@ -692,7 +692,7 @@ public class IndexStatisticsController {
|
|
|
@GetMapping("/authorizationInfo")
|
|
|
public R authorizationInfo(StatisticsDeptCompanyParam param){
|
|
|
AuthorizationInfoDTO authorizationInfoDTO = new AuthorizationInfoDTO();
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics()) || (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));
|
|
|
}else if(param.getCompanyId() != null){
|
|
|
return R.ok().put("data", redisCache.getCacheObject(String.format("%s:%d", DATA_OVERVIEW_DEALER_AUTHORIZATION_INFO, param.getCompanyId())));
|
|
@@ -728,7 +728,7 @@ public class IndexStatisticsController {
|
|
|
*/
|
|
|
@GetMapping("/thisMonthOrderCount")
|
|
|
public R thisMonthOrderCount(StatisticsDeptCompanyParam param){
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics()) || (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 redisCache.getCacheObject(StatisticsRedisConstant.THIS_MONTH_ORDER_COUNT);
|
|
|
}else if(param.getCompanyId() != null){
|
|
|
return redisCache.getCacheObject(String.format("%s:%d", THIS_MONTH_ORDER_COUNT, param.getCompanyId()));
|
|
@@ -759,7 +759,7 @@ public class IndexStatisticsController {
|
|
|
|
|
|
@GetMapping("/thisMonthRecvCount")
|
|
|
public R thisMonthRecvCount(StatisticsDeptCompanyParam param){
|
|
|
- if (!"1".equals(medicalMallConfig.getStatics()) || (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 redisCache.getCacheObject(StatisticsRedisConstant.THIS_MONTH_RECV_COUNT);
|
|
|
}else if(param.getCompanyId() != null){
|
|
|
return redisCache.getCacheObject(String.format("%s:%d", THIS_MONTH_RECV_COUNT, param.getCompanyId()));
|