| | |
| | | package com.ruoyi.chargingPile.api.feignClient; |
| | | |
| | | import com.ruoyi.chargingPile.api.dto.GetSiteListDTO; |
| | | import com.ruoyi.chargingPile.api.factory.SiteFallbackFactory; |
| | | import com.ruoyi.chargingPile.api.model.Partner; |
| | | import com.ruoyi.chargingPile.api.model.Site; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | @FeignClient(contextId = "SiteClient", value = ServiceNameConstants.CHARGINGPILE_SERVICE, fallbackFactory = SiteFallbackFactory.class) |
| | | public interface SiteClient { |
| | | @GetMapping("/site/getPileListBySiteId/{siteId}") |
| | | public R<List<TChargingPile>> getPileListBySiteId(@PathVariable("siteId")Integer siteId); |
| | | |
| | | /** |
| | | * 根据id集合获取数据 |
| | |
| | | */ |
| | | @PostMapping("/site/getSiteByIds") |
| | | R<List<Site>> getSiteByIds(@RequestBody List<Integer> ids); |
| | | |
| | | /** |
| | | * 获取所有站点 |
| | | * @return |
| | | */ |
| | | @PostMapping("/site/getSiteAll") |
| | | R<List<Site>> getSiteAll(); |
| | | |
| | | @GetMapping("/site/getSiteList/byUserId") |
| | | R<List<GetSiteListDTO>> getSiteListByUserId(@RequestParam("userId") Long userId); |
| | | @GetMapping("/partner/getPartnerR/{id}") |
| | | R<Partner> getPartnerR(@PathVariable("id") Integer id); |
| | | @GetMapping("/partner/getAllPartner") |
| | | public R<List<Partner>> getAllPartner(); |
| | | |
| | | |
| | | /** |
| | | * 分页查询站电数据 |
| | | * @param PageNo |
| | | * @param PageSize |
| | | * @return |
| | | */ |
| | | @PostMapping("/site/getSiteListPaging") |
| | | PageInfo<Site> getSiteListPaging(@RequestParam("PageNo") Integer PageNo, |
| | | @RequestParam("PageSize") Integer PageSize, |
| | | @RequestParam("ids") List<String> ids); |
| | | |
| | | |
| | | /** |
| | | * 分页查询站电数据 |
| | | * @param PageNo |
| | | * @param PageSize |
| | | * @return |
| | | */ |
| | | @PostMapping("/site/getSiteListPagingJianGuan") |
| | | PageInfo<Site> getSiteListPagingJianGuan(@RequestParam("PageNo") Integer PageNo, |
| | | @RequestParam("PageSize") Integer PageSize, |
| | | @RequestParam("ids") List<String> ids); |
| | | } |