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
25d39c81
Commit
25d39c81
authored
Nov 29, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加自主终端应用实现
parent
1440d361
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
980 additions
and
2432 deletions
+980
-2432
base-manager/doc/api.md
base-manager/doc/api.md
+863
-2358
base-manager/src/main/java/com/mortals/xhx/module/app/model/AppDatasetEntity.java
...va/com/mortals/xhx/module/app/model/AppDatasetEntity.java
+4
-7
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppDatasetServiceImpl.java
...ls/xhx/module/app/service/impl/AppDatasetServiceImpl.java
+41
-15
base-manager/src/test/java/com/mortals/httpclient/app/AppController.http
...c/test/java/com/mortals/httpclient/app/AppController.http
+3
-4
base-manager/src/test/java/com/mortals/httpclient/app/AppDatasetController.http
...java/com/mortals/httpclient/app/AppDatasetController.http
+2
-2
base-manager/src/test/java/com/mortals/httpclient/app/AppInfoFieldController.http
...va/com/mortals/httpclient/app/AppInfoFieldController.http
+56
-26
base-manager/src/test/java/com/mortals/httpclient/app/AppInfoTempleteFieldController.http
...ortals/httpclient/app/AppInfoTempleteFieldController.http
+11
-20
No files found.
base-manager/doc/api.md
View file @
25d39c81
This source diff could not be displayed because it is too large. You can
view the blob
instead.
base-manager/src/main/java/com/mortals/xhx/module/app/model/AppDatasetEntity.java
View file @
25d39c81
package
com.mortals.xhx.module.app.model
;
package
com.mortals.xhx.module.app.model
;
import
java.util.List
;
import
java.util.List
;
import
java.util.ArrayList
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.app.model.vo.AppDatasetVo
;
import
com.mortals.xhx.module.app.model.vo.AppDatasetVo
;
import
com.mortals.xhx.module.app.model.AppInfoFieldEntity
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
/**
* 自助终端应用数据集实体对象
* 自助终端应用数据集实体对象
*
*
...
...
base-manager/src/main/java/com/mortals/xhx/module/app/service/impl/AppDatasetServiceImpl.java
View file @
25d39c81
...
@@ -36,34 +36,60 @@ public class AppDatasetServiceImpl extends AbstractCRUDServiceImpl<AppDatasetDao
...
@@ -36,34 +36,60 @@ public class AppDatasetServiceImpl extends AbstractCRUDServiceImpl<AppDatasetDao
private
AppService
appService
;
private
AppService
appService
;
@Autowired
@Autowired
private
AppVersionService
appVersionService
;
private
AppVersionService
appVersionService
;
@Override
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
protected
void
saveAfter
(
AppDatasetEntity
entity
,
Context
context
)
throws
AppException
{
List
<
AppInfoFieldEntity
>
appInfoFieldlist
=
appInfoFieldService
.
find
(
new
AppInfoFieldQuery
().
datasetIdList
(
Arrays
.
asList
(
ids
)));
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppInfoFieldList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
appInfoFieldlist
)){
entity
.
getAppInfoFieldList
().
stream
().
peek
(
item
->
{
appInfoFieldService
.
removeList
(
appInfoFieldlist
,
context
);
item
.
setDatasetId
(
entity
.
getId
());
}
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
super
.
removeAfter
(
ids
,
context
,
result
);
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateTime
(
new
Date
());
}).
count
();
appInfoFieldService
.
save
(
entity
.
getAppInfoFieldList
());
}
//更新版本号
AppEntity
appEntity
=
appService
.
get
(
entity
.
getAppId
(),
context
);
saveOrUpdateAppVersion
(
appEntity
,
context
);
super
.
saveAfter
(
entity
,
context
);
}
}
@Override
@Override
protected
void
updateAfter
(
AppDatasetEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateAfter
(
AppDatasetEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppInfoFieldList
()))
{
Long
[]
appInfoFieldIds
=
appInfoFieldService
.
find
(
new
AppInfoFieldQuery
().
datasetId
(
entity
.
getId
())).
stream
().
map
(
AppInfoFieldEntity:
:
getId
).
toArray
(
Long
[]::
new
);
appInfoFieldService
.
remove
(
appInfoFieldIds
,
context
);
entity
.
getAppInfoFieldList
().
stream
().
peek
(
item
->
{
item
.
setDatasetId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateTime
(
new
Date
());
item
.
setUpdateUser
(
context
.
getUser
().
getLoginName
());
item
.
setUpdateUserId
(
context
.
getUser
().
getId
());
item
.
setUpdateTime
(
new
Date
());
}).
count
();
appInfoFieldService
.
save
(
entity
.
getAppInfoFieldList
());
}
//更新版本号
AppEntity
appEntity
=
appService
.
get
(
entity
.
getAppId
(),
context
);
AppEntity
appEntity
=
appService
.
get
(
entity
.
getAppId
(),
context
);
saveOrUpdateAppVersion
(
appEntity
,
context
);
saveOrUpdateAppVersion
(
appEntity
,
context
);
super
.
updateAfter
(
entity
,
context
);
super
.
updateAfter
(
entity
,
context
);
}
}
@Override
@Override
protected
void
saveAfter
(
AppDatasetEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
//更新版本号
List
<
AppInfoFieldEntity
>
appInfoFieldlist
=
appInfoFieldService
.
find
(
new
AppInfoFieldQuery
().
datasetIdList
(
Arrays
.
asList
(
ids
)));
AppEntity
appEntity
=
appService
.
get
(
entity
.
getAppId
(),
context
);
if
(!
ObjectUtils
.
isEmpty
(
appInfoFieldlist
))
{
saveOrUpdateAppVersion
(
appEntity
,
context
);
appInfoFieldService
.
removeList
(
appInfoFieldlist
,
context
);
super
.
saveAfter
(
entity
,
context
);
}
super
.
removeAfter
(
ids
,
context
,
result
);
}
}
private
void
saveOrUpdateAppVersion
(
AppEntity
appEntity
,
Context
context
)
{
private
void
saveOrUpdateAppVersion
(
AppEntity
appEntity
,
Context
context
)
{
if
(!
ObjectUtils
.
isEmpty
(
appEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
appEntity
))
{
String
version
=
appEntity
.
getVersion
();
String
version
=
appEntity
.
getVersion
();
String
versionNum
=
StrUtil
.
subAfter
(
version
,
Constant
.
VERSION_PREFIX
,
false
);
String
versionNum
=
StrUtil
.
subAfter
(
version
,
Constant
.
VERSION_PREFIX
,
false
);
String
newVersionNum
=
NumberUtil
.
add
(
versionNum
,
"0.1"
).
setScale
(
1
).
toString
();
String
newVersionNum
=
NumberUtil
.
add
(
versionNum
,
"0.1"
).
setScale
(
1
).
toString
();
...
@@ -71,7 +97,7 @@ public class AppDatasetServiceImpl extends AbstractCRUDServiceImpl<AppDatasetDao
...
@@ -71,7 +97,7 @@ public class AppDatasetServiceImpl extends AbstractCRUDServiceImpl<AppDatasetDao
appVersionEntity
.
initAttrValue
();
appVersionEntity
.
initAttrValue
();
AppVersionEntity
versionEntity
=
new
AppVersionEntity
();
AppVersionEntity
versionEntity
=
new
AppVersionEntity
();
versionEntity
.
initAttrValue
();
versionEntity
.
initAttrValue
();
versionEntity
.
setVersion
(
Constant
.
VERSION_PREFIX
+
newVersionNum
);
versionEntity
.
setVersion
(
Constant
.
VERSION_PREFIX
+
newVersionNum
);
versionEntity
.
setNotes
(
"应用数据更新!"
);
versionEntity
.
setNotes
(
"应用数据更新!"
);
versionEntity
.
setCreateTime
(
new
Date
());
versionEntity
.
setCreateTime
(
new
Date
());
versionEntity
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
versionEntity
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
...
...
base-manager/src/test/java/com/mortals/httpclient/app/AppController.http
View file @
25d39c81
...
@@ -4,7 +4,7 @@ Content-Type: application/json
...
@@ -4,7 +4,7 @@ Content-Type: application/json
{
{
"loginName":"admin",
"loginName":"admin",
"password":"ad
min
",
"password":"ad
smile
",
"securityCode":"8888"
"securityCode":"8888"
}
}
...
@@ -36,13 +36,12 @@ Content-Type: application/json
...
@@ -36,13 +36,12 @@ Content-Type: application/json
"siteName":"汇东县",
"siteName":"汇东县",
"appCode":"cheshi",
"appCode":"cheshi",
"appName":"测试应用",
"appName":"测试应用",
"appIconPath":"/
xxx/xx
.jpg",
"appIconPath":"/
file/preview/196089969797
.jpg",
"appThemeName":"应用程序",
"appThemeName":"应用程序",
"type":1,
"type":1,
"downDevCount":0,
"downDevCount":0,
"shelves":0,
"shelves":0,
"filePath":"njmfzd",
"filePath":"file/uploadfile/1661928678354.zip",
"distributeFilePath":"ie8ice",
"version":"1.0",
"version":"1.0",
"summary":"vyk2sq",
"summary":"vyk2sq",
"distribute":0
"distribute":0
...
...
base-manager/src/test/java/com/mortals/httpclient/app/AppDatasetController.http
View file @
25d39c81
...
@@ -19,7 +19,7 @@ Authorization: {{authToken}}
...
@@ -19,7 +19,7 @@ Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
"appId":
867
,
"appId":
1
,
"page":1,
"page":1,
"size":10
"size":10
}
}
...
@@ -31,7 +31,7 @@ Authorization: {{authToken}}
...
@@ -31,7 +31,7 @@ Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
"appId":
526,
"appId":
1
}
}
> {%
> {%
...
...
base-manager/src/test/java/com/mortals/httpclient/app/AppInfoFieldController.http
View file @
25d39c81
...
@@ -3,9 +3,9 @@ POST {{baseUrl}}/login/login
...
@@ -3,9 +3,9 @@ POST {{baseUrl}}/login/login
Content-Type: application/json
Content-Type: application/json
{
{
"loginName":
"admin",
"loginName":
"admin",
"password":
"admin",
"password":
"admin",
"securityCode":
"8888"
"securityCode":
"8888"
}
}
> {%
> {%
...
@@ -19,18 +19,9 @@ Authorization: {{authToken}}
...
@@ -19,18 +19,9 @@ Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
"datasetId":623,
"datasetId": 1,
"fieldCode":"3cl109",
"page": 1,
"fieldName":"ga3dpd",
"size": 10
"fieldType":"zhuwrm",
"dataType":"mg4k5i",
"fieldValue":"zac65i",
"fieldLen":757,
"fieldNull":1,
"isList":848,
"fieldOrderNo":"s5ae8g",
"page":1,
"size":10
}
}
...
@@ -40,23 +31,62 @@ Authorization: {{authToken}}
...
@@ -40,23 +31,62 @@ Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
"datasetId":628
,
"datasetId": 1
,
"fieldCode":"3jr5wy
",
"fieldCode": "title2
",
"fieldName":"rlv0d9
",
"fieldName": "标题2
",
"fieldType":"y77qd4
",
"fieldType": "input
",
"dataType":"k9iyeb
",
"dataType": "number
",
"fieldValue":"i1zx0e
",
"fieldValue": "zo0
",
"fieldLen":939
,
"fieldLen": 255
,
"fieldNull":
1,
"fieldNull":
1,
"isList":530
,
"isList": 1
,
"fieldOrderNo":"23fcqf
",
"fieldOrderNo": "1
",
"remark":"u72ofy",
"remark": "xxxxxxxxxxxxxxxx"
}
}
> {%
> {%
client.global.set("AppInfoField_id", JSON.parse(response.body).data.id);
client.global.set("AppInfoField_id", JSON.parse(response.body).data.id);
%}
%}
###自助终端应用信息字段批量新增
POST {{baseUrl}}/app/info/field/batchSave
Authorization: {{authToken}}
Content-Type: application/json
[
{
"datasetId": 1,
"fieldCode": "title1",
"fieldName": "标题1",
"fieldType": "input",
"dataType": "number",
"fieldValue": "zo0",
"fieldLen": 255,
"fieldNull": 1,
"isList": 1,
"fieldOrderNo": "1",
"remark": "1111111111"
},
{
"datasetId": 1,
"fieldCode": "title2",
"fieldName": "标题2",
"fieldType": "input",
"dataType": "number",
"fieldValue": "zo0",
"fieldLen": 255,
"fieldNull": 1,
"isList": 1,
"fieldOrderNo": "1",
"remark": "22222222222222"
}
]
> {%
client.global.set("AppInfoField_id", JSON.parse(response.body).data.id);
%}
###自助终端应用信息字段查看
###自助终端应用信息字段查看
GET {{baseUrl}}/app/info/field/info?id={{AppInfoField_id}}
GET {{baseUrl}}/app/info/field/info?id={{AppInfoField_id}}
Authorization: {{authToken}}
Authorization: {{authToken}}
...
...
base-manager/src/test/java/com/mortals/httpclient/app/AppInfoTempleteFieldController.http
View file @
25d39c81
...
@@ -19,16 +19,7 @@ Authorization: {{authToken}}
...
@@ -19,16 +19,7 @@ Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
"appId":697,
"appId":1,
"fieldCode":"ms6x38",
"fieldName":"pkzida",
"fieldType":"y35tzv",
"dataType":"l0udnu",
"fieldValue":"9axwsc",
"fieldLen":323,
"fieldNull":1,
"isList":957,
"fieldOrderNo":"fdqlh1",
"page":1,
"page":1,
"size":10
"size":10
}
}
...
@@ -40,17 +31,17 @@ Authorization: {{authToken}}
...
@@ -40,17 +31,17 @@ Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
"appId":
292
,
"appId":
1
,
"fieldCode":"
eg5fas
",
"fieldCode":"
title2
",
"fieldName":"
4c7y60
",
"fieldName":"
标题2
",
"fieldType":"
7z4rum
",
"fieldType":"
input
",
"dataType":"
6tibr9
",
"dataType":"
number
",
"fieldValue":"zo0
4rh
",
"fieldValue":"zo0",
"fieldLen":
839
,
"fieldLen":
255
,
"fieldNull":1,
"fieldNull":1,
"isList":
755
,
"isList":
1
,
"fieldOrderNo":"
qf8e1e
",
"fieldOrderNo":"
1
",
"remark":"
iwlj8b",
"remark":"
xxxxxxxxxxxxxxxx"
}
}
> {%
> {%
...
...
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