package com.kym.miniapp.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.kym.common.R;
import com.kym.entity.queryParams.StationQueryParams;
import com.kym.service.WashStationService;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 洗车站点表 前端控制器
 * </p>
 *
 * @author skyline
 * @since 2024-09-11
 */
@RestController
@RequestMapping("/wash-station")
public class WashStationController {

    private final WashStationService washStationService;

    public WashStationController(WashStationService washStationService) {
        this.washStationService = washStationService;
    }

    /**
     * 获取洗车站点列表
     *
     * @param params
     * @return
     */
    @SaIgnore
    @PostMapping("/listStation")
    public R<?> listStationForApp(@ModelAttribute StationQueryParams params) {
        return R.success(washStationService.listStationForApp(params));
    }

}
