127 lines
3.8 KiB
Java
127 lines
3.8 KiB
Java
package com.ebike.feign.clients;
|
|
|
|
import com.cdzy.common.model.EbikeTracking;
|
|
import com.cdzy.common.model.JsonResult;
|
|
import com.ebike.feign.model.res.ReqUserOperateDto;
|
|
import com.ebike.feign.model.res.ResFeignEbikeSysRcostsetDto;
|
|
import com.ebike.feign.model.rsp.FeignEbikeRegionDto;
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
import java.util.List;
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
|
/**
|
|
* 运营管理 外部调用。
|
|
*
|
|
* @author dingchao
|
|
* @date 2025/3/27
|
|
*/
|
|
@FeignClient(name = "ebike-operate")
|
|
public interface OperateFeignClient {
|
|
/**
|
|
* 批量保存电池入库记录。
|
|
*
|
|
* @param ebikeBatteryCodes 电池编码
|
|
* @return 结果数据
|
|
*/
|
|
@PostMapping("ebikeBatteryEnterRecords/batchSave")
|
|
JsonResult<?> batchSaveBatteryEnterRecords(@RequestBody List<String> ebikeBatteryCodes);
|
|
|
|
/**
|
|
* 批量保存电池出库记录。
|
|
*
|
|
* @param ebikeBatteryCodes 电池编码
|
|
* @return 结果数据
|
|
*/
|
|
@PostMapping("ebikeBatteryOutRecords/batchSave")
|
|
JsonResult<?> batchSaveBatteryOutRecords(@RequestBody List<String> ebikeBatteryCodes);
|
|
|
|
/**
|
|
* 获取行政区域。
|
|
*
|
|
* @param parent_id 父级行政区域ID
|
|
* @return 结果数据
|
|
*/
|
|
@GetMapping("ebikeSystemCodeMapInfo/ebikeAdministrationZone")
|
|
JsonResult<?> getEbikeAdministrationZone(@RequestParam(name = "parent_id", required = false) String parent_id);
|
|
|
|
/**
|
|
* 根据行政区名称获取运营区域ID列表
|
|
*
|
|
* @param zoneName 区域名称
|
|
* @return 结果数据 详情
|
|
*/
|
|
@GetMapping("ebikeRegion/getRegionIdsByZone")
|
|
JsonResult<?> getRegionIdsByZone(@RequestParam(name = "zoneName") String zoneName);
|
|
|
|
/**
|
|
* 保存车辆轨迹。
|
|
*
|
|
* @param ebikeTracking 车辆轨迹
|
|
* @return 结果数据 返回结果
|
|
*/
|
|
@PostMapping("ebikeTracking/save")
|
|
JsonResult<?> saveEbikeTracking(@RequestBody EbikeTracking ebikeTracking);
|
|
|
|
/**
|
|
* 获取运营区详情。
|
|
*
|
|
* @param regionId 运营区id
|
|
* @return 结果数据 返回结果
|
|
*/
|
|
@GetMapping("ebikeRegion/getOperationById")
|
|
JsonResult<FeignEbikeRegionDto> getOperationById(@RequestParam(name = "regionId") Long regionId);
|
|
|
|
/**
|
|
* 根据区域id获取计费规则。
|
|
*
|
|
* @param operationRegionId 运营区id
|
|
* @return 结果数据 返回结果
|
|
*/
|
|
@GetMapping("ebikesysrcostset/getRegionFeeConfigById")
|
|
JsonResult<ResFeignEbikeSysRcostsetDto> getRegionFeeConfigById(@RequestParam(name = "operationRegionId") Long operationRegionId);
|
|
|
|
/**
|
|
* 设置用户所属运营区
|
|
*
|
|
* @param reqUserOperateDto 信息
|
|
* @return 结果数据
|
|
*/
|
|
@PostMapping("ebikeRegion/setUserOperate")
|
|
JsonResult<?> setUserOperate(@RequestBody ReqUserOperateDto reqUserOperateDto);
|
|
|
|
/**
|
|
* 删除用户所属运营区
|
|
*
|
|
* @param staffId 员工id
|
|
* @return 结果数据
|
|
*/
|
|
@PostMapping("ebikeRegion/delUserOperate")
|
|
JsonResult<?> delUserOperate(@RequestParam("staffId") Long staffId);
|
|
|
|
/**
|
|
* 删除用户所属运营区
|
|
*
|
|
* @param siteRegionId 站点id
|
|
* @return 结果数据
|
|
*/
|
|
@Async
|
|
@GetMapping("ebikeRegion/addBorrowing")
|
|
CompletableFuture<?> addBorrowing(@RequestParam("siteRegionId") Long siteRegionId);
|
|
|
|
/**
|
|
* 删除用户所属运营区
|
|
*
|
|
* @param siteRegionId 站点id
|
|
* @return 结果数据
|
|
*/
|
|
@Async
|
|
@GetMapping("ebikeRegion/addReturn")
|
|
CompletableFuture<?> addReturn(@RequestParam("siteRegionId") Long siteRegionId);
|
|
}
|