1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- package com.fdkankan.tk.controller;
- import com.fdkankan.tk.common.ResultData;
- import com.fdkankan.tk.service.DataCountService;
- import com.fdkankan.tk.service.IRoomService;
- import org.omg.CORBA.INTERNAL;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- @RestController
- public class DataCountController {
- @Autowired
- DataCountService dataCountService;
- @Autowired
- IRoomService roomService;
- /**
- * 整体概况
- */
- @GetMapping("/roomData")
- public ResultData roomData(){
- return ResultData.ok(dataCountService.roomData());
- }
- /**
- * 排行榜
- */
- @GetMapping("/takeLookTop5")
- public ResultData takeLookTop5(){
- return ResultData.ok(dataCountService.takeLookTop5());
- }
- /**
- * 各时间段在线人数
- */
- @GetMapping("/onlineTimeCount")
- public ResultData onlineTimeCount(){
- return ResultData.ok(dataCountService.onlineTimeCount());
- }
- @GetMapping("/allRoomList")
- public ResultData allRoomList(){
- return ResultData.ok(roomService.list());
- }
- /**
- * 房间使用情况,用户流量量,用户分享数,留言人数,留言总数
- */
- @GetMapping("/roomVisitData")
- public ResultData roomVisitData(@RequestParam(required = false) String roomTitle,
- @RequestParam(required = false) String startTime,
- @RequestParam(required = false) String endTime){
- return ResultData.ok(dataCountService.roomVisitData(roomTitle,startTime,endTime));
- }
- /**
- * 整体数据列表
- */
- @GetMapping("/roomDataList")
- public ResultData roomDataList(@RequestParam(required = false) String roomTitle,
- @RequestParam(required = false) String startTime,
- @RequestParam(required = false) String endTime,
- @RequestParam(required = false,defaultValue = "1") Integer pageNum,
- @RequestParam(required = false,defaultValue = "10") Integer pageSize){
- return ResultData.ok(dataCountService.roomDataList(roomTitle,startTime,endTime,pageNum,pageSize));
- }
- /**
- * 房间留言列表
- */
- @GetMapping("/roomMsgList")
- public ResultData roomMsgList(@RequestParam(required = false) String roomTitle,
- @RequestParam(required = false) String startTime,
- @RequestParam(required = false) String endTime,
- @RequestParam(required = false,defaultValue = "1") Integer pageNum,
- @RequestParam(required = false,defaultValue = "10") Integer pageSize){
- return ResultData.ok(dataCountService.roomMsgList(roomTitle,startTime,endTime,pageNum,pageSize));
- }
- }
|