Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
custom-server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhonghong
custom-server
Commits
716dafb9
Commit
716dafb9
authored
Aug 04, 2026
by
Lizh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复测试过程中发现的问题
parent
22bfd09c
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
21 deletions
+77
-21
custom-server-app/src/main/java/com/jomalls/custom/app/service/system/SysComposeServerLogService.java
+8
-0
custom-server-app/src/main/java/com/jomalls/custom/app/service/system/impl/SysComposeServerLogServiceImpl.java
+16
-0
custom-server-app/src/main/java/com/jomalls/custom/app/service/system/impl/SysUserServiceImpl.java
+1
-1
custom-server-app/src/main/java/com/jomalls/custom/app/service/warehouse/CustomWarehouseInfoService.java
+1
-1
custom-server-app/src/main/java/com/jomalls/custom/app/service/warehouse/impl/CustomWarehouseInfoServiceImpl.java
+7
-7
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/system/SysComposeServerController.java
+13
-4
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/system/SysComposeServerLogController.java
+25
-6
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/warehouse/CustomWarehouseInfoController.java
+6
-2
No files found.
custom-server-app/src/main/java/com/jomalls/custom/app/service/system/SysComposeServerLogService.java
View file @
716dafb9
...
@@ -32,6 +32,14 @@ public interface SysComposeServerLogService {
...
@@ -32,6 +32,14 @@ public interface SysComposeServerLogService {
SysComposeServerLogVO
getById
(
Long
id
);
SysComposeServerLogVO
getById
(
Long
id
);
/**
/**
* 根据服务器ID查询最新一条日志
*
* @param composeServerId 服务器id
* @return 日志详情 VO
*/
SysComposeServerLogVO
getByComposeServerId
(
Long
composeServerId
);
/**
* 批量删除日志
* 批量删除日志
*
*
* @param idList 日志id列表
* @param idList 日志id列表
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/service/system/impl/SysComposeServerLogServiceImpl.java
View file @
716dafb9
...
@@ -40,6 +40,12 @@ public class SysComposeServerLogServiceImpl implements SysComposeServerLogServic
...
@@ -40,6 +40,12 @@ public class SysComposeServerLogServiceImpl implements SysComposeServerLogServic
if
(
log
.
getStatus
()
!=
null
)
{
if
(
log
.
getStatus
()
!=
null
)
{
wrapper
.
eq
(
SysComposeServerLogEntity:
:
getStatus
,
log
.
getStatus
());
wrapper
.
eq
(
SysComposeServerLogEntity:
:
getStatus
,
log
.
getStatus
());
}
}
if
(
StringUtils
.
hasText
(
log
.
getPost
()))
{
wrapper
.
like
(
SysComposeServerLogEntity:
:
getPost
,
log
.
getPost
());
}
if
(
StringUtils
.
hasText
(
log
.
getSubOrderNumbers
()))
{
wrapper
.
like
(
SysComposeServerLogEntity:
:
getSubOrderNumbers
,
log
.
getSubOrderNumbers
());
}
if
(
StringUtils
.
hasText
(
log
.
getBatchNumber
()))
{
if
(
StringUtils
.
hasText
(
log
.
getBatchNumber
()))
{
wrapper
.
like
(
SysComposeServerLogEntity:
:
getBatchNumber
,
log
.
getBatchNumber
());
wrapper
.
like
(
SysComposeServerLogEntity:
:
getBatchNumber
,
log
.
getBatchNumber
());
}
}
...
@@ -50,6 +56,16 @@ public class SysComposeServerLogServiceImpl implements SysComposeServerLogServic
...
@@ -50,6 +56,16 @@ public class SysComposeServerLogServiceImpl implements SysComposeServerLogServic
}
}
@Override
@Override
public
SysComposeServerLogVO
getByComposeServerId
(
Long
composeServerId
)
{
LambdaQueryWrapper
<
SysComposeServerLogEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SysComposeServerLogEntity:
:
getComposeServerId
,
composeServerId
)
.
orderByDesc
(
SysComposeServerLogEntity:
:
getCreateTime
)
.
last
(
"LIMIT 1"
);
SysComposeServerLogEntity
entity
=
sysComposeServerLogDomainService
.
getOne
(
wrapper
);
return
BeanMapper
.
mapper
().
convert
(
entity
,
SysComposeServerLogVO
.
class
);
}
@Override
public
SysComposeServerLogVO
getById
(
Long
id
)
{
public
SysComposeServerLogVO
getById
(
Long
id
)
{
SysComposeServerLogEntity
entity
=
sysComposeServerLogMapper
.
selectLogById
(
id
);
SysComposeServerLogEntity
entity
=
sysComposeServerLogMapper
.
selectLogById
(
id
);
return
BeanMapper
.
mapper
().
convert
(
entity
,
SysComposeServerLogVO
.
class
);
return
BeanMapper
.
mapper
().
convert
(
entity
,
SysComposeServerLogVO
.
class
);
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/service/system/impl/SysUserServiceImpl.java
View file @
716dafb9
...
@@ -263,7 +263,7 @@ public class SysUserServiceImpl implements SysUserService {
...
@@ -263,7 +263,7 @@ public class SysUserServiceImpl implements SysUserService {
for
(
Long
userId
:
userIds
)
{
for
(
Long
userId
:
userIds
)
{
SysUserEntity
user
=
new
SysUserEntity
();
SysUserEntity
user
=
new
SysUserEntity
();
user
.
setUserId
(
userId
);
user
.
setUserId
(
userId
);
user
.
setDelFlag
(
"1"
);
user
.
setDelFlag
(
SysUserStatusEnums
.
DELETED
.
getCode
()
);
sysUserDomainService
.
updateById
(
user
);
sysUserDomainService
.
updateById
(
user
);
}
}
log
.
info
(
"批量删除用户成功: count={}"
,
userIds
.
length
);
log
.
info
(
"批量删除用户成功: count={}"
,
userIds
.
length
);
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/service/warehouse/CustomWarehouseInfoService.java
View file @
716dafb9
...
@@ -27,7 +27,7 @@ public interface CustomWarehouseInfoService {
...
@@ -27,7 +27,7 @@ public interface CustomWarehouseInfoService {
* @param page 分页参数
* @param page 分页参数
* @return 分页结果
* @return 分页结果
*/
*/
IPage
<
CustomWarehouseInfoVO
>
pageList
(
CustomWarehouseInfoS
nakeVO
entity
,
Page
<
CustomWarehouseInfoSnake
VO
>
page
);
IPage
<
CustomWarehouseInfoVO
>
pageList
(
CustomWarehouseInfoS
aveDTO
entity
,
Page
<
CustomWarehouseInfo
VO
>
page
);
/**
/**
* 获取仓库状态列表
* 获取仓库状态列表
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/service/warehouse/impl/CustomWarehouseInfoServiceImpl.java
View file @
716dafb9
...
@@ -34,19 +34,19 @@ public class CustomWarehouseInfoServiceImpl implements CustomWarehouseInfoServic
...
@@ -34,19 +34,19 @@ public class CustomWarehouseInfoServiceImpl implements CustomWarehouseInfoServic
private
final
CustomWarehouseInfoDomainService
customWarehouseInfoDomainService
;
private
final
CustomWarehouseInfoDomainService
customWarehouseInfoDomainService
;
@Override
@Override
public
IPage
<
CustomWarehouseInfoVO
>
pageList
(
CustomWarehouseInfoS
nakeVO
entity
,
Page
<
CustomWarehouseInfoSnake
VO
>
page
)
{
public
IPage
<
CustomWarehouseInfoVO
>
pageList
(
CustomWarehouseInfoS
aveDTO
entity
,
Page
<
CustomWarehouseInfo
VO
>
page
)
{
LambdaQueryWrapper
<
CustomWarehouseInfoEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
CustomWarehouseInfoEntity
>
wrapper
=
new
LambdaQueryWrapper
<>();
// 按仓库名称模糊搜索
// 按仓库名称模糊搜索
if
(
StringUtils
.
hasText
(
entity
.
getWarehouse
_n
ame
()))
{
if
(
StringUtils
.
hasText
(
entity
.
getWarehouse
N
ame
()))
{
wrapper
.
like
(
CustomWarehouseInfoEntity:
:
getWarehouseName
,
entity
.
getWarehouse
_n
ame
());
wrapper
.
like
(
CustomWarehouseInfoEntity:
:
getWarehouseName
,
entity
.
getWarehouse
N
ame
());
}
}
// 按仓库编码模糊搜索
// 按仓库编码模糊搜索
if
(
StringUtils
.
hasText
(
entity
.
getWarehouse
_c
ode
()))
{
if
(
StringUtils
.
hasText
(
entity
.
getWarehouse
C
ode
()))
{
wrapper
.
like
(
CustomWarehouseInfoEntity:
:
getWarehouseCode
,
entity
.
getWarehouse
_c
ode
());
wrapper
.
like
(
CustomWarehouseInfoEntity:
:
getWarehouseCode
,
entity
.
getWarehouse
C
ode
());
}
}
// 按状态查询
// 按状态查询
if
(
entity
.
get
Status
()
!=
null
)
{
if
(
entity
.
get
CountryCode
()
!=
null
)
{
wrapper
.
eq
(
CustomWarehouseInfoEntity:
:
get
Status
,
entity
.
getStatus
());
wrapper
.
eq
(
CustomWarehouseInfoEntity:
:
get
CountryCode
,
entity
.
getCountryCode
());
}
}
// 按创建时间降序
// 按创建时间降序
wrapper
.
orderByDesc
(
CustomWarehouseInfoEntity:
:
getCreateTime
);
wrapper
.
orderByDesc
(
CustomWarehouseInfoEntity:
:
getCreateTime
);
...
...
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/system/SysComposeServerController.java
View file @
716dafb9
...
@@ -7,6 +7,7 @@ import com.jomalls.custom.app.dto.system.SysComposeServerSaveDTO;
...
@@ -7,6 +7,7 @@ import com.jomalls.custom.app.dto.system.SysComposeServerSaveDTO;
import
com.jomalls.custom.app.dto.system.SysComposeServerUpdateDTO
;
import
com.jomalls.custom.app.dto.system.SysComposeServerUpdateDTO
;
import
com.jomalls.custom.app.service.system.SysComposeServerService
;
import
com.jomalls.custom.app.service.system.SysComposeServerService
;
import
com.jomalls.custom.app.vo.system.SysComposeServerVO
;
import
com.jomalls.custom.app.vo.system.SysComposeServerVO
;
import
com.jomalls.custom.utils.AjaxResult
;
import
com.jomalls.custom.utils.R
;
import
com.jomalls.custom.utils.R
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
@@ -14,7 +15,9 @@ import lombok.RequiredArgsConstructor;
...
@@ -14,7 +15,9 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 服务器管理 Controller
* 服务器管理 Controller
...
@@ -34,13 +37,19 @@ public class SysComposeServerController {
...
@@ -34,13 +37,19 @@ public class SysComposeServerController {
@Operation
(
summary
=
"分页查询服务器列表"
)
@Operation
(
summary
=
"分页查询服务器列表"
)
@RequiresPermissions
(
"system:composeServer:list"
)
@RequiresPermissions
(
"system:composeServer:list"
)
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
public
R
<
IPage
<
SysComposeServerVO
>>
list
(
public
AjaxResult
list
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
SysComposeServerVO
server
)
{
SysComposeServerVO
server
)
{
Page
<
SysComposeServerVO
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
SysComposeServerVO
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
IPage
<
SysComposeServerVO
>
result
=
sysComposeServerService
.
pageList
(
server
,
page
);
IPage
<
SysComposeServerVO
>
result
=
sysComposeServerService
.
pageList
(
server
,
page
);
return
R
.
ok
(
result
);
// 构建前端需要的 {total, rows, code, msg} 结构
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"total"
,
result
.
getTotal
());
data
.
put
(
"rows"
,
result
.
getRecords
());
data
.
put
(
"code"
,
AjaxResult
.
SUCCESS
);
data
.
put
(
"msg"
,
"查询成功"
);
return
AjaxResult
.
success
(
data
);
}
}
@Operation
(
summary
=
"新增服务器"
)
@Operation
(
summary
=
"新增服务器"
)
...
@@ -58,14 +67,14 @@ public class SysComposeServerController {
...
@@ -58,14 +67,14 @@ public class SysComposeServerController {
}
}
@Operation
(
summary
=
"删除服务器"
)
@Operation
(
summary
=
"删除服务器"
)
@
Delete
Mapping
(
"/deleteById"
)
@
Get
Mapping
(
"/deleteById"
)
public
R
<
Void
>
deleteById
(
@RequestParam
Long
id
)
{
public
R
<
Void
>
deleteById
(
@RequestParam
Long
id
)
{
sysComposeServerService
.
deleteById
(
id
);
sysComposeServerService
.
deleteById
(
id
);
return
R
.
ok
();
return
R
.
ok
();
}
}
@Operation
(
summary
=
"更新服务器状态"
)
@Operation
(
summary
=
"更新服务器状态"
)
@
Pu
tMapping
(
"/updateStatusById"
)
@
Ge
tMapping
(
"/updateStatusById"
)
public
R
<
Void
>
updateStatusById
(
@RequestParam
Long
id
,
@RequestParam
Integer
status
)
{
public
R
<
Void
>
updateStatusById
(
@RequestParam
Long
id
,
@RequestParam
Integer
status
)
{
sysComposeServerService
.
updateStatusById
(
id
,
status
);
sysComposeServerService
.
updateStatusById
(
id
,
status
);
return
R
.
ok
();
return
R
.
ok
();
...
...
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/system/SysComposeServerLogController.java
View file @
716dafb9
...
@@ -5,14 +5,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,14 +5,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.jomalls.custom.app.annotation.RequiresPermissions
;
import
com.jomalls.custom.app.annotation.RequiresPermissions
;
import
com.jomalls.custom.app.service.system.SysComposeServerLogService
;
import
com.jomalls.custom.app.service.system.SysComposeServerLogService
;
import
com.jomalls.custom.app.vo.system.SysComposeServerLogVO
;
import
com.jomalls.custom.app.vo.system.SysComposeServerLogVO
;
import
com.jomalls.custom.utils.
R
;
import
com.jomalls.custom.utils.
AjaxResult
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 服务器日志管理 Controller
* 服务器日志管理 Controller
...
@@ -32,19 +35,35 @@ public class SysComposeServerLogController {
...
@@ -32,19 +35,35 @@ public class SysComposeServerLogController {
@Operation
(
summary
=
"分页查询服务器日志列表"
)
@Operation
(
summary
=
"分页查询服务器日志列表"
)
@RequiresPermissions
(
"system:composeServerLog:list"
)
@RequiresPermissions
(
"system:composeServerLog:list"
)
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
public
R
<
IPage
<
SysComposeServerLogVO
>>
list
(
public
AjaxResult
list
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
SysComposeServerLogVO
log
)
{
@RequestBody
SysComposeServerLogVO
log
)
{
Page
<
SysComposeServerLogVO
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
SysComposeServerLogVO
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
IPage
<
SysComposeServerLogVO
>
result
=
sysComposeServerLogService
.
pageList
(
log
,
page
);
IPage
<
SysComposeServerLogVO
>
result
=
sysComposeServerLogService
.
pageList
(
log
,
page
);
return
R
.
ok
(
result
);
// 构建前端需要的 {total, rows, code, msg} 结构
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"total"
,
result
.
getTotal
());
data
.
put
(
"rows"
,
result
.
getRecords
());
data
.
put
(
"code"
,
AjaxResult
.
SUCCESS
);
data
.
put
(
"msg"
,
"查询成功"
);
return
AjaxResult
.
success
(
data
);
}
@Operation
(
summary
=
"根据服务器ID查询日志"
)
@GetMapping
(
"/getServerLogById"
)
public
AjaxResult
getServerLogById
(
@RequestParam
(
"composeServerId"
)
Long
composeServerId
)
{
SysComposeServerLogVO
log
=
sysComposeServerLogService
.
getByComposeServerId
(
composeServerId
);
return
AjaxResult
.
success
(
log
);
}
}
@Operation
(
summary
=
"批量删除服务器日志"
)
@Operation
(
summary
=
"批量删除服务器日志"
)
@PostMapping
(
"/deleteByIdList"
)
@PostMapping
(
"/deleteByIdList"
)
public
R
<
Void
>
deleteByIdList
(
@RequestBody
List
<
Long
>
idList
)
{
public
AjaxResult
deleteByIdList
(
@RequestBody
List
<
Long
>
idList
)
{
if
(
CollectionUtils
.
isEmpty
(
idList
))
{
return
AjaxResult
.
error
(
"请选择删除的数据"
);
}
sysComposeServerLogService
.
deleteByIdList
(
idList
);
sysComposeServerLogService
.
deleteByIdList
(
idList
);
return
R
.
ok
();
return
AjaxResult
.
success
();
}
}
}
}
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/warehouse/CustomWarehouseInfoController.java
View file @
716dafb9
...
@@ -6,6 +6,7 @@ import com.jomalls.custom.app.annotation.RequiresPermissions;
...
@@ -6,6 +6,7 @@ import com.jomalls.custom.app.annotation.RequiresPermissions;
import
com.jomalls.custom.app.dto.warehouse.CustomWarehouseInfoSaveDTO
;
import
com.jomalls.custom.app.dto.warehouse.CustomWarehouseInfoSaveDTO
;
import
com.jomalls.custom.app.dto.warehouse.CustomWarehouseInfoUpdateDTO
;
import
com.jomalls.custom.app.dto.warehouse.CustomWarehouseInfoUpdateDTO
;
import
com.jomalls.custom.app.service.warehouse.CustomWarehouseInfoService
;
import
com.jomalls.custom.app.service.warehouse.CustomWarehouseInfoService
;
import
com.jomalls.custom.app.vo.system.SysUserVO
;
import
com.jomalls.custom.app.vo.warehouse.CustomWarehouseInfoSnakeVO
;
import
com.jomalls.custom.app.vo.warehouse.CustomWarehouseInfoSnakeVO
;
import
com.jomalls.custom.app.vo.warehouse.CustomWarehouseInfoVO
;
import
com.jomalls.custom.app.vo.warehouse.CustomWarehouseInfoVO
;
import
com.jomalls.custom.utils.AjaxResult
;
import
com.jomalls.custom.utils.AjaxResult
;
...
@@ -42,8 +43,11 @@ public class CustomWarehouseInfoController {
...
@@ -42,8 +43,11 @@ public class CustomWarehouseInfoController {
@Operation
(
summary
=
"分页查询仓库列表"
)
@Operation
(
summary
=
"分页查询仓库列表"
)
@RequiresPermissions
(
"business:customWarehouse:list"
)
@RequiresPermissions
(
"business:customWarehouse:list"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
IPage
<
CustomWarehouseInfoVO
>
list
(
CustomWarehouseInfoSnakeVO
entity
,
Page
<
CustomWarehouseInfoSnakeVO
>
page
)
{
public
IPage
<
CustomWarehouseInfoVO
>
list
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
return
customWarehouseInfoService
.
pageList
(
entity
,
page
);
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
CustomWarehouseInfoSaveDTO
warehouseInfo
)
{
Page
<
CustomWarehouseInfoVO
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
return
customWarehouseInfoService
.
pageList
(
warehouseInfo
,
page
);
}
}
@Operation
(
summary
=
"新增仓库"
)
@Operation
(
summary
=
"新增仓库"
)
...
...
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