后台-myApi-diamondStat拆分两个时区
This commit is contained in:
@@ -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);
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user