diff --git a/xhpc-modules/pom.xml b/xhpc-modules/pom.xml
index 5f53c21f..5d3cfe79 100644
--- a/xhpc-modules/pom.xml
+++ b/xhpc-modules/pom.xml
@@ -9,7 +9,10 @@
4.0.0
+ xhpc-common
+ xhpc-general
xhpc-power-pile
+ xhpc-charging-station
xhpc-user
diff --git a/xhpc-modules/xhpc-common/pom.xml b/xhpc-modules/xhpc-common/pom.xml
index 76166ff5..92e639e3 100644
--- a/xhpc-modules/xhpc-common/pom.xml
+++ b/xhpc-modules/xhpc-common/pom.xml
@@ -12,7 +12,7 @@
xhpc-common
- 公共服务
+ 公共复用代码
8
@@ -20,80 +20,10 @@
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-sentinel
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- io.springfox
- springfox-swagger-ui
- ${swagger.fox.version}
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.ruoyi
- ruoyi-common-datasource
-
-
-
-
- com.ruoyi
- ruoyi-common-datascope
-
-
-
-
- com.ruoyi
- ruoyi-common-log
-
-
-
-
- com.ruoyi
- ruoyi-common-swagger
-
com.ruoyi
ruoyi-common-core
-
- com.squareup.okhttp3
- okhttp
-
-
-
- cn.hutool
- hutool-all
- 5.7.5
-
${project.artifactId}
@@ -112,4 +42,4 @@
-
\ No newline at end of file
+
diff --git a/xhpc-modules/xhpc-common/src/main/resources/banner.txt b/xhpc-modules/xhpc-common/src/main/resources/banner.txt
deleted file mode 100644
index 27cacb9c..00000000
--- a/xhpc-modules/xhpc-common/src/main/resources/banner.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Spring Boot Version: ${spring-boot.version}
-Spring Application Name: ${spring.application.name}
- _ __ _ _
- (_) / _|(_)| |
- _ __ _ _ ___ _ _ _ ______ | |_ _ | | ___
-| '__|| | | | / _ \ | | | || ||______|| _|| || | / _ \
-| | | |_| || (_) || |_| || | | | | || || __/
-|_| \__,_| \___/ \__, ||_| |_| |_||_| \___|
- __/ |
- |___/
\ No newline at end of file
diff --git a/xhpc-modules/xhpc-general/pom.xml b/xhpc-modules/xhpc-general/pom.xml
new file mode 100644
index 00000000..737e8ac6
--- /dev/null
+++ b/xhpc-modules/xhpc-general/pom.xml
@@ -0,0 +1,132 @@
+
+
+
+ xhpc-modules
+ com.ruoyi
+ 3.0.0
+
+ 4.0.0
+
+ xhpc-general
+
+
+ 通用服务
+
+
+ 8
+ 8
+
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-sentinel
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ mysql
+ mysql-connector-java
+
+
+
+
+ com.ruoyi
+ ruoyi-common-datasource
+
+
+
+
+ com.ruoyi
+ ruoyi-common-datascope
+
+
+
+
+ com.ruoyi
+ ruoyi-common-log
+
+
+
+
+ com.ruoyi
+ ruoyi-common-swagger
+
+
+ com.ruoyi
+ ruoyi-common-core
+
+
+ com.squareup.okhttp3
+ okhttp
+
+
+
+ com.ruoyi
+ xhpc-common
+ 3.0.0
+ compile
+
+
+
+ cn.hutool
+ hutool-all
+ 5.7.5
+
+
+
+
+ ${project.artifactId}
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.4.0
+
+
+
+ repackage
+
+
+
+
+
+
+
+ src/main/resources
+
+ **/*.yml
+ **/*.xml
+ **/*.properties
+
+ true
+
+
+
+
diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/XhpcCommon.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/XhpcGeneralApplication.java
similarity index 75%
rename from xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/XhpcCommon.java
rename to xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/XhpcGeneralApplication.java
index cde83391..90b278a6 100644
--- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/XhpcCommon.java
+++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/XhpcGeneralApplication.java
@@ -1,4 +1,4 @@
-package com.xhpc.common;
+package com.xhpc.general;
import com.ruoyi.common.security.annotation.EnableCustomConfig;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
@@ -11,13 +11,13 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
@EnableCustomSwagger2
@EnableRyFeignClients
@SpringBootApplication
-@MapperScan("com.xhpc.common.mapper")
-public class XhpcCommon {
+@MapperScan("com.xhpc.general.mapper")
+public class XhpcGeneralApplication {
- public static void main(String [] args){
+ public static void main(String[] args) {
- SpringApplication.run(XhpcCommon.class,args);
- System.out.println("(♥◠‿◠)ノ゙ 公共模块模块启动成功 ლ(´ڡ`ლ)゙ \n" +
+ SpringApplication.run(XhpcGeneralApplication.class, args);
+ System.out.println("(♥◠‿◠)ノ゙ 通用模块启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/controller/XhpcDictBizController.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java
similarity index 91%
rename from xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/controller/XhpcDictBizController.java
rename to xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java
index b3b7a579..398cd72c 100644
--- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/controller/XhpcDictBizController.java
+++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/controller/XhpcDictBizController.java
@@ -1,8 +1,8 @@
-package com.xhpc.common.controller;
+package com.xhpc.general.controller;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.xhpc.common.service.IXhpcDictBizService;
+import com.xhpc.general.service.IXhpcDictBizService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -31,6 +31,6 @@ public class XhpcDictBizController extends BaseController {
{
return AjaxResult.success(xhpcDictBizService.getCode(code));
}
-
-
+
+
}
diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/mapper/XhpcDictBizMapper.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/mapper/XhpcDictBizMapper.java
similarity index 86%
rename from xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/mapper/XhpcDictBizMapper.java
rename to xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/mapper/XhpcDictBizMapper.java
index 09e55437..17562f19 100644
--- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/mapper/XhpcDictBizMapper.java
+++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/mapper/XhpcDictBizMapper.java
@@ -1,9 +1,8 @@
-package com.xhpc.common.mapper;
+package com.xhpc.general.mapper;
import com.xhpc.common.domain.XhpcDictBiz;
import java.util.List;
-import java.util.Map;
/**
* 业务字典Mapper接口
diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/service/IXhpcDictBizService.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/service/IXhpcDictBizService.java
similarity index 86%
rename from xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/service/IXhpcDictBizService.java
rename to xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/service/IXhpcDictBizService.java
index fdc74917..220d391e 100644
--- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/service/IXhpcDictBizService.java
+++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/service/IXhpcDictBizService.java
@@ -1,9 +1,8 @@
-package com.xhpc.common.service;
+package com.xhpc.general.service;
import com.xhpc.common.domain.XhpcDictBiz;
import java.util.List;
-import java.util.Map;
/**
* 业务字典Service接口
diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/service/XhpcDictBizServiceImpl.java b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/service/XhpcDictBizServiceImpl.java
similarity index 83%
rename from xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/service/XhpcDictBizServiceImpl.java
rename to xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/service/XhpcDictBizServiceImpl.java
index a6827633..d42b1d00 100644
--- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/service/XhpcDictBizServiceImpl.java
+++ b/xhpc-modules/xhpc-general/src/main/java/com/xhpc/general/service/XhpcDictBizServiceImpl.java
@@ -1,12 +1,11 @@
-package com.xhpc.common.service;
+package com.xhpc.general.service;
import com.xhpc.common.domain.XhpcDictBiz;
-import com.xhpc.common.mapper.XhpcDictBizMapper;
+import com.xhpc.general.mapper.XhpcDictBizMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
-import java.util.Map;
/**
* 业务字典Service业务层处理
diff --git a/xhpc-modules/xhpc-general/src/main/resources/banner.txt b/xhpc-modules/xhpc-general/src/main/resources/banner.txt
new file mode 100644
index 00000000..7dc07932
--- /dev/null
+++ b/xhpc-modules/xhpc-general/src/main/resources/banner.txt
@@ -0,0 +1,8 @@
+Spring Boot Version: ${spring-boot.version}
+Spring Application Name: ${spring.application.name}
+ _____ _
+ / ____| | |
+ | | __ ___ _ __ ___ _ __ __ _ | |
+ | | |_ | / _ \ | '_ \ / _ \ | '__| / _` | | |
+ | |__| | | __/ | | | | | __/ | | | (_| | | |
+ \_____| \___| |_| |_| \___| |_| \__,_| |_|
diff --git a/xhpc-modules/xhpc-common/src/main/resources/bootstrap.yml b/xhpc-modules/xhpc-general/src/main/resources/bootstrap.yml
similarity index 94%
rename from xhpc-modules/xhpc-common/src/main/resources/bootstrap.yml
rename to xhpc-modules/xhpc-general/src/main/resources/bootstrap.yml
index 7ef869c5..d1cc6f1e 100644
--- a/xhpc-modules/xhpc-common/src/main/resources/bootstrap.yml
+++ b/xhpc-modules/xhpc-general/src/main/resources/bootstrap.yml
@@ -3,10 +3,10 @@ server:
port: 9802
# Spring
-spring:
+spring:
application:
# 应用名称
- name: xhpc-common
+ name: xhpc-general
profiles:
# 环境配置
active: dev
diff --git a/xhpc-modules/xhpc-common/src/main/resources/logback.xml b/xhpc-modules/xhpc-general/src/main/resources/logback.xml
similarity index 88%
rename from xhpc-modules/xhpc-common/src/main/resources/logback.xml
rename to xhpc-modules/xhpc-general/src/main/resources/logback.xml
index 2795b2fe..09dad152 100644
--- a/xhpc-modules/xhpc-common/src/main/resources/logback.xml
+++ b/xhpc-modules/xhpc-general/src/main/resources/logback.xml
@@ -1,7 +1,7 @@
-
+
@@ -13,7 +13,7 @@
-
+
${log.path}/info.log
@@ -35,7 +35,7 @@
-
+
${log.path}/error.log
@@ -68,7 +68,7 @@
-
-
+
+
diff --git a/xhpc-modules/xhpc-common/src/main/resources/mapper/XhpcDictBizMapper.xml b/xhpc-modules/xhpc-general/src/main/resources/mapper/XhpcDictBizMapper.xml
similarity index 54%
rename from xhpc-modules/xhpc-common/src/main/resources/mapper/XhpcDictBizMapper.xml
rename to xhpc-modules/xhpc-general/src/main/resources/mapper/XhpcDictBizMapper.xml
index e9d519ff..3fc9c5a9 100644
--- a/xhpc-modules/xhpc-common/src/main/resources/mapper/XhpcDictBizMapper.xml
+++ b/xhpc-modules/xhpc-general/src/main/resources/mapper/XhpcDictBizMapper.xml
@@ -2,17 +2,17 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -24,4 +24,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select code, dict_key, dict_value, sort, remark from xhpc_dict_biz where code = #{code} and parent_id > 0 and del_flag = 0
-
\ No newline at end of file
+
diff --git a/xhpc-modules/xhpc-power-pile/pom.xml b/xhpc-modules/xhpc-power-pile/pom.xml
index 65314660..721c542c 100644
--- a/xhpc-modules/xhpc-power-pile/pom.xml
+++ b/xhpc-modules/xhpc-power-pile/pom.xml
@@ -3,8 +3,8 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- com.ruoyi
xhpc-modules
+ com.ruoyi
3.0.0
4.0.0
@@ -76,9 +76,10 @@
- leaf-boot-starter
- com.sankuai.inf.leaf
- 1.0.1-RELEASE
+ com.ruoyi
+ xhpc-common
+ 3.0.0
+ compile
diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/service/RateModelRequestLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/service/RateModelRequestLogic.java
index ac79d61b..282bced6 100644
--- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/service/RateModelRequestLogic.java
+++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/service/RateModelRequestLogic.java
@@ -31,8 +31,9 @@ public class RateModelRequestLogic implements ServiceLogic {
Object cacheStation = stations.get(stationId); //todo
String resultCode = ServiceResult.OK;
String hexCode = ServiceResult.HEX_OK;
+
// Integer rateModelIdCache = cacheStation.get("rateModelId");
-// Object rateModelId = station.getRateModelId() ;
+// Object rateModelId = station.getRateModelId();
// if (rateModelId==null) {
// hexCode = ServiceResult.HEX_FAIL;
// resultCode = ServiceResult.FAIL;
@@ -44,5 +45,4 @@ public class RateModelRequestLogic implements ServiceLogic {
resultStr = resultStr.concat(CRCCalculator.calcCrc(resultStr));
return new ServiceResult(HexUtils.toBytes(resultStr), resultCode);
}
-
}
diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/service/RealtimeDataLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/service/RealtimeDataLogic.java
new file mode 100644
index 00000000..eecdd56e
--- /dev/null
+++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/service/RealtimeDataLogic.java
@@ -0,0 +1,43 @@
+package com.xhpc.pp.service;
+
+//import com.xhpc.common.domain.XhpcChargeOrderStatus;
+
+import com.xhpc.pp.tx.ServiceParameter;
+import com.xhpc.pp.tx.ServiceResult;
+import com.xhpc.pp.tx.logic.ServiceLogic;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+import static com.xhpc.pp.server.ChargingPileServer.REDIS;
+
+@Lazy
+@Component("RealtimeDataLogic")
+public class RealtimeDataLogic implements ServiceLogic {
+
+ private static Logger log = LoggerFactory.getLogger(RealtimeDataLogic.class);
+
+ @Override
+ public ServiceResult service(ServiceParameter sp) throws Exception {
+
+ Map req = sp.getParameters();
+ String pileNo = (String) req.get("pileNo");
+ String gunId = (String) req.get("gunId");
+ String status = (String) req.get("status");
+ String pileGun = pileNo.concat(gunId);
+ Map cacheGun = REDIS.getCacheMap(pileGun);
+ cacheGun.put("status", status);
+// List realTimeDataList = (List) cacheGun.get("realTimeData");
+// XhpcChargeOrderStatus newData = new XhpcChargeOrderStatus();
+// newData.setStatus(Integer.parseInt(status));
+// if(realTimeDataList==null) realTimeDataList = new ArrayList<>();
+// realTimeDataList.add(newData);
+// cacheGun.put("realTimeData", realTimeDataList);
+ REDIS.setCacheMap(pileGun, cacheGun);
+ return new ServiceResult(false);
+ }
+
+}
diff --git a/xhpc-modules/xhpc-power-pile/src/main/resources/svcmainlogic.xml b/xhpc-modules/xhpc-power-pile/src/main/resources/svcmainlogic.xml
index 9aee48b3..4aefe650 100644
--- a/xhpc-modules/xhpc-power-pile/src/main/resources/svcmainlogic.xml
+++ b/xhpc-modules/xhpc-power-pile/src/main/resources/svcmainlogic.xml
@@ -12,5 +12,6 @@
+
diff --git a/xhpc-modules/xhpc-user/pom.xml b/xhpc-modules/xhpc-user/pom.xml
index 23994037..0334c880 100644
--- a/xhpc-modules/xhpc-user/pom.xml
+++ b/xhpc-modules/xhpc-user/pom.xml
@@ -75,17 +75,6 @@
1.6
-
- leaf-boot-starter
- com.sankuai.inf.leaf
- 1.0.1-RELEASE
-
-
-
- org.projectlombok
- lombok
-
-