소스 검색

-add address for bcui2

ilhamitubagoes 5 년 전
부모
커밋
2593ab5969

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

@@ -25,6 +25,7 @@ public final class Constant {
25 25
     public final static String BEATS_ENDPOINT = "/beats";
26 26
     public final static String BEATS2_ENDPOINT = "/beats2";
27 27
     public final static String SID_ENDPOINT = "/sid";
28
+    public final static String SID2_ENDPOINT = "/sid2";
28 29
     public final static String RFID_ENDPOINT = "/rfid";
29 30
 
30 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 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 14
     Observable<DataResultRfid> checkRfidCard(@Path("number_rfid") String numberRfid,
15 15
                                              @Query("entryPermitId") Integer permitId,
16 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 3
 import androidx.annotation.NonNull;
4 4
 
5 5
 import com.fusi24.rfid.BuildConfig;
6
+import com.fusi24.rfid.config.Constant;
6 7
 import com.google.gson.Gson;
7 8
 import com.google.gson.GsonBuilder;
8 9
 
@@ -24,7 +25,7 @@ public class RestServiceFactory {
24 25
 
25 26
         Retrofit retrofit = new Retrofit.Builder()
26 27
                 //.baseUrl(Constant.BASE_URL)
27
-                .baseUrl("http://192.168.12.129:40002")
28
+                .baseUrl(Constant.BASE_URL)
28 29
                 .client(okHttp)
29 30
                 .addConverterFactory(GsonConverterFactory.create(gson))
30 31
                 .addCallAdapterFactory(RxJava2CallAdapterFactory.create())