updated private cloud functions
This commit is contained in:
1
private-backend/.gitignore
vendored
1
private-backend/.gitignore
vendored
@@ -95,4 +95,5 @@ fabric.properties
|
||||
|
||||
# Customized ignore files
|
||||
target
|
||||
private-backend.iml
|
||||
private-server.iml
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
# IRext private server
|
||||
# IRext Private Backend
|
||||
|
||||
Private server is a runtime that any user can deploy and access it with IRext restful web service call or SDK.
|
||||
|
||||
### Runtime environment
|
||||
- Java runtime 1.7 or above
|
||||
- Mysql server 5.6 or above
|
||||
- Redis service
|
||||
- Mysql server 8.0 or above
|
||||
- Redis server 4.0 or above
|
||||
- A Linux OS is preferred
|
||||
|
||||
### Deploy
|
||||
- Fetch or compile libirdecode_jni.so out of source code of irext/core.
|
||||
- Run following command when you fetched or compiled the private-server.jar out of the private server Spring-Boot project.
|
||||
- Run following command when you fetched or compiled the private-backend-<version>.jar out of the private server Spring-Boot project.
|
||||
|
||||
```shell script
|
||||
java -jar private-server.jar
|
||||
java -jar private-backend-<version>.jar
|
||||
```
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>net.irext.server</groupId>
|
||||
<artifactId>private-server</artifactId>
|
||||
<artifactId>private-backend</artifactId>
|
||||
<version>1.5.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
|
||||
@@ -6,9 +6,11 @@ import net.irext.server.request.CreateRemoteReferenceRequest;
|
||||
import net.irext.server.utils.Constants;
|
||||
import net.irext.server.mapper.*;
|
||||
import net.irext.server.model.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -199,7 +201,7 @@ public class IndexingLogic {
|
||||
remoteRef.setBrandName(brandName);
|
||||
remoteRef.setCityCode(remoteIndex.getCityCode());
|
||||
remoteRef.setOperatorId(remoteIndex.getOperatorId());
|
||||
remoteRef.setRemoteCode(remoteIndex.getId().toString());
|
||||
remoteRef.setRemoteCode("");
|
||||
remoteRef.setRemote(remoteIndex.getRemote());
|
||||
remoteRef.setProtocol(remoteIndex.getProtocol());
|
||||
remoteRef.setRemoteMap(remoteIndex.getRemoteMap());
|
||||
@@ -220,11 +222,29 @@ public class IndexingLogic {
|
||||
.url(url)
|
||||
.post(body)
|
||||
.build();
|
||||
Response response = client.newCall(request).execute();
|
||||
return response.body().string();
|
||||
|
||||
client.newCall(request).enqueue(new Callback() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Request request, IOException e) {
|
||||
System.err.println("remoteRef request failed: " + e.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Response response) throws IOException {
|
||||
try {
|
||||
if (!response.isSuccessful()) {
|
||||
throw new IOException("unexpected code from remoteRef response: " + response);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("error processing remoteRef response: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Constants {
|
||||
public static final int STATUS_INVALID = 0;
|
||||
public static final int STATUS_PARA_DATA = 15;
|
||||
|
||||
public static final String REMOTE_REF_URL = "http://192.168.75.128:8083/irext-server/remote_ref/create_remote_ref";
|
||||
public static final String REMOTE_REF_URL = "http://srv.irext.net/irext-server/remote_ref/create_remote_ref";
|
||||
|
||||
public enum CategoryID {
|
||||
AIR_CONDITIONER(1),
|
||||
|
||||
Reference in New Issue
Block a user