From d51367b0fe1a062d3eae47e3f7555ab3e56e6a08 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 30 十月 2024 20:56:46 +0800
Subject: [PATCH] 修改程序名称为smartman-api
---
/dev/null | 13 -------------
smart-man-boot/src/main/java/com/qianwen/smartman/common/constant/CommonConstant.java | 4 ++--
smart-man-boot/src/main/java/com/qianwen/smartman/modules/perf/service/impl/EmployeeSendServiceImpl.java | 14 ++++++++------
3 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/common/config/ForestConfig.java b/smart-man-boot/src/main/java/com/qianwen/smartman/common/config/ForestConfig.java
deleted file mode 100644
index 6692926..0000000
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/common/config/ForestConfig.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.qianwen.smartman.common.config;
-
-import cn.hutool.core.lang.Tuple;
-import com.dtflys.forest.callback.AddressSource;
-import com.dtflys.forest.http.ForestAddress;
-import com.dtflys.forest.http.ForestRequest;
-import java.net.MalformedURLException;
-import java.net.URL;
-import com.qianwen.smartman.common.cache.ParamCache;
-import com.qianwen.smartman.common.constant.CommonConstant;
-
-public class ForestConfig implements AddressSource {
- public ForestAddress getAddress(ForestRequest forestRequest) {
- String value = ParamCache.getValue(CommonConstant.DMP_CONFIG_NAME);
- Tuple tuple = getIpPort(value);
- return new ForestAddress((String) tuple.get(0), (Integer) tuple.get(1));
- }
-
- private Tuple getIpPort(String value) {
- try {
- URL url = new URL(value);
- return new Tuple(new Object[]{url.getHost(), Integer.valueOf(url.getPort())});
- } catch (MalformedURLException e) {
- return new Tuple(new Object[0]);
- }
- }
-}
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/common/constant/CommonConstant.java b/smart-man-boot/src/main/java/com/qianwen/smartman/common/constant/CommonConstant.java
index 2ececd1..4c964c7 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/common/constant/CommonConstant.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/common/constant/CommonConstant.java
@@ -2,8 +2,8 @@
public interface CommonConstant {
public static final String SERIAL_CONFIG_ADDRESS = "serial.config.address";
- public static final String DMP_CONFIG_NAME = "system.dmp.url";
- public static final String APPLICATION_NAME = "blade-api";
+ //public static final String DMP_CONFIG_NAME = "system.dmp.url";
+ public static final String APPLICATION_NAME = "smartman-api";
public static final String SWORD_NAME = "sword";
public static final String SABER_NAME = "saber";
public static final String DEFAULT_PARAM_PASSWORD = "account.initPassword";
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/perf/forestClient/PerfForestClient.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/perf/forestClient/PerfForestClient.java
deleted file mode 100644
index 795b416..0000000
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/perf/forestClient/PerfForestClient.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.qianwen.smartman.modules.perf.forestClient;
-
-import com.dtflys.forest.annotation.Address;
-import com.dtflys.forest.annotation.Get;
-import com.dtflys.forest.annotation.Var;
-import com.qianwen.smartman.common.config.ForestConfig;
-
-
-public interface PerfForestClient {
- @Get("/Dmp-Rocketmq/RocketMqComponentApi/PushParamRealtimeDataForMachine?machineId={machineId}¶mKey={paramKey}")
- @Address(source = ForestConfig.class)
- String perfEmployeeOnOff(@Var("machineId") String machineId, @Var("paramKey") String paramKey);
-}
diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/perf/service/impl/EmployeeSendServiceImpl.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/perf/service/impl/EmployeeSendServiceImpl.java
index 4dc888a..a7a93b5 100644
--- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/perf/service/impl/EmployeeSendServiceImpl.java
+++ b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/perf/service/impl/EmployeeSendServiceImpl.java
@@ -9,22 +9,24 @@
import com.qianwen.core.tool.utils.Func;
import com.qianwen.smartman.modules.smis.dto.MachineExtDTO;
import com.qianwen.smartman.modules.smis.service.IMachineService;
-import com.qianwen.smartman.modules.perf.forestClient.PerfForestClient;
+//import com.qianwen.smartman.modules.perf.forestClient.PerfForestClient;
import com.qianwen.smartman.modules.perf.service.IEmployeeSendService;
import com.qianwen.smartman.modules.sync.constant.QyWechatConstant;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
+/**
+ * 鍙兘璇ョ被娌℃湁鐢ㄤ簡
+ */
@Service
-
public class EmployeeSendServiceImpl implements IEmployeeSendService {
private static final Logger log = LoggerFactory.getLogger(EmployeeSendServiceImpl.class);
private final IMachineService machineService;
- private final PerfForestClient forestClient;
+ //private final PerfForestClient forestClient;
- public EmployeeSendServiceImpl(final IMachineService machineService, final PerfForestClient forestClient) {
+ public EmployeeSendServiceImpl(final IMachineService machineService) {//, final PerfForestClient forestClient
this.machineService = machineService;
- this.forestClient = forestClient;
+ //this.forestClient = forestClient;
}
@@ -38,7 +40,7 @@
String dmpId = this.machineService.queryDateTypeState(wId);
if (Func.isNotBlank(dmpId)) {
try {
- String employeeOnOff = this.forestClient.perfEmployeeOnOff(ext.getExtendId(), dmpId);
+ String employeeOnOff = "{}";//yangys 鍘绘帀浜嗭紝241030this.forestClient.perfEmployeeOnOff(ext.getExtendId(), dmpId);
JSONObject jsonObject = JSON.parseObject(employeeOnOff);
Boolean success = jsonObject.getBoolean(QyWechatConstant.CALLBACK_RESULT);
if (Boolean.FALSE.equals(success)) {
--
Gitblit v1.9.3