新增 宁波点行平台Controller

This commit is contained in:
Lemon
2024-05-10 15:27:59 +08:00
parent 2f5cb3bd74
commit 68f4b8c651
7 changed files with 221 additions and 25 deletions

View File

@@ -0,0 +1,47 @@
package com.jsowell.web.controller.thirdparty.dianxing;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;
/**
* 宁波电刑平台
*
* @author Lemon
* @Date 2024/5/10 9:21:59
*/
@Anonymous
@RestController
@RequestMapping("/dianxing")
public class DianXingPlatformController extends BaseController {
@Autowired
@Qualifier("dianXingPlatformServiceImpl")
private ThirdPartyPlatformService dianXingService;
/**
* 推送充电记录
* @param orderCode
* @return
*/
@GetMapping("/pushChargeRecord/{orderCode}")
public RestApiResponse<?> pushChargeRecordInfo(@PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
try {
String result = dianXingService.notificationChargeOrderInfo(orderCode);
response = new RestApiResponse<>(result);
} catch (BusinessException e) {
logger.error("点行平台推送充电记录 error:{}, {}", e.getCode(), e.getMessage());
response = new RestApiResponse<>(e);
} catch (Exception e) {
logger.error("点行平台推送充电记录 error", e);
}
logger.info("点行平台推送充电记录 result:{}", response);
return response;
}
}