|
@@ -5,6 +5,8 @@ import com.lzy.okgo.model.HttpParams;
|
|
import com.lzy.okgo.model.Response;
|
|
import com.lzy.okgo.model.Response;
|
|
import com.zedu.cocos.congming.app.device.DeviceClient;
|
|
import com.zedu.cocos.congming.app.device.DeviceClient;
|
|
import com.zedu.cocos.congming.app.device.DeviceClientZedu;
|
|
import com.zedu.cocos.congming.app.device.DeviceClientZedu;
|
|
|
|
+import com.zedu.cocos.congming.app.time.TimeClient;
|
|
|
|
+import com.zedu.cocos.congming.app.time.TimeClientZedu;
|
|
import com.zedu.core.global.ErrorEvent;
|
|
import com.zedu.core.global.ErrorEvent;
|
|
import com.zedu.support.request.OkgoClient;
|
|
import com.zedu.support.request.OkgoClient;
|
|
import com.zedu.support.request.OkgoTask;
|
|
import com.zedu.support.request.OkgoTask;
|
|
@@ -31,6 +33,8 @@ public class OrganClientZedu extends OkgoTask implements OrganClient {
|
|
DeviceClient mDeviceClient;
|
|
DeviceClient mDeviceClient;
|
|
@Pref
|
|
@Pref
|
|
OrganPrefs_ mOrganPrefs;
|
|
OrganPrefs_ mOrganPrefs;
|
|
|
|
+ @Bean(TimeClientZedu.class)
|
|
|
|
+ TimeClient mTimeClient;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void login(String key, String androidId) {
|
|
public void login(String key, String androidId) {
|
|
@@ -48,6 +52,7 @@ public class OrganClientZedu extends OkgoTask implements OrganClient {
|
|
if (code == ResponseCode.RES_SUCCESS) {
|
|
if (code == ResponseCode.RES_SUCCESS) {
|
|
if (result.data != null) {
|
|
if (result.data != null) {
|
|
mBus.post(new OrganEvent(result.data));
|
|
mBus.post(new OrganEvent(result.data));
|
|
|
|
+ mTimeClient.updateLastTime();
|
|
mDeviceClient.register(result.data.organKey);
|
|
mDeviceClient.register(result.data.organKey);
|
|
}
|
|
}
|
|
} else if (code == ResponseCode.RES_Try) {
|
|
} else if (code == ResponseCode.RES_Try) {
|