Commit 7123d98e by 111-PC\111

[+]aqara代码提交

1 parent 3279e020
...@@ -30,7 +30,7 @@ public class BussinessFactory implements ApplicationContextAware { ...@@ -30,7 +30,7 @@ public class BussinessFactory implements ApplicationContextAware {
* @param <T> * @param <T>
* @return * @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); String handerType = BussinessType.getHanderType(bustype);
if(handerType==null){ if(handerType==null){
return null; return null;
......
package cn.com.glsx.common.BussinessFactory; package cn.com.glsx.common.BussinessFactory;
import io.swagger.models.auth.In;
/** /**
* @author zhouhaibao * @author zhouhaibao
* @date 2021/3/8 11:32 * @date 2021/3/8 11:32
*/ */
public enum BussinessType { public enum BussinessType {
tuya_hander("1", "deviceService"), tuya_hander(1, "deviceService"),
aqara_hander("2", "aqaraDeviceService"); aqara_hander(2, "aqaraDeviceService");
private String busType; private Integer busType;
private String handerImp; private String handerImp;
BussinessType(String busType, String handerImp) { BussinessType(Integer busType, String handerImp) {
this.busType = busType; this.busType = busType;
this.handerImp = handerImp; this.handerImp = handerImp;
} }
public String getBusType() { public Integer getBusType() {
return busType; return busType;
} }
public void setBusType(String busType) { public void setBusType(Integer busType) {
this.busType = busType; this.busType = busType;
} }
...@@ -34,7 +36,7 @@ public enum BussinessType { ...@@ -34,7 +36,7 @@ public enum BussinessType {
} }
public static String getHanderType(String busType) { public static String getHanderType(Integer busType) {
for (BussinessType m : BussinessType.values()) { for (BussinessType m : BussinessType.values()) {
if (m.getBusType().equals(busType)) { if (m.getBusType().equals(busType)) {
return m.getHanderImp(); return m.getHanderImp();
......
...@@ -13,7 +13,7 @@ public class OrderRequest { ...@@ -13,7 +13,7 @@ public class OrderRequest {
private String phone; private String phone;
private String channel; private Integer channel;
private String deviceId; private String deviceId;
} }
...@@ -12,7 +12,7 @@ public class RemoteRequest { ...@@ -12,7 +12,7 @@ public class RemoteRequest {
private String phone; private String phone;
private String data; private String data;
private String channel; private Integer channel;
private String deviceId; private String deviceId;
private String remoteId; private String remoteId;
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!