This commit is contained in:
2025-12-24 08:59:38 +08:00
2 changed files with 13 additions and 72 deletions

View File

@@ -38,12 +38,7 @@ import java.nio.charset.StandardCharsets;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.sql.*;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*;
import java.util.Date;
@Service
@Slf4j
@@ -92,23 +87,6 @@ public class LyricIntegrateService {
private String FREELINK_PUSH_MSG_SUFFIX;
//生产环境
/**
private final String EP_URL = "https://ep-url.lyh.haikuicloud.com;
*/
@Value("${URL}")
private String URL;
@Value("${USER_NAME}")
private String USERNAME; // 你的 MySQL 用户名
@Value("${PASSWORD}")
private String PASSWORD; // 你的 MySQL 密码
/**
* 生成海葵云token签名
*
@@ -511,38 +489,6 @@ public class LyricIntegrateService {
return response;
}
/**
* 获取待办列表
* @return
*/
public SdmResponse getTodoList() {
String todayStartTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(LocalDate.now().atStartOfDay().atZone(ZoneId.systemDefault()).toInstant().toEpochMilli()));
String sql = "SELECT * FROM V_TODO_EMULATION_INFO WHERE create_time > ? AND status = ?";
// 声明JDBC核心对象try-with-resources 自动关闭资源)
try (Connection conn = DriverManager.getConnection(URL, USERNAME, PASSWORD)) {
PreparedStatement stmt = conn.prepareStatement(sql);
stmt.setString(1,todayStartTime);
stmt.setString(2,"0");
// 执行视图查询
ResultSet rs = stmt.executeQuery();
while (rs.next()) {
String projectName = rs.getString("projectName");
String status = rs.getString("status");
Date createTime = rs.getDate("createTime");
log.info("projectName为{}status{}createTime为{}", projectName, status,createTime);
}
} catch (SQLException e) {
// 异常处理
System.err.println("JDBC 操作异常:" + e.getMessage());
log.info(e.getMessage());
}
return SdmResponse.success();
}
}

View File

@@ -3,6 +3,8 @@ spring:
second:
username: EP_DM
password: EP_DM@123.COM
# username: root
# password: mysql
# todo 生产地址
jdbc-url: jdbc:mysql://10.122.48.11:13306/easy_project?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
# jdbc-url: jdbc:mysql://127.0.0.1:3306/second_db?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=Asia/Shanghai
@@ -17,34 +19,27 @@ spring:
appKey : e9eb516aa02a43a29e227a0d901ec5f1
appSecret : 9fac43db08634aaf8a9fe5fb9468de9d
# 海葵云url
HK_CLOUD_URL : https://url.lyhhaikuicloud.com
HK_CLOUD_URL : https://v15.lyh.haikuidcloud.com
# 1. 海葵云获取用户token url后缀
HK_USER_TOKEN_URL_SUFFIX : /merchant/openapi/user/login/jobNo
HK_USER_TOKEN_URL_SUFFIX: /merchant/openapi/user/login/jobNo
# 2. 海葵云获取单个用户信息url后缀
HK_SIMPLE_USER_URL_SUFFIX : /merchant/api/user/getSimpleUserInfo
HK_SIMPLE_USER_URL_SUFFIX: /merchant/api/user/getSimpleUserInfo
# 3. 海葵云上传文件url后缀
HK_UPLOAD_FILE_URL_SUFFIX : /haikui-oa/autoCreateFlow/uploadFile
HK_UPLOAD_FILE_URL_SUFFIX: /haikui-oa/autoCreateFlow/uploadFile
# 获取项目工位实例号
HK_GET_PROCESS_DATA_SUFFIX: todo
HK_GET_PROCESS_DATA_SUFFIX: /haikui-oa/autoCreateFlow/getProcessData/oa_three_d_review
# EP系统URL
#EP_URL : https://ep-url.dev.haikuicloud.com
# 开发环境
EP_URL : https://ep-url-test.lyh.haikuicloud.com
# 推送代办状态url后缀 todo不用
QUERY_TODO_STATUS_SUFFIX : /todoApi/todo/emulation/dm/status
# 查询待办结果url后缀 todo不用
QUERY_TODO_RESULT_SUFFIX : /todoApi/todo/emulation/dm/result
EP_URL: https://ep-url-test.lyh.haikuicloud.com
# 推送代办状态url后缀
QUERY_TODO_STATUS_SUFFIX: /todoApi/todo/emulation/dm/status
# 查询待办结果url后缀
QUERY_TODO_RESULT_SUFFIX: /todoApi/todo/emulation/dm/result
# 6. 查询待办附加url后缀
QUERY_TOD_ATTACHMENT_SUFFIX : /todoApi/todo/emulation/dm/attachments
QUERY_TOD_ATTACHMENT_SUFFIX: /todoApi/todo/emulation/dm/attachments
# 即时通url
FREELINK_URL: http://freelink.haikui.com
FREELINK_PUSH_MSG_SUFFIX: /webchat/InformApi/FreelinkAndDingdingInform
# 海葵云 数据库连接
URL : jdbc:mysql://127.0.0.1:3306/spdm_baseline?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
# 海葵云 数据库用户名
USER_NAME : root
# 海葵云 数据库密码
PASSWORD : ldy123456