Bläddra i källkod

fix 去掉条件

zoujiajian 3 år sedan
förälder
incheckning
331602bbac

+ 1 - 1
netflix-service/src/main/java/com/cyksj/service/mange/statistics/StatisticsDataService.java

@@ -16,7 +16,7 @@ import java.util.List;
  *创建时间:2022/10/17 14:43
  */
 public interface StatisticsDataService {
-	Result<BackgroundDataView> getStatisticsByCondition(Integer type, Long startTime, Long endTime);
+	Result<BackgroundDataView> getStatisticsByCondition(Long startTime, Long endTime);
 
 	IPage<ExpiredAccountDataView> getExpiredAccountView(Boolean isCorpWx, String customerService, Long goodsId, Long skuId, String account, Boolean renewStatus, Boolean handleStatus, String cnAccount, String usAccount, Integer uid, Long startTime, Long endTime, Long start, Long limit);
 

+ 11 - 21
netflix-service/src/main/java/com/cyksj/service/mange/statistics/impl/StatisticsDataServiceImpl.java

@@ -69,7 +69,7 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 	private final GroupsMapper groupsMapper;
 
 	@Override
-	public Result<BackgroundDataView> getStatisticsByCondition(Integer type, Long startTime, Long endTime) {
+	public Result<BackgroundDataView> getStatisticsByCondition(Long startTime, Long endTime) {
 		BackgroundDataView backgroundDataView = new BackgroundDataView();
 		Date startDate = null;
 		Date endDate = null;
@@ -81,26 +81,16 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
 		}
 		//头部数据
 		headerData(backgroundDataView, startDate, endDate);
-		switch (type) {
-			case 1:
-				//流媒体账号
-				getStreamingAccountDataView(backgroundDataView, startDate, endDate);
-				//appleOne
-				getAppleOneDataView(backgroundDataView, startDate, endDate);
-				break;
-			case 2:
-				//实物数据
-				getRealGoodsData(backgroundDataView, startDate, endDate);
-				break;
-			case 3:
-				//注册账号数据
-				getRegisterAccountData(backgroundDataView, startDate, endDate);
-				break;
-			case 4:
-				//潮玩好物数据
-				getFashionGoodsData(backgroundDataView, startDate, endDate);
-				break;
-		}
+		//流媒体账号
+		getStreamingAccountDataView(backgroundDataView, startDate, endDate);
+		//appleOne
+		getAppleOneDataView(backgroundDataView, startDate, endDate);
+		//实物数据
+		getRealGoodsData(backgroundDataView, startDate, endDate);
+		//注册账号数据
+		getRegisterAccountData(backgroundDataView, startDate, endDate);
+		//潮玩好物数据
+		getFashionGoodsData(backgroundDataView, startDate, endDate);
 		return GatewayResponse.SUCCESS.newBuilder().toResult(backgroundDataView);
 	}
 

+ 2 - 2
netflix-web/src/main/java/com/cyksj/web/controller/manage/statistics/StatisticsDataController.java

@@ -86,8 +86,8 @@ public class StatisticsDataController {
 	 */
 	@GetMapping
 	@SaCheckPermission("statics:view")
-	public Result<BackgroundDataView> getStatisticsByCondition(@RequestParam(defaultValue = "1") Integer type, Long startTime, Long endTime) {
-		return statisticsDataService.getStatisticsByCondition(type, startTime, endTime);
+	public Result<BackgroundDataView> getStatisticsByCondition(Long startTime, Long endTime) {
+		return statisticsDataService.getStatisticsByCondition(startTime, endTime);
 	}
 
 	/**