IndexController.java 1.47 KB
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
package com.lyms.talkonlineweb.controller;

import com.lyms.talkonlineweb.domain.TkRecordStatHInfo;
import com.lyms.talkonlineweb.result.BaseResponse;
import com.lyms.talkonlineweb.service.IndexService;
import com.lyms.talkonlineweb.service.TkRecordStatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("index")
public class IndexController {

@Autowired
private IndexService indexService;

@Autowired
private TkRecordStatService tkRecordStatService;

/**
* 访问统计
* @return
*/
@GetMapping("getVsStat")
public BaseResponse getVsStat(){
BaseResponse baseResponse=new BaseResponse();

Map<String,Object> rs=indexService.getVsStat();
baseResponse.setObject(rs);
return baseResponse;
}

/**
* 首页-今日问诊数量
* @param hid 不传默认返回所有医院今日问诊次数。
* @return
*/
@GetMapping("getTkRecordStatH")
public BaseResponse getTkRecordStatH(Integer hid){
BaseResponse baseResponse=new BaseResponse();
List<TkRecordStatHInfo> tkRecordStatH = tkRecordStatService.getTkRecordStatH(hid);
baseResponse.setObject(tkRecordStatH);
return baseResponse;
}

}