后台-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());
Date now = DateTimeUtil.convertStrToDate(date, DateTimeUtil.DEFAULT_DATE_PATTERN);
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) {
Date now = DateTimeUtil.convertStrToDate(date, 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();
}
@GetMapping("/diamondStat")
public BusiResult<Void> diamondStat(Long roomId, String date) {
@GetMapping("/diamondStatAr")
public BusiResult<Void> diamondStatAr(Long roomId, String date) {
if (null == roomId || !roomId.equals(603L)) {
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();
}