package com.zbkj.front.controller;

import com.zbkj.common.response.CommonResult;
import com.zbkj.common.response.DeliveryTimeResponse;
import com.zbkj.service.service.DeliverySetTimeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("api/front/delivery")
@Api(tags = "配送时间")
public class DeliveryTimeController {

    @Autowired
    private DeliverySetTimeService deliverySetTimeService;

    @ApiOperation(value = "配送时间")
    @RequestMapping(value = "/times", method = RequestMethod.GET)
    public CommonResult<List<DeliveryTimeResponse>> getList() {
        List<DeliveryTimeResponse> res = deliverySetTimeService.getDeliveryTime();
        return CommonResult.success(res);
    }
}



