package me.zhengjie.modules.dmApp;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.AnonymousAccess;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.dm.daypc.service.DmDayPcService;
import me.zhengjie.modules.dm.daypc.service.dto.DmDayPcQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@Api(tags = "App 排菜接口")
@RequestMapping("/app/daypc")
public class AppDaypcController {

    private final DmDayPcService dmDayPcService;

    @AnonymousAccess
    @GetMapping
    @Log("查询daypc")
    @ApiOperation("查询daypc")
    public ResponseEntity<Object> query(DmDayPcQueryCriteria criteria, Pageable pageable){
        return new ResponseEntity<>(dmDayPcService.queryAll(criteria,pageable), HttpStatus.OK);
    }

}
