Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setup-manager
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
setup-manager
Commits
9b9bf6c4
Commit
9b9bf6c4
authored
Nov 14, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加产品资源枚举类
parent
9c0dcc6b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/web/SetupProjectController.java
.../mortals/xhx/module/setup/web/SetupProjectController.java
+29
-3
No files found.
setup-project-manager/src/main/java/com/mortals/xhx/module/setup/web/SetupProjectController.java
View file @
9b9bf6c4
...
@@ -76,7 +76,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
...
@@ -76,7 +76,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
@Override
@Override
protected
void
doListBefore
(
SetupProjectEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
protected
void
doListBefore
(
SetupProjectEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
query
.
setSize
(
50
);
query
.
setSize
(
50
);
// query.setOrderColList(Arrays.asList(new OrderCol("projectCode"),new OrderCol("orderNum")));
// query.setOrderColList(Arrays.asList(new OrderCol("projectCode"),new OrderCol("orderNum")));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"orderNum"
)));
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"orderNum"
)));
super
.
doListBefore
(
query
,
model
,
context
);
super
.
doListBefore
(
query
,
model
,
context
);
}
}
...
@@ -108,6 +108,32 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
...
@@ -108,6 +108,32 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
}
}
/**
* 批量部署
*/
@ApiOperation
(
value
=
"批量项目部署"
,
notes
=
"部署"
)
@PostMapping
(
value
=
"batchDistribute"
)
public
Rest
<
Void
>
batchDistribute
(
@RequestBody
SetupProjectEntity
setupProjectEntity
)
{
String
busiDesc
=
this
.
getModuleDesc
()
+
"设备模块部署"
;
Rest
<
Void
>
rest
=
Rest
.
ok
(
busiDesc
+
" 【成功】"
);
try
{
if
(!
ObjectUtils
.
isEmpty
(
setupProjectEntity
.
getIdList
()))
{
SetupProjectQuery
setupProjectQuery
=
new
SetupProjectQuery
();
setupProjectQuery
.
setIdList
(
setupProjectEntity
.
getIdList
());
List
<
SetupProjectEntity
>
setupProjectEntities
=
this
.
service
.
find
(
setupProjectQuery
,
getContext
());
for
(
SetupProjectEntity
projectEntity
:
setupProjectEntities
)
{
this
.
service
.
distribute
(
projectEntity
,
getContext
());
}
}
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"批量项目部署"
,
e
);
rest
=
Rest
.
fail
(
super
.
convertException
(
e
));
}
return
rest
;
}
/**
/**
* 部署
* 部署
*/
*/
...
@@ -225,7 +251,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
...
@@ -225,7 +251,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
if
(
YesNoEnum
.
YES
.
getValue
()
==
rest
.
getCode
())
{
if
(
YesNoEnum
.
YES
.
getValue
()
==
rest
.
getCode
())
{
ret
.
put
(
KEY_RESULT_MSG
,
"更新事项命令下发成功!"
);
ret
.
put
(
KEY_RESULT_MSG
,
"更新事项命令下发成功!"
);
this
.
service
.
update
(
setupProject
);
this
.
service
.
update
(
setupProject
);
}
else
{
}
else
{
ret
.
put
(
KEY_RESULT_MSG
,
"更新事项命令下发失败"
);
ret
.
put
(
KEY_RESULT_MSG
,
"更新事项命令下发失败"
);
}
}
...
@@ -486,7 +512,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
...
@@ -486,7 +512,7 @@ public class SetupProjectController extends BaseCRUDJsonBodyMappingController<Se
SetupProjectQuery
setupProjectQuery
=
new
SetupProjectQuery
();
SetupProjectQuery
setupProjectQuery
=
new
SetupProjectQuery
();
setupProjectQuery
.
setProjectCode
(
基础服务后端
.
getValue
());
setupProjectQuery
.
setProjectCode
(
基础服务后端
.
getValue
());
SetupProjectEntity
setupProjectEntity
=
this
.
service
.
selectOne
(
setupProjectQuery
);
SetupProjectEntity
setupProjectEntity
=
this
.
service
.
selectOne
(
setupProjectQuery
);
if
(
ObjectUtils
.
isEmpty
(
setupProjectEntity
)){
if
(
ObjectUtils
.
isEmpty
(
setupProjectEntity
))
{
throw
new
AppException
(
"基础服务不存在"
);
throw
new
AppException
(
"基础服务不存在"
);
}
}
//判断资源文件是否已经上传
//判断资源文件是否已经上传
...
...
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