package com.sqx.modules.trip.controller.app;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.common.utils.DateUtils;
import com.sqx.common.utils.PageUtils;
import com.sqx.common.utils.Result;
import com.sqx.modules.trip.entity.Trip;
import com.sqx.modules.trip.service.TripService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
@RequestMapping("/app/trip")
@Api(value = "出行方式", tags = {"出行方式"})
public class AppTripController {

    @Autowired
    private TripService tripService;

    @GetMapping("/selectTripList")
    @ApiOperation("查询出行方式列表")
    public Result selectTripList(String city){
        return Result.success().put("data",tripService.list(new QueryWrapper<Trip>().like(StringUtils.isNotBlank(city),"city",city)));
    }



}
