后台-myApi-diamondStat拆分两个时区

This commit is contained in:
2025-09-07 11:06:37 +08:00
parent b74b467cf7
commit 3fb754a359
2 changed files with 19 additions and 4 deletions

View File

@@ -618,12 +618,18 @@ public class MyApiService {
}); });
} }
public void diamondStat(String date) { public void diamondStatAr(String date) {
List<Integer> partitionIds = List.of(PartitionEnum.ARAB.getId(), PartitionEnum.TURKEY.getId()); List<Integer> partitionIds = List.of(PartitionEnum.ARAB.getId(), PartitionEnum.TURKEY.getId());
Date now = DateTimeUtil.convertStrToDate(date, DateTimeUtil.DEFAULT_DATE_PATTERN); Date now = DateTimeUtil.convertStrToDate(date, DateTimeUtil.DEFAULT_DATE_PATTERN);
diamondStatService.stat(partitionIds, now); diamondStatService.stat(partitionIds, now);
} }
public void diamondStatEn(String date) {
List<Integer> partitionIds = List.of(PartitionEnum.ENGLISH.getId(), PartitionEnum.CHINESE.getId(), PartitionEnum.ENGLISH2.getId());
Date now = DateTimeUtil.convertStrToDate(date, DateTimeUtil.DEFAULT_DATE_PATTERN);
diamondStatService.stat(partitionIds, now);
}
public void dauStat(String date) { public void dauStat(String date) {
Date now = DateTimeUtil.convertStrToDate(date, DateTimeUtil.DEFAULT_DATE_PATTERN); Date now = DateTimeUtil.convertStrToDate(date, DateTimeUtil.DEFAULT_DATE_PATTERN);
String yesterday = DateTimeUtil.convertDate(DateTimeUtil.addDays(now, -1), DateTimeUtil.DEFAULT_DATE_PATTERN); String yesterday = DateTimeUtil.convertDate(DateTimeUtil.addDays(now, -1), DateTimeUtil.DEFAULT_DATE_PATTERN);

View File

@@ -220,12 +220,21 @@ public class MyApiController {
return BusiResult.success(); return BusiResult.success();
} }
@GetMapping("/diamondStat") @GetMapping("/diamondStatAr")
public BusiResult<Void> diamondStat(Long roomId, String date) { public BusiResult<Void> diamondStatAr(Long roomId, String date) {
if (null == roomId || !roomId.equals(603L)) { if (null == roomId || !roomId.equals(603L)) {
throw new AdminServiceException(BusiStatus.PARAMERROR); throw new AdminServiceException(BusiStatus.PARAMERROR);
} }
myApiService.diamondStat(date); myApiService.diamondStatAr(date);
return BusiResult.success();
}
@GetMapping("/diamondStatEn")
public BusiResult<Void> diamondStatEn(Long roomId, String date) {
if (null == roomId || !roomId.equals(603L)) {
throw new AdminServiceException(BusiStatus.PARAMERROR);
}
myApiService.diamondStatEn(date);
return BusiResult.success(); return BusiResult.success();
} }