update dubbo service

This commit is contained in:
Guoqs
2025-06-17 16:51:50 +08:00
parent dd0ba9a262
commit a949040e78
10 changed files with 162 additions and 51 deletions

View File

@@ -0,0 +1,78 @@
package com.jsowell.service;
import com.jsowell.common.dto.RealTimeMonitorData;
import com.jsowell.common.dto.TransactionRecordsData;
import com.jsowell.common.service.YdcService;
import com.jsowell.common.vo.BillingTemplateVO;
import com.jsowell.common.vo.PileInfoVO;
import org.apache.dubbo.config.annotation.DubboService;
@DubboService
public class YdcServiceImpl implements YdcService {
@Override
public String sayHello(String name) {
return "hello " + name + " from ydc-server";
}
/**
* 查询充电桩详情
*
* @param pileCode
*/
@Override
public PileInfoVO getPileDetail(String pileCode) {
return null;
}
/**
* 查询计费模板
*
* @param pileCode
*/
@Override
public BillingTemplateVO getBillingTemplate(String pileCode) {
return null;
}
/**
* 启动充电callback
*
* @param pileCode
* @param result
*/
@Override
public void startChargeCallback(String pileCode, String result) {
}
/**
* 停止充电callback
*
* @param pileCode
* @param result
*/
@Override
public void stopChargeCallback(String pileCode, String result) {
}
/**
* 接收交易记录接口
*
* @param transactionRecordsData
*/
@Override
public void receiveTradeRecord(TransactionRecordsData transactionRecordsData) {
}
/**
* 接收实时监测数据接口
*
* @param realTimeMonitorData
*/
@Override
public void receiveRealTimeData(RealTimeMonitorData realTimeMonitorData) {
}
}

View File

@@ -251,4 +251,19 @@ parking:
# 充电算法平台配置
chargeAlgorithm:
url: http://150.158.199.92:58910/gateway/api/user/battery/algorithm/json
clientId: e488bac5f70b496fa2d82065089e5f81
clientId: e488bac5f70b496fa2d82065089e5f81
# dubbo配置
dubbo:
application:
name: ydc-server
qosEnable: false
registry:
address: nacos://192.168.2.2:8848
parameters:
namespace: e328faaf-8516-42d0-817a-7406232b3581
username: nacos
password: nacos
protocol:
name: dubbo
port: 20880

View File

@@ -246,4 +246,19 @@ parking:
# 充电算法平台配置
chargeAlgorithm:
url: http://150.158.199.92:58910/gateway/api/user/battery/algorithm/json
clientId: e488bac5f70b496fa2d82065089e5f81
clientId: e488bac5f70b496fa2d82065089e5f81
# dubbo配置
dubbo:
application:
name: ydc-server
qosEnable: false
registry:
address: nacos://192.168.2.2:8848
parameters:
namespace: e328faaf-8516-42d0-817a-7406232b3581
username: nacos
password: nacos
protocol:
name: dubbo
port: 20880

View File

@@ -252,3 +252,18 @@ parking:
chargeAlgorithm:
url: http://150.158.199.92:58910/gateway/api/user/battery/algorithm/json
clientId: e488bac5f70b496fa2d82065089e5f81
# dubbo配置
dubbo:
application:
name: ydc-server
qosEnable: false
registry:
address: nacos://192.168.2.2:8848
parameters:
namespace: e328faaf-8516-42d0-817a-7406232b3581
username: nacos
password: nacos
protocol:
name: dubbo
port: 20880

View File

@@ -250,3 +250,18 @@ parking:
chargeAlgorithm:
url: http://150.158.199.92:58910/gateway/api/user/battery/algorithm/json
clientId: e488bac5f70b496fa2d82065089e5f81
# dubbo配置
dubbo:
application:
name: ydc-server
qosEnable: false
registry:
address: nacos://192.168.2.2:8848
parameters:
namespace: e328faaf-8516-42d0-817a-7406232b3581
username: nacos
password: nacos
protocol:
name: dubbo
port: 20880

View File

@@ -71,21 +71,6 @@ spring:
# 热部署开关
enabled: true
# dubbo配置
dubbo:
application:
name: jsowell-service
qosEnable: false
registry:
address: nacos://192.168.2.2:8848
parameters:
namespace: e328faaf-8516-42d0-817a-7406232b3581
username: nacos
password: nacos
protocol:
name: dubbo
port: 20880
# MyBatis配置
mybatis:
# 搜索指定包别名

View File

@@ -41,7 +41,7 @@ import com.jsowell.common.enums.DelFlagEnum;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.*;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.service.ProtocolService;
import com.jsowell.common.service.JcppService;
import com.jsowell.common.util.*;
import com.jsowell.common.util.Cp56Time2a.Cp56Time2aUtil;
import com.jsowell.common.util.http.HttpUtils;
@@ -295,11 +295,11 @@ public class SpringBootTestController {
private QcyunsService qcyunsService;
@DubboReference
private ProtocolService protocolService;
private JcppService jcppService;
@Test
public void testDubbo() {
String s = protocolService.sayHello("jsowell-charger-web");
String s = jcppService.sayHello("jsowell-charger-web");
System.out.println(s);
}