package com.pnkx.web.controller.life;

import com.pnkx.common.core.controller.BaseController;
import com.pnkx.common.core.domain.AjaxResult;
import com.pnkx.domain.po.PxCommemorationDay;
import com.pnkx.service.IPxCommemorationDayService;
import com.pnkx.service.IPxMenstruationRecordService;
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;

/**
 * @author by PHY
 * @classname PxHomepageController
 * @date 2022/4/6 17:40
 * @description: 描述
 */
@RestController
@RequestMapping("/homepage")
public class PxAppHomepageController extends BaseController {

    @Resource
    IPxCommemorationDayService pxCommemorationDayService;
    @Resource
    private IPxMenstruationRecordService pxMenstruationRecordService;

    /**
     * APP首页查询纪念日列表
     */
    @GetMapping("/getCommemorationDayList")
    public AjaxResult getCommemorationDayList(PxCommemorationDay pxCommemorationDay) {
        return AjaxResult.success("获取首页纪念日列表成功", pxCommemorationDayService.getCommemorationDayList(pxCommemorationDay));
    }

    /**
     * APP首页获取姨妈提醒列表
     */
    @GetMapping("/selectMenstruationRecordList")
    public AjaxResult selectMenstruationRecordList(com.pnkx.domain.po.PxMenstruationRecord pxMenstruationRecord) {
        return AjaxResult.success("获取首页姨妈提醒列表成功", pxMenstruationRecordService.selectMenstruationRecordList(pxMenstruationRecord));
    }
}
