@ -27,87 +27,87 @@ public class SaleDataApi {
@GetMapping ( " /{day} " )
@Operation ( summary = " 获得输入日期的当天总售票数 " )
public CommonResult< Long> checkTicketTotal ( @PathVariable ( " day " ) String day ) {
return s uccess( s aleDataService. countBySddate ( day ) ) ;
public Long checkTicketTotal ( @PathVariable ( " day " ) String day ) {
return s aleDataService. countBySddate ( day ) ;
}
@GetMapping ( " /thisyear/{startTime} " )
@Operation ( summary = " 获得今年日期往前十天内的数据 " )
public CommonResult< List< Map < String , String > > > thisyearNum ( @PathVariable ( " startTime " ) String startTime ) {
return s uccess( s aleDataService. findCheckticketcountBytime ( startTime ) ) ;
public List< Map < String , String > > thisyearNum ( @PathVariable ( " startTime " ) String startTime ) {
return s aleDataService. findCheckticketcountBytime ( startTime ) ;
}
@GetMapping ( " /lastyear/{startTime} " )
@Operation ( summary = " 获得去年日期往前推十天的数据 " )
public CommonResult< List< Map < String , String > > > lastyearNum ( @PathVariable ( " startTime " ) String startTime ) {
return s uccess( s aleDataService. findCheckticketcountBytime ( startTime ) ) ;
public List< Map < String , String > > lastyearNum ( @PathVariable ( " startTime " ) String startTime ) {
return s aleDataService. findCheckticketcountBytime ( startTime ) ;
}
@GetMapping ( " /gender " )
@Operation ( summary = " 获得所有数据的男女数量 " )
public CommonResult< List< Map < String , String > > > findByGender ( ) {
return s uccess( s aleDataService. findByGender ( ) ) ;
public List< Map < String , String > > findByGender ( ) {
return s aleDataService. findByGender ( ) ;
}
@GetMapping ( " /age " )
@Operation ( summary = " 获得所有数据的年龄分段和数量 " )
public CommonResult< List< Map < String , String > > > findByage ( ) {
return s uccess( s aleDataService. findByAge ( ) ) ;
public List< Map < String , String > > findByage ( ) {
return s aleDataService. findByAge ( ) ;
}
@GetMapping ( " /lastyear/region " )
@Operation ( summary = " 查询去年各个省份的人数 " )
public CommonResult< List< Map < String , String > > > lastyearfindByregion ( ) {
return s uccess( s aleDataService. findByregion ( saleDataService . findEventsLastYear ( ) ) ) ;
public List< Map < String , String > > lastyearfindByregion ( ) {
return s aleDataService. findByregion ( saleDataService . findEventsLastYear ( ) ) ;
}
@GetMapping ( " /thisyear/region " )
@Operation ( summary = " 查询今年各个省份的人数 " )
public CommonResult< List< Map < String , String > > > thisyearfindByregion ( ) {
return s uccess( s aleDataService. findByregion ( saleDataService . findEventsThisYear ( ) ) ) ;
public List< Map < String , String > > thisyearfindByregion ( ) {
return s aleDataService. findByregion ( saleDataService . findEventsThisYear ( ) ) ;
}
@GetMapping ( " /salemethod " )
@Operation ( summary = " 查询各个销售渠道的购票人数 " )
public CommonResult< List< Map < String , String > > > findBysaleMethod ( ) {
return s uccess( s aleDataService. findBySaleMethod ( ) ) ;
public List< Map < String , String > > findBysaleMethod ( ) {
return s aleDataService. findBySaleMethod ( ) ;
}
@GetMapping ( " /wuyi/{x} " )
@Operation ( summary = " 查询最近前几年当年的五一期间的数据 " )
public CommonResult< List< Map < String , String > > > findByWuyi ( @PathVariable ( " x " ) int x ) {
return s uccess( s aleDataService. findWuyi ( x ) ) ;
public List< Map < String , String > > findByWuyi ( @PathVariable ( " x " ) int x ) {
return s aleDataService. findWuyi ( x ) ;
}
@GetMapping ( " /guoqing/{x} " )
@Operation ( summary = " 查询最近前几年当年的国庆期间的数据 " )
public CommonResult< List< Map < String , String > > > findByGuoqing ( @PathVariable ( " x " ) int x ) {
return s uccess( s aleDataService. findGuoqing ( x ) ) ;
public List< Map < String , String > > findByGuoqing ( @PathVariable ( " x " ) int x ) {
return s aleDataService. findGuoqing ( x ) ;
}
@GetMapping ( " /rijunthisyear/{startTime} " )
@Operation ( summary = " 查询今年对应日期的近三十天日均售票数量 " )
public CommonResult< String> findThisyearRijun ( @PathVariable ( " startTime " ) String startTime ) {
return s uccess( s aleDataService. findrijun ( startTime ) ) ;
public String findThisyearRijun ( @PathVariable ( " startTime " ) String startTime ) {
return s aleDataService. findrijun ( startTime ) ;
}
@GetMapping ( " /rijunlastyear/{startTime} " )
@Operation ( summary = " 查询去年对应日期的近三十天日均售票数量 " )
public CommonResult< String> findLastyearRijun ( @PathVariable ( " startTime " ) String startTime ) {
return s uccess( s aleDataService. findrijun ( startTime ) ) ;
public String findLastyearRijun ( @PathVariable ( " startTime " ) String startTime ) {
return s aleDataService. findrijun ( startTime ) ;
}
/ / TODO 年度平均什么 , 并没有说清楚 , 原代码是直接计算一年的总金额
@GetMapping ( " /thisyear/nianjun " )
@Operation ( summary = " 查询今年年度售票平均金额 " )
public CommonResult< BigDecimal> findmoneythisyear ( ) {
return s uccess( s aleDataService. findyearJun ( saleDataService . findEventsThisYear ( ) ) ) ;
public BigDecimal findmoneythisyear ( ) {
return s aleDataService. findyearJun ( saleDataService . findEventsThisYear ( ) ) ;
}
@GetMapping ( " /lastyear/nianjun " )
@Operation ( summary = " 查询去年年度售票平均金额 " )
public CommonResult< BigDecimal> findmoneylastyear ( ) {
return s uccess( s aleDataService. findyearJun ( saleDataService . findEventsLastYear ( ) ) ) ;
public BigDecimal findmoneylastyear ( ) {
return s aleDataService. findyearJun ( saleDataService . findEventsLastYear ( ) ) ;
}
}