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
255cd917
Commit
255cd917
authored
Feb 19, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分一键部署功能
parent
97d932eb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
0 deletions
+62
-0
common-lib/src/main/java/com/mortals/xhx/feign/bill/smartoffice/IBillFeign.java
...va/com/mortals/xhx/feign/bill/smartoffice/IBillFeign.java
+55
-0
portal-manager/src/main/java/com/mortals/xhx/common/utils/SendSubSystemTask.java
.../java/com/mortals/xhx/common/utils/SendSubSystemTask.java
+7
-0
No files found.
common-lib/src/main/java/com/mortals/xhx/feign/bill/smartoffice/IBillFeign.java
0 → 100644
View file @
255cd917
package
com.mortals.xhx.feign.bill.smartoffice
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.feign.IFeign
;
import
feign.hystrix.FallbackFactory
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.annotation.PostMapping
;
/**
* 服务系统 Feign接口
*
* @author zxfei
* @date 2022-10-26
*/
@FeignClient
(
name
=
"bill-manager"
,
path
=
"/bill"
,
fallbackFactory
=
BillFeignFallbackFactory
.
class
)
public
interface
IBillFeign
extends
IFeign
{
/**
* 用户刷新通知
*
* @param
* @return
*/
@PostMapping
(
value
=
"/user/refreshUser"
)
Rest
<
Void
>
refreshUser
();
}
@Slf4j
@Component
class
BillFeignFallbackFactory
implements
FallbackFactory
<
IBillFeign
>
{
@Override
public
IBillFeign
create
(
Throwable
t
)
{
return
new
IBillFeign
()
{
/**
* @return
*/
@Override
public
Rest
<
Void
>
refreshUser
()
{
return
Rest
.
fail
(
"暂时无法通知设备,请稍后再试!"
);
}
};
}
}
portal-manager/src/main/java/com/mortals/xhx/common/utils/SendSubSystemTask.java
View file @
255cd917
package
com.mortals.xhx.common.utils
;
import
com.mortals.xhx.feign.area.IApiAreaFeign
;
import
com.mortals.xhx.feign.bill.smartoffice.IBillFeign
;
import
com.mortals.xhx.feign.device.IDeviceFeign
;
import
com.mortals.xhx.feign.selfsystem.ISelfSystemFeign
;
import
com.mortals.xhx.feign.skin.ISkinFillFeign
;
...
...
@@ -26,6 +27,7 @@ public class SendSubSystemTask implements Runnable {
private
ISkinFillFeign
skinFillFeign
;
private
ISelfSystemFeign
selfSystemFeign
;
private
ISmartSystemFeign
smartSystemFeign
;
private
IBillFeign
billFeign
;
public
SendSubSystemTask
()
{
apiAreaFeign
=
SpringUtils
.
getBean
(
IApiAreaFeign
.
class
);
...
...
@@ -34,11 +36,13 @@ public class SendSubSystemTask implements Runnable {
skinFillFeign
=
SpringUtils
.
getBean
(
ISkinFillFeign
.
class
);
selfSystemFeign
=
SpringUtils
.
getBean
(
ISelfSystemFeign
.
class
);
smartSystemFeign
=
SpringUtils
.
getBean
(
ISmartSystemFeign
.
class
);
billFeign
=
SpringUtils
.
getBean
(
IBillFeign
.
class
);
}
@Override
public
void
run
()
{
try
{
log
.
info
(
"开始通知子系统"
);
Thread
.
sleep
(
2000
);
apiAreaFeign
.
refreshUser
();
Thread
.
sleep
(
2000
);
...
...
@@ -51,6 +55,9 @@ public class SendSubSystemTask implements Runnable {
selfSystemFeign
.
refreshUser
();
Thread
.
sleep
(
2000
);
smartSystemFeign
.
refreshUser
();
Thread
.
sleep
(
2000
);
billFeign
.
refreshUser
();
log
.
info
(
"子系统通知完成"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"通知异常:"
,
e
);
}
...
...
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