package com.ruoyi.chargingPile.controller;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.ruoyi.chargingPile.api.model.TChargingPile;
|
import com.ruoyi.chargingPile.api.query.TChargingGunQuery;
|
import com.ruoyi.chargingPile.api.vo.TChargingGunVO;
|
import com.ruoyi.chargingPile.service.TChargingGunService;
|
import com.ruoyi.chargingPile.service.TChargingPileService;
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
import com.ruoyi.common.core.web.page.PageInfo;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 充电桩 前端控制器
|
* </p>
|
*
|
* @author xiaochen
|
* @since 2024-08-06
|
*/
|
@Api(tags = "充电桩")
|
@RestController
|
@RequestMapping("/t-charging-pile")
|
public class TChargingPileController {
|
|
private final TChargingPileService chargingPileService;
|
|
@Autowired
|
public TChargingPileController(TChargingPileService chargingPileService) {
|
this.chargingPileService = chargingPileService;
|
}
|
|
/**
|
* 查询充电桩列表
|
*/
|
@ApiOperation(tags = {"小程序-充电桩"},value = "查询充电桩列表")
|
@PostMapping(value = "/list")
|
public AjaxResult<List<TChargingPile>> list(@RequestParam(name = "siteId",value = "站点id",required = false)Integer siteId) {
|
return AjaxResult.ok(chargingPileService.list(Wrappers.lambdaQuery(TChargingPile.class)
|
.eq(TChargingPile::getSiteId,siteId)));
|
}
|
|
}
|