Browse Source

-add address for bcui2

ilhamitubagoes 5 years ago
parent
commit
2593ab5969

+ 1 - 0
app/src/main/java/com/fusi24/rfid/config/Constant.java

@@ -25,6 +25,7 @@ public final class Constant {
25
     public final static String BEATS_ENDPOINT = "/beats";
25
     public final static String BEATS_ENDPOINT = "/beats";
26
     public final static String BEATS2_ENDPOINT = "/beats2";
26
     public final static String BEATS2_ENDPOINT = "/beats2";
27
     public final static String SID_ENDPOINT = "/sid";
27
     public final static String SID_ENDPOINT = "/sid";
28
+    public final static String SID2_ENDPOINT = "/sid2";
28
     public final static String RFID_ENDPOINT = "/rfid";
29
     public final static String RFID_ENDPOINT = "/rfid";
29
 
30
 
30
     public static final String URL_PHOTO = BASE_URL + BEATS2_ENDPOINT + "/file?path=";
31
     public static final String URL_PHOTO = BASE_URL + BEATS2_ENDPOINT + "/file?path=";

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/api/RestService.java

@@ -10,7 +10,7 @@ import retrofit2.http.Query;
10
 
10
 
11
 public interface RestService {
11
 public interface RestService {
12
 
12
 
13
-    @GET(Constant.RFID_ENDPOINT + "/permit/check/{number_rfid}")
13
+    @GET(Constant.SID2_ENDPOINT + Constant.RFID_ENDPOINT + "/permit/check/{number_rfid}")
14
     Observable<DataResultRfid> checkRfidCard(@Path("number_rfid") String numberRfid,
14
     Observable<DataResultRfid> checkRfidCard(@Path("number_rfid") String numberRfid,
15
                                              @Query("entryPermitId") Integer permitId,
15
                                              @Query("entryPermitId") Integer permitId,
16
                                              @Query("expand") String[] expand);
16
                                              @Query("expand") String[] expand);

+ 2 - 1
app/src/main/java/com/fusi24/rfid/data/api/RestServiceFactory.java

@@ -3,6 +3,7 @@ package com.fusi24.rfid.data.api;
3
 import androidx.annotation.NonNull;
3
 import androidx.annotation.NonNull;
4
 
4
 
5
 import com.fusi24.rfid.BuildConfig;
5
 import com.fusi24.rfid.BuildConfig;
6
+import com.fusi24.rfid.config.Constant;
6
 import com.google.gson.Gson;
7
 import com.google.gson.Gson;
7
 import com.google.gson.GsonBuilder;
8
 import com.google.gson.GsonBuilder;
8
 
9
 
@@ -24,7 +25,7 @@ public class RestServiceFactory {
24
 
25
 
25
         Retrofit retrofit = new Retrofit.Builder()
26
         Retrofit retrofit = new Retrofit.Builder()
26
                 //.baseUrl(Constant.BASE_URL)
27
                 //.baseUrl(Constant.BASE_URL)
27
-                .baseUrl("http://192.168.12.129:40002")
28
+                .baseUrl(Constant.BASE_URL)
28
                 .client(okHttp)
29
                 .client(okHttp)
29
                 .addConverterFactory(GsonConverterFactory.create(gson))
30
                 .addConverterFactory(GsonConverterFactory.create(gson))
30
                 .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
31
                 .addCallAdapterFactory(RxJava2CallAdapterFactory.create())