package com.moral.api.controller; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.moral.api.entity.CityConfigAqi; import com.moral.api.service.CityConfigAqiService; import com.moral.constant.ResultMessage; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.*; import java.util.Date; import java.util.List; /** * @ClassName pubController * @Description TODO * @Author @lizijie * @Date 2023-08-11 14:35 * @Version 1.0 */ @RestController @RequestMapping("/pub") @CrossOrigin(origins = "*", maxAge = 3600) @Api(tags = {"公共"}) public class pubController { @Autowired private CityConfigAqiService cityConfigAqiService; @GetMapping("cityAll") public ResultMessage airQualityBulletin(@RequestParam(required = false) @ApiParam(value = "regionCode",name = "城市code") String regionCode, @RequestParam(required = false) @ApiParam(value = "regionName",name = "城市名称") String regionName) { List list = cityConfigAqiService.listAll(regionCode,regionName); return ResultMessage.ok(list); } }