Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-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
赵啸非
sample-form-platform
Commits
58dd05ff
Commit
58dd05ff
authored
Dec 23, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改设备回调通知
parent
2003be6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
common-lib/src/main/java/com/mortals/xhx/feign/device/IDeviceFeign.java
.../main/java/com/mortals/xhx/feign/device/IDeviceFeign.java
+2
-2
sample-form-manager/pom.xml
sample-form-manager/pom.xml
+1
-1
sample-form-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+5
-6
No files found.
common-lib/src/main/java/com/mortals/xhx/feign/device/IDeviceFeign.java
View file @
58dd05ff
...
...
@@ -72,7 +72,7 @@ public interface IDeviceFeign extends IFeign {
* @return
*/
@PostMapping
(
value
=
"/api/receive"
)
Rest
<
String
>
deviceCall
(
@RequestBody
DeviceReq
deviceReq
,
@RequestHeader
(
"Authorization"
)
String
authorization
);
Rest
<
String
>
deviceCall
(
@RequestBody
DeviceReq
deviceReq
);
}
...
...
@@ -104,7 +104,7 @@ class DeviceFeignFallbackFactory implements FallbackFactory<IDeviceFeign> {
}
@Override
public
Rest
<
String
>
deviceCall
(
DeviceReq
deviceReq
,
String
authorization
)
{
public
Rest
<
String
>
deviceCall
(
DeviceReq
deviceReq
)
{
return
Rest
.
fail
(
"暂时无法保存设备,请稍后再试!"
);
}
};
...
...
sample-form-manager/pom.xml
View file @
58dd05ff
...
...
@@ -99,7 +99,7 @@
<profiles.nginx.port>
11199
</profiles.nginx.port>
<profiles.server.gatewayport>
11078
</profiles.server.gatewayport>
<profiles.server.path>
/sampleform
</profiles.server.path>
<profiles.rabbitmq.host>
172.15.28.11
5
</profiles.rabbitmq.host>
<profiles.rabbitmq.host>
172.15.28.11
7
</profiles.rabbitmq.host>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.username>
taxi_mq
</profiles.rabbitmq.username>
<profiles.rabbitmq.password>
admin@2020
</profiles.rabbitmq.password>
...
...
sample-form-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
58dd05ff
...
...
@@ -59,11 +59,11 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
deviceEntity
.
setEnabled
(
EnabledEnum
.
启用
.
getValue
());
this
.
getDao
().
update
(
deviceEntity
);
this
.
putCache
(
deviceEntity
.
getId
().
toString
(),
deviceEntity
);
String
token
=
getToken
();
DeviceReq
deviceReq
=
new
DeviceReq
();
deviceReq
.
setReceiveMethod
(
DeviceMethodEnum
.
ACTIVE
.
getValue
());
deviceReq
.
setDeviceCode
(
deviceCode
);
Rest
<
String
>
rest
=
deviceFeign
.
deviceCall
(
deviceReq
,
token
);
Rest
<
String
>
rest
=
deviceFeign
.
deviceCall
(
deviceReq
);
log
.
info
(
"激活结果:{}"
,
JSON
.
toJSONString
(
rest
));
}
...
...
@@ -76,21 +76,20 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
deviceEntity
.
setUpdateUserId
(
getContextUserId
(
context
));
this
.
getDao
().
update
(
deviceEntity
);
this
.
putCache
(
deviceEntity
.
getId
().
toString
(),
deviceEntity
);
String
token
=
getToken
();
DeviceReq
deviceReq
=
new
DeviceReq
();
deviceReq
.
setReceiveMethod
(
DeviceMethodEnum
.
ENABLED
.
getValue
());
deviceReq
.
setDeviceCode
(
deviceEntity
.
getDeviceCode
());
Rest
<
String
>
rest
=
deviceFeign
.
deviceCall
(
deviceReq
,
token
);
Rest
<
String
>
rest
=
deviceFeign
.
deviceCall
(
deviceReq
);
log
.
info
(
"启用结果:{}"
,
JSON
.
toJSONString
(
rest
));
}
private
String
getToken
()
{
/*
private String getToken() {
LoginForm loginForm = new LoginForm();
loginForm.setLoginName(loginName);
loginForm.setPassword(password);
Rest<String> rest = deviceFeign.getToken(loginForm);
String token = rest.getData();
return token;
}
}
*/
}
\ 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