2025-10-22 10:13:57 +08:00
|
|
|
package com.ebike.feign.clients;
|
|
|
|
|
|
2025-12-18 15:29:54 +08:00
|
|
|
import com.cdzy.common.model.dto.EbikeTracking;
|
2025-10-22 10:13:57 +08:00
|
|
|
import com.cdzy.common.model.response.JsonResult;
|
|
|
|
|
import com.ebike.feign.component.FeignTokenInterceptor;
|
|
|
|
|
import com.ebike.feign.config.ExampleFeignConfiguration;
|
2025-11-07 17:19:16 +08:00
|
|
|
import com.ebike.feign.model.dto.FeignEbikeDto;
|
2025-12-24 12:55:04 +08:00
|
|
|
import com.ebike.feign.model.dto.FeignEbikeReportRecordDto;
|
2025-11-11 09:58:43 +08:00
|
|
|
import com.ebike.feign.model.dto.FeignEbikeUserBikeInfo;
|
2025-11-11 16:23:50 +08:00
|
|
|
import com.ebike.feign.model.dto.FeignEbikeUserLockDto;
|
2026-01-06 17:23:15 +08:00
|
|
|
import com.ebike.feign.model.dto.FeignRefundReviewDto;
|
|
|
|
|
import com.ebike.feign.model.vo.EbikeLockVo;
|
|
|
|
|
import com.ebike.feign.model.vo.FeignEbikeBikeRadiusVo;
|
2026-01-19 11:45:52 +08:00
|
|
|
import com.ebike.feign.model.vo.FeignEbikeRefundReviewVo;
|
2026-01-06 17:23:15 +08:00
|
|
|
import com.ebike.feign.model.vo.FeignEbikeRegionVo;
|
|
|
|
|
import com.ebike.feign.model.vo.FeignEbikeReportRecordVo;
|
2026-02-09 16:40:49 +08:00
|
|
|
import com.ebike.feign.model.vo.FeignEbikeSiteVo;
|
2026-01-06 17:23:15 +08:00
|
|
|
import com.ebike.feign.model.vo.FeignInspectionSwapOrderVo;
|
2025-10-22 10:13:57 +08:00
|
|
|
import org.springframework.cloud.openfeign.FeignClient;
|
2025-11-07 17:19:16 +08:00
|
|
|
import org.springframework.validation.annotation.Validated;
|
2025-11-11 10:08:40 +08:00
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
2025-11-07 17:19:16 +08:00
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
2025-11-10 16:26:11 +08:00
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
2025-11-07 17:19:16 +08:00
|
|
|
|
|
|
|
|
import java.util.List;
|
2025-10-22 10:13:57 +08:00
|
|
|
|
|
|
|
|
/**
|
2025-11-07 17:19:16 +08:00
|
|
|
* @author attiya
|
|
|
|
|
* @since 2025-11-7 17:18
|
2025-10-22 10:13:57 +08:00
|
|
|
*/
|
|
|
|
|
@FeignClient(name = "ebike-operations", configuration = {ExampleFeignConfiguration.class, FeignTokenInterceptor.class})
|
|
|
|
|
public interface OperationsFeignClient {
|
|
|
|
|
|
|
|
|
|
/**
|
2025-11-07 17:19:16 +08:00
|
|
|
* 用户半径范围内车辆
|
2025-10-22 10:13:57 +08:00
|
|
|
*
|
2025-11-07 17:19:16 +08:00
|
|
|
* @return 结果
|
2025-10-22 10:13:57 +08:00
|
|
|
*/
|
2025-11-07 17:27:05 +08:00
|
|
|
@PostMapping("/ebikeBikeInfo/api/userRadiusList")
|
2025-11-07 17:19:16 +08:00
|
|
|
JsonResult<List<FeignEbikeDto>> userRadiusList(@Validated @RequestBody FeignEbikeBikeRadiusVo radiusVo);
|
2025-10-22 10:13:57 +08:00
|
|
|
|
2025-11-10 16:26:11 +08:00
|
|
|
/**
|
2025-11-10 16:26:26 +08:00
|
|
|
* 用户开锁
|
2025-11-10 16:26:11 +08:00
|
|
|
*
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
2025-11-11 10:08:40 +08:00
|
|
|
@GetMapping("/ebikeBikeInfo/api/openLock")
|
2025-12-18 15:50:14 +08:00
|
|
|
JsonResult<?> openLock(@RequestParam("bikeCode") String bikeCode);
|
2025-11-10 16:26:11 +08:00
|
|
|
|
2025-11-11 15:30:58 +08:00
|
|
|
/**
|
2025-11-11 17:31:14 +08:00
|
|
|
* 用户关锁
|
2025-11-11 15:30:58 +08:00
|
|
|
*
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
2025-12-18 15:38:40 +08:00
|
|
|
@PostMapping("/ebikeBikeInfo/api/lock")
|
|
|
|
|
JsonResult<FeignEbikeUserLockDto> lock(@RequestBody EbikeLockVo lockVo);
|
2025-11-11 15:30:58 +08:00
|
|
|
|
2025-11-11 09:58:43 +08:00
|
|
|
/**
|
|
|
|
|
* 用户获取车辆详情及其计费规则
|
|
|
|
|
*
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
2025-11-11 10:19:30 +08:00
|
|
|
@GetMapping("/ebikeBikeInfo/api/bikeInfo")
|
2025-12-18 15:50:14 +08:00
|
|
|
JsonResult<FeignEbikeUserBikeInfo> bikeInfo(@RequestParam("bikeCode") String bikeCode);
|
2025-11-11 09:58:43 +08:00
|
|
|
|
2025-11-25 10:37:06 +08:00
|
|
|
/**
|
|
|
|
|
* 根据EcuSn生成换电工单
|
|
|
|
|
*
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/ebikeBikeOrder/batterySwapOrder")
|
2026-01-26 17:09:06 +08:00
|
|
|
JsonResult<FeignEbikeUserBikeInfo> batterySwapOrder(@RequestParam("ecuSn") String ecuSn,@RequestParam("acceptOrder")Boolean acceptOrder);
|
2025-11-25 10:37:06 +08:00
|
|
|
|
2025-11-25 10:46:54 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据bikeCode生成巡检工单
|
|
|
|
|
*
|
|
|
|
|
* @return 结果
|
|
|
|
|
*/
|
2025-11-26 10:42:39 +08:00
|
|
|
@PostMapping("/ebikeBikeOrder/inspectionSwapOrder")
|
|
|
|
|
JsonResult<FeignEbikeUserBikeInfo> inspectionSwapOrder(@RequestBody FeignInspectionSwapOrderVo inspectionSwapOrderVo);
|
2025-11-25 10:46:54 +08:00
|
|
|
|
2025-12-18 15:29:54 +08:00
|
|
|
/**
|
|
|
|
|
* 保存车辆轨迹。
|
|
|
|
|
*
|
|
|
|
|
* @param ebikeTracking 车辆轨迹
|
|
|
|
|
* @return 结果数据 返回结果
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("ebikeTracking/save")
|
|
|
|
|
JsonResult<?> saveEbikeTracking(@RequestBody EbikeTracking ebikeTracking);
|
|
|
|
|
|
2025-12-18 15:50:14 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 保存车辆最新位置
|
2025-12-24 12:55:04 +08:00
|
|
|
*
|
|
|
|
|
* @param ecuSn 中控编号
|
2025-12-18 15:50:14 +08:00
|
|
|
* @param longitude 经度
|
2025-12-24 12:55:04 +08:00
|
|
|
* @param latitude 纬度
|
2025-12-18 15:50:14 +08:00
|
|
|
* @return 保存结果
|
|
|
|
|
*/
|
2025-12-24 12:55:04 +08:00
|
|
|
@GetMapping("/ebikeBikeInfo/changeLocation")
|
2025-12-18 15:50:14 +08:00
|
|
|
JsonResult<?> changeLocation(@RequestParam("ecuSn") String ecuSn, @RequestParam("longitude") Double longitude, @RequestParam("latitude") Double latitude);
|
|
|
|
|
|
2025-12-24 12:55:04 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 保存用户上报
|
|
|
|
|
*
|
|
|
|
|
* @param feignEbikeReportRecordDto 用户上报信息
|
|
|
|
|
*/
|
2026-01-07 15:27:07 +08:00
|
|
|
@PostMapping("/ebikeReportRecord/api/saveReportRecord")
|
2025-12-24 12:55:04 +08:00
|
|
|
JsonResult<?> saveReportRecord(@RequestBody FeignEbikeReportRecordDto feignEbikeReportRecordDto);
|
|
|
|
|
|
2025-12-25 14:14:45 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取用户上报记录
|
|
|
|
|
*
|
|
|
|
|
* @param userId 用户id
|
|
|
|
|
* @return 用户上报记录
|
|
|
|
|
*/
|
2026-01-07 15:27:07 +08:00
|
|
|
@GetMapping("/ebikeReportRecord/api/getReportRecord")
|
2025-12-25 14:14:45 +08:00
|
|
|
JsonResult<List<FeignEbikeReportRecordVo>> getReportRecord(@RequestParam("userId") Long userId);
|
2025-12-25 17:16:59 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取当前位置所属运营区
|
|
|
|
|
*
|
|
|
|
|
* @param lng 经度
|
|
|
|
|
* @param lat 维度
|
|
|
|
|
* @return 运营区信息
|
|
|
|
|
*/
|
2026-01-07 15:27:07 +08:00
|
|
|
@GetMapping("/ebikeRegion/api/getRegionByLocation")
|
2025-12-25 17:16:59 +08:00
|
|
|
JsonResult<FeignEbikeRegionVo> getRegionByLocation(@RequestParam("lng") double lng,
|
2026-01-08 09:24:47 +08:00
|
|
|
@RequestParam("lat") double lat,
|
|
|
|
|
@RequestParam("radius") double radius);
|
2026-01-06 17:23:15 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生成退款审核单
|
|
|
|
|
*
|
|
|
|
|
* @param dto 退款审核参数
|
|
|
|
|
*/
|
2026-01-07 15:27:07 +08:00
|
|
|
@PostMapping("/ebikeRefundReview/api/save")
|
2026-01-06 17:23:15 +08:00
|
|
|
JsonResult<?> saveRefundReview(@RequestBody FeignRefundReviewDto dto);
|
2026-01-19 11:45:52 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据订单id查看退款订单详情
|
|
|
|
|
*
|
|
|
|
|
* @param orderId 订单id
|
|
|
|
|
* @return 退款订单审核详情
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/ebikeRefundReview/api/getRefundReviewByOrderId")
|
|
|
|
|
JsonResult<FeignEbikeRefundReviewVo> getRefundReviewByOrderId(@RequestParam("orderId") Long orderId);
|
2026-01-27 11:20:30 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据车辆编号获取寻车铃
|
|
|
|
|
*
|
|
|
|
|
* @param bikeCode 车辆编号
|
|
|
|
|
* @return true 成功 false 失败
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/ebikeEcuInfo/api/findBikeByBikeCode")
|
|
|
|
|
JsonResult<?> findBikeByBikeCode(@RequestParam("bikeCode") String bikeCode);
|
2026-02-09 16:40:49 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据车辆编号获取该运营区所有站点
|
|
|
|
|
* @param bikeCode 车辆编号
|
|
|
|
|
* @return 所有站点
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/ebikeBikeInfo/api/getAllSiteByBikeCode")
|
|
|
|
|
JsonResult<List<FeignEbikeSiteVo>> getAllSiteByBikeCode(@RequestParam("bikeCode") String bikeCode);
|
2025-10-22 10:13:57 +08:00
|
|
|
}
|