Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
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
赵啸非
smart_gov_platform
Commits
8ed0eda9
Commit
8ed0eda9
authored
Nov 29, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改app克隆
parent
7db10bfd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
4 deletions
+43
-4
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppServiceImpl.java
...m/mortals/xhx/module/app/service/impl/AppServiceImpl.java
+4
-1
base-manager/src/main/java/com/mortals/xhx/module/app/web/AppController.java
...in/java/com/mortals/xhx/module/app/web/AppController.java
+0
-2
base-manager/src/test/java/com/mortals/httpclient/app/AppController.http
...c/test/java/com/mortals/httpclient/app/AppController.http
+11
-0
base-manager/src/test/java/com/mortals/httpclient/app/AppDatasetController.http
...java/com/mortals/httpclient/app/AppDatasetController.http
+28
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppServiceImpl.java
View file @
8ed0eda9
...
...
@@ -108,6 +108,7 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
AppEntity
appClone
=
new
AppEntity
();
appClone
.
initAttrValue
();
BeanUtils
.
copyProperties
(
appEntity
,
appClone
,
BeanUtil
.
getNullPropertyNames
(
appEntity
));
appClone
.
setVersion
(
appEntity
.
getVersion
());
appClone
.
setDistribute
(
YesNoEnum
.
NO
.
getValue
());
appClone
.
setDownDevCount
(
0
);
appClone
.
setSiteId
(
siteEntity
.
getId
());
...
...
@@ -122,6 +123,7 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
AppDatasetEntity
appDatasetClone
=
new
AppDatasetEntity
();
appDatasetClone
.
initAttrValue
();
BeanUtils
.
copyProperties
(
appDatasetEntity
,
appDatasetClone
,
BeanUtil
.
getNullPropertyNames
(
appDatasetEntity
));
appDatasetClone
.
setAppId
(
appClone
.
getId
());
appDatasetService
.
save
(
appDatasetClone
,
context
);
//保存属性列表
List
<
AppInfoFieldEntity
>
appInfoFieldList
=
appDatasetEntity
.
getAppInfoFieldList
();
...
...
@@ -149,7 +151,7 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
AppInfoTempleteFieldEntity
appInfoTempleteFieldClone
=
new
AppInfoTempleteFieldEntity
();
appInfoTempleteFieldClone
.
initAttrValue
();
BeanUtils
.
copyProperties
(
appInfoTempleteFieldEntity
,
appInfoTempleteFieldClone
,
BeanUtil
.
getNullPropertyNames
(
appInfoTempleteFieldEntity
));
appInfoTempleteFieldClone
.
setId
(
appClone
.
getId
());
appInfoTempleteFieldClone
.
set
App
Id
(
appClone
.
getId
());
appInfoTempleteFieldCloneList
.
add
(
appInfoTempleteFieldClone
);
}
if
(!
ObjectUtils
.
isEmpty
(
appInfoTempleteFieldCloneList
))
{
...
...
@@ -165,6 +167,7 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
AppVersionEntity
appVersionClone
=
new
AppVersionEntity
();
appVersionClone
.
initAttrValue
();
BeanUtils
.
copyProperties
(
appVersionEntity
,
appVersionClone
,
BeanUtil
.
getNullPropertyNames
(
appVersionEntity
));
appVersionClone
.
setAppId
(
appClone
.
getId
());
appVersionCloneList
.
add
(
appVersionClone
);
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/app/web/AppController.java
View file @
8ed0eda9
...
...
@@ -107,9 +107,7 @@ public class AppController extends BaseCRUDJsonBodyMappingController<AppService,
throw
new
AppException
(
"克隆站点Id列表不能为空!"
);
}
List
<
AppEntity
>
appEntityList
=
this
.
service
.
find
(
new
AppQuery
().
idList
(
appQuery
.
getIdList
()),
getContext
());
List
<
SiteEntity
>
siteEntityList
=
siteService
.
find
(
new
SiteQuery
().
idList
(
appQuery
.
getSiteIdList
()),
getContext
());
Rest
<
String
>
cloneRest
=
this
.
service
.
cloneAppsBySites
(
appEntityList
,
siteEntityList
,
getContext
());
recordSysLog
(
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
e
)
{
...
...
base-manager/src/test/java/com/mortals/httpclient/app/AppController.http
View file @
8ed0eda9
...
...
@@ -68,5 +68,16 @@ Authorization: {{authToken}}
Accept: application/json
###自助终端应用克隆
POST {{baseUrl}}/app/cloneAppsBySites
Authorization: {{authToken}}
Content-Type: application/json
{
"idList":[1],
"siteIdList":[3,7,8]
}
base-manager/src/test/java/com/mortals/httpclient/app/AppDatasetController.http
View file @
8ed0eda9
...
...
@@ -31,7 +31,34 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"appId":1
"appId":1,
"appInfoFieldList":[
{
"fieldCode": "title5",
"fieldName": "标题5",
"fieldType": "input",
"dataType": "number",
"fieldValue": "zo0",
"fieldLen": 255,
"fieldNull": 1,
"isList": 1,
"fieldOrderNo": "1",
"remark": "1111111111"
},
{
"fieldCode": "title6",
"fieldName": "标题6",
"fieldType": "input",
"dataType": "number",
"fieldValue": "zo0",
"fieldLen": 255,
"fieldNull": 1,
"isList": 1,
"fieldOrderNo": "1",
"remark": "22222222222222"
}
]
}
> {%
...
...
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