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
dc6bbd5c
Commit
dc6bbd5c
authored
Dec 05, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改应用编码校验
parent
fb97430a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
base-manager/src/main/java/com/mortals/xhx/common/utils/SyncGovMatterDetailThread.java
...m/mortals/xhx/common/utils/SyncGovMatterDetailThread.java
+16
-6
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteThemeMatterServiceImpl.java
.../module/site/service/impl/SiteThemeMatterServiceImpl.java
+3
-1
base-manager/src/test/java/com/mortals/httpclient/site/SiteController.http
...test/java/com/mortals/httpclient/site/SiteController.http
+1
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/common/utils/SyncGovMatterDetailThread.java
View file @
dc6bbd5c
...
...
@@ -4,10 +4,12 @@ import cn.hutool.core.collection.ListUtil;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.xhx.ManagerBaseApplication
;
import
com.mortals.xhx.common.code.DxTypeEnum
;
import
com.mortals.xhx.common.code.SourceEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.keys.RedisCacheKeys
;
import
com.mortals.xhx.module.area.model.AreaEntity
;
import
com.mortals.xhx.module.area.service.AreaService
;
import
com.mortals.xhx.module.dept.service.DeptService
;
...
...
@@ -52,6 +54,8 @@ public class SyncGovMatterDetailThread implements Runnable {
private
Context
context
;
private
ICacheService
cacheService
;
public
SyncGovMatterDetailThread
(
SiteEntity
siteEntity
,
Context
context
)
{
this
.
siteEntity
=
siteEntity
;
...
...
@@ -63,6 +67,7 @@ public class SyncGovMatterDetailThread implements Runnable {
this
.
siteMatterService
=
SpringUtils
.
getBean
(
SiteMatterService
.
class
);
this
.
siteThemeService
=
SpringUtils
.
getBean
(
SiteThemeService
.
class
);
this
.
siteThemeMatterService
=
SpringUtils
.
getBean
(
SiteThemeMatterService
.
class
);
this
.
cacheService
=
SpringUtils
.
getBean
(
ICacheService
.
class
);
}
@Override
...
...
@@ -120,13 +125,18 @@ public class SyncGovMatterDetailThread implements Runnable {
//街道,镇,乡
Rest
<
String
>
themeTownRest
=
siteThemeService
.
syncTownThemeBySiteId
(
siteEntity
,
context
);
log
.
info
(
"同步乡镇站点主题:"
+
JSON
.
toJSONString
(
themeTownRest
));
siteThemeMatterService
.
deleteGovBySiteId
(
siteEntity
.
getId
(),
context
);
String
dxType
=
DxTypeEnum
.
街道镇服务
.
getValue
();
if
(
areaEntity
.
getAreaLevel
()
==
5
)
{
dxType
=
DxTypeEnum
.
乡村服务
.
getValue
();
if
(
themeTownRest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
siteThemeMatterService
.
deleteGovBySiteId
(
siteEntity
.
getId
(),
context
);
String
dxType
=
DxTypeEnum
.
街道镇服务
.
getValue
();
if
(
areaEntity
.
getAreaLevel
()
==
5
)
{
dxType
=
DxTypeEnum
.
乡村服务
.
getValue
();
}
Rest
<
String
>
townThemeRest
=
siteThemeMatterService
.
syncTownThemeMatterBySiteId
(
siteEntity
,
dxType
,
context
);
log
.
info
(
"同步站点乡镇主题事项:"
+
JSON
.
toJSONString
(
townThemeRest
));
}
else
{
cacheService
.
hdel
(
RedisCacheKeys
.
getSyncMatterLockKey
()
+
siteEntity
.
getAreaCode
(),
siteEntity
.
getAreaCode
());
log
.
info
(
"同步站点乡镇主题事项失败:"
+
themeTownRest
.
getData
());
}
Rest
<
String
>
townThemeRest
=
siteThemeMatterService
.
syncTownThemeMatterBySiteId
(
siteEntity
,
dxType
,
context
);
log
.
info
(
"同步站点乡镇主题事项:"
+
JSON
.
toJSONString
(
townThemeRest
));
}
log
.
info
(
"同步站点事项结束....."
);
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/site/service/impl/SiteThemeMatterServiceImpl.java
View file @
dc6bbd5c
...
...
@@ -138,6 +138,7 @@ public class SiteThemeMatterServiceImpl extends AbstractCRUDServiceImpl<SiteThem
params
.
put
(
"dxType"
,
dxType
);
params
.
put
(
"areaCode"
,
siteEntity
.
getAreaCode
());
List
<
SiteThemeEntity
>
siteThemeEntities
=
siteThemeService
.
find
(
new
SiteThemeQuery
().
siteId
(
siteEntity
.
getId
()));
int
sum
=
0
;
for
(
SiteThemeEntity
item
:
siteThemeEntities
)
{
params
.
put
(
"theme"
,
item
.
getThemeCode
());
params
.
put
(
"userType"
,
item
.
getUserType
());
...
...
@@ -160,9 +161,10 @@ public class SiteThemeMatterServiceImpl extends AbstractCRUDServiceImpl<SiteThem
if
(
count
!=
total
)
{
log
.
info
(
String
.
format
(
"获取数量异常,count:%s,total:%s,theme:%s"
,
count
,
total
,
item
.
getThemeName
()));
}
sum
+=
count
;
}
}
return
Rest
.
ok
(
"乡镇主题更新完成"
);
return
Rest
.
ok
(
"乡镇主题更新完成"
,
"更新条数:"
+
sum
);
}
@Override
...
...
base-manager/src/test/java/com/mortals/httpclient/site/SiteController.http
View file @
dc6bbd5c
...
...
@@ -86,7 +86,7 @@ Authorization: {{authToken}}
Content-Type: application/json
{
"id":
7
"id":
26
}
...
...
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