mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
add dubbo service
This commit is contained in:
@@ -41,6 +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.util.*;
|
||||
import com.jsowell.common.util.Cp56Time2a.Cp56Time2aUtil;
|
||||
import com.jsowell.common.util.http.HttpUtils;
|
||||
@@ -94,6 +95,7 @@ import com.jsowell.wxpay.response.WechatPayRefundRequest;
|
||||
import com.jsowell.wxpay.service.WxAppletRemoteService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.RandomStringUtils;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.slf4j.Logger;
|
||||
@@ -292,6 +294,15 @@ public class SpringBootTestController {
|
||||
@Autowired
|
||||
private QcyunsService qcyunsService;
|
||||
|
||||
@DubboReference
|
||||
private ProtocolService protocolService;
|
||||
|
||||
@Test
|
||||
public void testDubbo() {
|
||||
String s = protocolService.sayHello("jsowell-charger-web");
|
||||
System.out.println(s);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCommonVerificationCode() {
|
||||
String phoneNumber = "18612341234";
|
||||
|
||||
@@ -156,6 +156,15 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.jsowell</groupId>
|
||||
<artifactId>charge-common-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
@@ -182,4 +191,4 @@
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.jsowell.dubbo;
|
||||
|
||||
import com.jsowell.common.service.ProtocolService;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class JCPPService {
|
||||
|
||||
@DubboReference
|
||||
ProtocolService protocolService;
|
||||
|
||||
/**
|
||||
* 调用jcpp的下发计费模板
|
||||
*/
|
||||
|
||||
/**
|
||||
* 调用jcpp的启动充电
|
||||
*/
|
||||
public void startCharge(String pileCode, String gunCode, BigDecimal limitYuan, String orderNo) {
|
||||
protocolService.startCharge(pileCode, gunCode, limitYuan, orderNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用jcpp的停止充电
|
||||
*/
|
||||
public void stopCharge(String pileCode, String gunCode, String orderNo) {
|
||||
// protocolService.stopCharge(pileCode, gunCode, orderNo);
|
||||
}
|
||||
}
|
||||
@@ -849,6 +849,7 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
}
|
||||
BillingTemplateVO billingTemplateVO = pileBillingTemplateMapper.selectBillingTemplateByPileSn(pileSn);
|
||||
if (billingTemplateVO != null) {
|
||||
billingTemplateVO.setPileSn(pileSn);
|
||||
redisCache.setCacheObject(redisKey, JSON.toJSONString(billingTemplateVO), CacheConstants.cache_expire_time_1d);
|
||||
}
|
||||
return billingTemplateVO;
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.util.Map;
|
||||
@AllArgsConstructor
|
||||
@Builder
|
||||
public class BillingTemplateVO {
|
||||
private String pileSn;
|
||||
// 站点id
|
||||
private String stationId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user