package com.dsh.course.controller;
|
|
import com.dsh.course.entity.HotAddress;
|
import com.dsh.course.service.IHotAddressService;
|
import io.swagger.annotations.Api;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* 热门地址
|
*/
|
@Api
|
@RestController
|
@RequestMapping("/api/hotAddress")
|
public class HotAddressController {
|
|
@Autowired
|
private IHotAddressService hotAddressService;
|
|
|
/**
|
* 获取开通城市列表
|
*
|
* @return
|
*/
|
@PostMapping("/queryHotAddress")
|
public List<HotAddress> queryOpenCity(@RequestBody Integer cityId) {
|
try {
|
List<HotAddress> list = hotAddressService.selectHotAddressByCityId(cityId);
|
return list;
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
return null;
|
}
|
|
}
|