Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
smartDevices-platform-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7123d98e
authored
Apr 29, 2021
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]aqara代码提交
1 parent
3279e020
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
10 deletions
src/main/java/cn/com/glsx/common/BussinessFactory/BussinessFactory.java
src/main/java/cn/com/glsx/common/BussinessFactory/BussinessType.java
src/main/java/cn/com/glsx/modules/model/param/OrderRequest.java
src/main/java/cn/com/glsx/modules/model/param/RemoteRequest.java
src/main/java/cn/com/glsx/common/BussinessFactory/BussinessFactory.java
View file @
7123d98
...
...
@@ -30,7 +30,7 @@ public class BussinessFactory implements ApplicationContextAware {
* @param <T>
* @return
*/
public
static
<
T
>
T
getInstance
(
String
bustype
,
Class
<
T
>
requiredType
){
public
static
<
T
>
T
getInstance
(
Integer
bustype
,
Class
<
T
>
requiredType
){
String
handerType
=
BussinessType
.
getHanderType
(
bustype
);
if
(
handerType
==
null
){
return
null
;
...
...
src/main/java/cn/com/glsx/common/BussinessFactory/BussinessType.java
View file @
7123d98
package
cn
.
com
.
glsx
.
common
.
BussinessFactory
;
import
io.swagger.models.auth.In
;
/**
* @author zhouhaibao
* @date 2021/3/8 11:32
*/
public
enum
BussinessType
{
tuya_hander
(
"1"
,
"deviceService"
),
aqara_hander
(
"2"
,
"aqaraDeviceService"
);
private
String
busType
;
tuya_hander
(
1
,
"deviceService"
),
aqara_hander
(
2
,
"aqaraDeviceService"
);
private
Integer
busType
;
private
String
handerImp
;
BussinessType
(
String
busType
,
String
handerImp
)
{
BussinessType
(
Integer
busType
,
String
handerImp
)
{
this
.
busType
=
busType
;
this
.
handerImp
=
handerImp
;
}
public
String
getBusType
()
{
public
Integer
getBusType
()
{
return
busType
;
}
public
void
setBusType
(
String
busType
)
{
public
void
setBusType
(
Integer
busType
)
{
this
.
busType
=
busType
;
}
...
...
@@ -34,7 +36,7 @@ public enum BussinessType {
}
public
static
String
getHanderType
(
String
busType
)
{
public
static
String
getHanderType
(
Integer
busType
)
{
for
(
BussinessType
m
:
BussinessType
.
values
())
{
if
(
m
.
getBusType
().
equals
(
busType
))
{
return
m
.
getHanderImp
();
...
...
src/main/java/cn/com/glsx/modules/model/param/OrderRequest.java
View file @
7123d98
...
...
@@ -13,7 +13,7 @@ public class OrderRequest {
private
String
phone
;
private
String
channel
;
private
Integer
channel
;
private
String
deviceId
;
}
src/main/java/cn/com/glsx/modules/model/param/RemoteRequest.java
View file @
7123d98
...
...
@@ -12,7 +12,7 @@ public class RemoteRequest {
private
String
phone
;
private
String
data
;
private
String
channel
;
private
Integer
channel
;
private
String
deviceId
;
private
String
remoteId
;
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment