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;
}
}