| package com.ruoyi.integration.controller; | 
|   | 
| import com.ruoyi.common.core.domain.R; | 
| import com.ruoyi.integration.api.model.ChargingHandshake; | 
| import com.ruoyi.integration.mongodb.service.ChargingHandshakeService; | 
| import org.springframework.web.bind.annotation.PostMapping; | 
| import org.springframework.web.bind.annotation.RequestMapping; | 
| import org.springframework.web.bind.annotation.RequestParam; | 
| import org.springframework.web.bind.annotation.RestController; | 
|   | 
| import javax.annotation.Resource; | 
|   | 
| /** | 
|  * @author zhibing.pu | 
|  * @Date 2024/8/28 9:50 | 
|  */ | 
| @RestController | 
| @RequestMapping("/chargingHandshake") | 
| public class ChargingHandshakeController { | 
|      | 
|     @Resource | 
|     private ChargingHandshakeService chargingHandshakeService; | 
|      | 
|      | 
|     /** | 
|      * 根据订单编号获取充电握手数据 | 
|      * @param code | 
|      * @return | 
|      */ | 
|     @PostMapping("/getDataByOrderCode") | 
|     public R<ChargingHandshake> getDataByOrderCode(@RequestParam("code") String code){ | 
|         ChargingHandshake chargingHandshake = chargingHandshakeService.getDataByOrderCode(code); | 
|         return R.ok(chargingHandshake); | 
|     } | 
| } |