package com.willalp.web.controller.yiqing;

import com.willalp.common.core.controller.BaseController;
import com.willalp.common.core.domain.AjaxResult;
import com.willalp.yiqing.domain.vo.HomeDataVo;
import com.willalp.yiqing.domain.vo.PcuVo;
import com.willalp.yiqing.service.IHsPositiveContiguityUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 阳性及密接Controller
 *
 * @author willalp
 * @date 2022-05-15
 */
@RestController
@RequestMapping("/yiqing/home")
public class HsYiQingHomeIndexController extends BaseController {
    @Resource
    private IHsPositiveContiguityUserService pucService;

    /**
     * 查询人员首页数据
     */
    @GetMapping
    public AjaxResult homeData(PcuVo pcuVo) {
        long l = System.currentTimeMillis();
        HomeDataVo homeDataVo = pucService.homeData(pcuVo);
//        System.out.println(System.currentTimeMillis() - l + "ms");
        return AjaxResult.success(homeDataVo);
    }

}
