Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1f47e2f0
authored
Aug 04, 2026
by
renyizhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端显示服务器ip 初始账号 初始密码
parent
950495a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
0 deletions
+43
-0
computility-module-compute/computility-module-compute-biz/src/main/java/com/luhu/computility/module/compute/controller/app/resourceordersnapshot/vo/AppResourceOrderSnapshotSaveReqVO.java
+6
-0
computility-module-compute/computility-module-compute-biz/src/main/java/com/luhu/computility/module/compute/dal/dataobject/resourceordersnapshot/ResourceOrderSnapshotDO.java
+10
-0
computility-module-compute/computility-module-compute-biz/src/main/java/com/luhu/computility/module/compute/service/resourceorder/ResourceOrderServiceImpl.java
+6
-0
sql/migration/2026_07_29_resource_order_snapshot_init_account.sql
+21
-0
No files found.
computility-module-compute/computility-module-compute-biz/src/main/java/com/luhu/computility/module/compute/controller/app/resourceordersnapshot/vo/AppResourceOrderSnapshotSaveReqVO.java
View file @
1f47e2f0
...
@@ -72,6 +72,12 @@ public class AppResourceOrderSnapshotSaveReqVO {
...
@@ -72,6 +72,12 @@ public class AppResourceOrderSnapshotSaveReqVO {
@NotBlank
(
message
=
"服务器IP不能为空"
)
@NotBlank
(
message
=
"服务器IP不能为空"
)
private
String
ip
;
private
String
ip
;
@Schema
(
description
=
"服务器初始用户名"
,
example
=
"root"
)
private
String
initUsername
;
@Schema
(
description
=
"服务器初始密码"
,
example
=
"password123"
)
private
String
initPassword
;
@Schema
(
description
=
"SPU名称"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"GPU服务器A型"
)
@Schema
(
description
=
"SPU名称"
,
requiredMode
=
Schema
.
RequiredMode
.
REQUIRED
,
example
=
"GPU服务器A型"
)
@NotBlank
(
message
=
"SPU名称不能为空"
)
@NotBlank
(
message
=
"SPU名称不能为空"
)
private
String
spuName
;
private
String
spuName
;
...
...
computility-module-compute/computility-module-compute-biz/src/main/java/com/luhu/computility/module/compute/dal/dataobject/resourceordersnapshot/ResourceOrderSnapshotDO.java
View file @
1f47e2f0
...
@@ -94,6 +94,16 @@ public class ResourceOrderSnapshotDO extends BaseDO {
...
@@ -94,6 +94,16 @@ public class ResourceOrderSnapshotDO extends BaseDO {
private
String
ip
;
private
String
ip
;
/**
/**
* 服务器初始用户名快照
*/
private
String
initUsername
;
/**
* 服务器初始密码快照
*/
private
String
initPassword
;
/**
* SPU名称快照
* SPU名称快照
*/
*/
private
String
spuName
;
private
String
spuName
;
...
...
computility-module-compute/computility-module-compute-biz/src/main/java/com/luhu/computility/module/compute/service/resourceorder/ResourceOrderServiceImpl.java
View file @
1f47e2f0
...
@@ -455,6 +455,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
...
@@ -455,6 +455,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
respVO
.
setPowerSupply
(
snapshot
.
getPowerSupply
());
respVO
.
setPowerSupply
(
snapshot
.
getPowerSupply
());
respVO
.
setNic
(
snapshot
.
getNic
());
respVO
.
setNic
(
snapshot
.
getNic
());
respVO
.
setIp
(
snapshot
.
getIp
());
respVO
.
setIp
(
snapshot
.
getIp
());
respVO
.
setInitUsername
(
snapshot
.
getInitUsername
());
respVO
.
setInitPassword
(
snapshot
.
getInitPassword
());
respVO
.
setSkuName
(
snapshot
.
getSpuName
()
+
" - "
+
snapshot
.
getDurationDays
()
+
"天"
);
respVO
.
setSkuName
(
snapshot
.
getSpuName
()
+
" - "
+
snapshot
.
getDurationDays
()
+
"天"
);
// 快照中没有的字段(分类、位置)需要从SPU获取
// 快照中没有的字段(分类、位置)需要从SPU获取
...
@@ -489,6 +491,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
...
@@ -489,6 +491,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
respVO
.
setNic
(
spu
.
getNic
());
respVO
.
setNic
(
spu
.
getNic
());
respVO
.
setIp
(
spu
.
getIp
());
respVO
.
setIp
(
spu
.
getIp
());
respVO
.
setLocation
(
spu
.
getLocation
());
respVO
.
setLocation
(
spu
.
getLocation
());
respVO
.
setInitUsername
(
spu
.
getInitUsername
());
respVO
.
setInitPassword
(
spu
.
getInitPassword
());
respVO
.
setSkuName
(
spu
.
getName
()
+
" - "
+
sku
.
getDurationDays
()
+
"天"
);
respVO
.
setSkuName
(
spu
.
getName
()
+
" - "
+
sku
.
getDurationDays
()
+
"天"
);
// 设置分类名称
// 设置分类名称
...
@@ -856,6 +860,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
...
@@ -856,6 +860,8 @@ public class ResourceOrderServiceImpl implements ResourceOrderService {
createReqVO
.
setMemoryCapacity
(
spu
.
getMemoryCapacity
());
createReqVO
.
setMemoryCapacity
(
spu
.
getMemoryCapacity
());
createReqVO
.
setLocation
(
spu
.
getLocation
());
createReqVO
.
setLocation
(
spu
.
getLocation
());
createReqVO
.
setIp
(
spu
.
getIp
());
createReqVO
.
setIp
(
spu
.
getIp
());
createReqVO
.
setInitUsername
(
spu
.
getInitUsername
());
createReqVO
.
setInitPassword
(
spu
.
getInitPassword
());
createReqVO
.
setSpuName
(
spu
.
getName
());
createReqVO
.
setSpuName
(
spu
.
getName
());
createReqVO
.
setDurationDays
(
sku
.
getDurationDays
());
createReqVO
.
setDurationDays
(
sku
.
getDurationDays
());
createReqVO
.
setRentStartTime
(
order
.
getRentStartTime
());
createReqVO
.
setRentStartTime
(
order
.
getRentStartTime
());
...
...
sql/migration/2026_07_29_resource_order_snapshot_init_account.sql
0 → 100644
View file @
1f47e2f0
-- ============================================================
-- 算力资源订单硬件配置快照:新增服务器初始用户名 / 密码 字段
-- 适用数据库:MySQL 5.7+ / 8.0
-- 适用表: compute_resource_order_snapshot
-- 创建时间: 2026-07-29
-- 说明: 用于"我的资源 - 订单详情"展示服务器登录凭证,
-- 沿用快照设计避免 SPU 改密后影响历史订单
-- ============================================================
USE
`new_computility`
;
ALTER
TABLE
`compute_resource_order_snapshot`
ADD
COLUMN
`init_username`
VARCHAR
(
64
)
NULL
DEFAULT
NULL
COMMENT
'服务器初始用户名(快照)'
AFTER
`ip`
,
ADD
COLUMN
`init_password`
VARCHAR
(
128
)
NULL
DEFAULT
NULL
COMMENT
'服务器初始密码(快照)'
AFTER
`init_username`
;
-- 验证:
-- SHOW COLUMNS FROM `compute_resource_order_snapshot` LIKE 'init_%';
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment