package com.bonus.sharedstation.app.controller;

import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.sharedstation.app.domain.TherapyAppointments;
import com.bonus.sharedstation.web.dto.NoticeInfoDTO;
import com.bonus.sharedstation.web.service.INoticeInfoService;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Tag(name = "app-公告")
@RestController
@RequestMapping("/information/noticeinfoapp")
public class NoticeInfoAppController {

    @Resource
    private INoticeInfoService formService;

    /**
     * 查询全部
     * @param firstAidInfoDTO
     * @return
     */
    @ApiOperation("获取全部数据")
    @PostMapping(value = "getOrderList", produces = "application/json; charset=utf-8")
    public AjaxResult selectAll(@RequestBody NoticeInfoDTO firstAidInfoDTO){
        return formService.selectAll(firstAidInfoDTO);
    }


    @PostMapping(value = "selectById", produces = "application/json; charset=utf-8")
    @ApiOperation("查询详情")
    public AjaxResult selectInfoById(@RequestBody NoticeInfoDTO firstAidInfoDTO){
        return formService.selectInfoById(firstAidInfoDTO);
    }

    @PostMapping(value = "selectDirCode", produces = "application/json; charset=utf-8")
    @ApiOperation("查询字典")
    public AjaxResult selectDirCode(@RequestBody TherapyAppointments dto) {
        return formService.selectDirCode(dto);
    }




}
