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
007e7909
Commit
007e7909
authored
Dec 27, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加窗口同步修改通知
parent
38cdcf91
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
7 deletions
+37
-7
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowBusinessServiceImpl.java
...module/window/service/impl/WindowBusinessServiceImpl.java
+6
-6
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowServiceImpl.java
...als/xhx/module/window/service/impl/WindowServiceImpl.java
+31
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowBusinessServiceImpl.java
View file @
007e7909
...
@@ -176,29 +176,29 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
...
@@ -176,29 +176,29 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
}
}
/**
/* */
/**
* @param entity
* @param entity
* @param context
* @param context
* @throws AppException
* @throws AppException
*/
*/
/*
@Override
@Override
protected void saveAfter(WindowBusinessEntity entity, Context context) throws AppException {
protected void saveAfter(WindowBusinessEntity entity, Context context) throws AppException {
//通知php更新
//通知php更新
pushChangeMsg(entity);
pushChangeMsg(entity);
super.saveAfter(entity, context);
super.saveAfter(entity, context);
}
}
*/
/**
/* */
/**
* @param entity
* @param entity
* @param context
* @param context
* @throws AppException
* @throws AppException
*/
*/
/*
@Override
@Override
protected void updateAfter(WindowBusinessEntity entity, Context context) throws AppException {
protected void updateAfter(WindowBusinessEntity entity, Context context) throws AppException {
pushChangeMsg(entity);
pushChangeMsg(entity);
super.updateAfter(entity, context);
super.updateAfter(entity, context);
}
}
*/
private
void
pushChangeMsg
(
WindowBusinessEntity
entity
)
{
private
void
pushChangeMsg
(
WindowBusinessEntity
entity
)
{
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://172.15.28.116:8090"
);
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://172.15.28.116:8090"
);
...
...
base-manager/src/main/java/com/mortals/xhx/module/window/service/impl/WindowServiceImpl.java
View file @
007e7909
...
@@ -132,7 +132,16 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -132,7 +132,16 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
}
}
return
windowBusinessEntity
;
return
windowBusinessEntity
;
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
windowBusinessService
.
save
(
windowBusinessEntities
,
context
);
if
(!
ObjectUtils
.
isEmpty
(
windowBusinessEntities
))
{
windowBusinessService
.
save
(
windowBusinessEntities
,
context
);
WindowBusinessQuery
condition
=
new
WindowBusinessQuery
();
condition
.
setWindowId
(
windowId
);
condition
.
setSiteBusinessIdList
(
windowBusinessEntities
.
stream
().
map
(
i
->
i
.
getId
()).
collect
(
Collectors
.
toList
()));
pushChangeMsg
(
condition
);
}
//批量推送
}
}
/**
/**
...
@@ -272,4 +281,25 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
...
@@ -272,4 +281,25 @@ public class WindowServiceImpl extends AbstractCRUDCacheServiceImpl<WindowDao, W
}
}
return
successMsg
.
toString
();
return
successMsg
.
toString
();
}
}
private
void
pushChangeMsg
(
WindowBusinessQuery
entity
)
{
String
phpUrl
=
GlobalSysInfo
.
getParamValue
(
PARAM_SERVER_PHP_HTTP_URL
,
"http://172.15.28.116:8090"
);
phpUrl
+=
"/api/window/winNameChange"
;
HashMap
<
String
,
Object
>
paramsMap
=
new
HashMap
<>();
paramsMap
.
put
(
"windowid"
,
entity
.
getWindowId
());
paramsMap
.
put
(
"bussinessid"
,
entity
.
getSiteBusinessIdList
().
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
)));
paramsMap
.
put
(
"typeinfo"
,
1
);
String
resp
=
null
;
try
{
Map
<
String
,
String
>
header
=
new
HashMap
<>();
header
.
put
(
HEADER_CONTENT_TYPE
,
"application/json"
);
log
.
info
(
"\n thirdPartyUrl=>{} \n reqbody=>{} "
,
phpUrl
,
JSON
.
toJSONString
(
paramsMap
));
resp
=
HttpUtil
.
doPost
(
phpUrl
,
header
,
JSON
.
toJSONString
(
paramsMap
,
SerializerFeature
.
WriteMapNullValue
));
log
.
info
(
"thirdPartyUrl =>resp:{}"
,
resp
);
}
catch
(
Exception
e
)
{
log
.
error
(
"异常:"
,
e
);
}
}
}
}
\ No newline at end of file
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