Commit cae3f207 by zhengnw@sobot.com

common 1.4.0 添加sdk 登录

parent 057b0bfd
...@@ -8,6 +8,9 @@ import android.content.Intent; ...@@ -8,6 +8,9 @@ import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.widget.ImageView; import android.widget.ImageView;
import com.sobot.common.login.SobotLoginTools;
import com.sobot.common.login.callback.SobotResultBlock;
import com.sobot.common.login.callback.SobotResultCode;
import com.sobot.common.utils.SobotImageUtils; import com.sobot.common.utils.SobotImageUtils;
import com.sobot.pictureframe.SobotBitmapUtil; import com.sobot.pictureframe.SobotBitmapUtil;
import com.sobot.utils.SobotLogUtils; import com.sobot.utils.SobotLogUtils;
...@@ -220,6 +223,16 @@ public class MainActivity extends SobotBaseActivity { ...@@ -220,6 +223,16 @@ public class MainActivity extends SobotBaseActivity {
// SobotLoginTools.getInstance().setLoginUser(sa); // SobotLoginTools.getInstance().setLoginUser(sa);
// SobotServiceInfoModel ccc=new SobotServiceInfoModel(); // SobotServiceInfoModel ccc=new SobotServiceInfoModel();
// SobotLoginTools.getInstance().setServiceInfo(ccc); // SobotLoginTools.getInstance().setServiceInfo(ccc);
// SobotLoginTools.getInstance().doLogin(MainActivity.this, MainActivity.this, "https://api-c.soboten.com/text", "zhengnawei@sobot.com", "znw123456","", new SobotResultBlock() {
// @Override
// public void resultBolok(SobotResultCode code, String msg, Object obj) {
// SobotLoginTools.getInstance().checkExpiresToken();
// SobotLogUtils.i(SobotLoginTools.getInstance().getAccessToken()+"");
// SobotLogUtils.i(SobotLoginTools.getInstance().getTempId());
// SobotLogUtils.i(SobotLoginTools.getInstance().getToken()+"");
// }
// });
} }
@Override @Override
......
...@@ -13,7 +13,7 @@ ext { ...@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名 PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'sobotcommon' //项目名 PUBLISH_ARTIFACT_ID = 'sobotcommon' //项目名
// PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名 // PUBLISH_ARTIFACT_ID = 'sobotcommon_x' //项目名
PUBLISH_VERSION = '1.3.9.5' //版本号 PUBLISH_VERSION = '1.3.9.6' //版本号
} }
......
...@@ -55,9 +55,10 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> { ...@@ -55,9 +55,10 @@ public class LoginUserManager extends SobotCommonDao<LoginUserEntity> {
model.setStaffName(cursor.getString(cursor.getColumnIndex("staffName"))); model.setStaffName(cursor.getString(cursor.getColumnIndex("staffName")));
model.setMaxServiceCount(cursor.getInt(cursor.getColumnIndex("maxServiceCount"))); model.setMaxServiceCount(cursor.getInt(cursor.getColumnIndex("maxServiceCount")));
model.setBlackFunction(cursor.getInt(cursor.getColumnIndex("blackFunction"))); model.setBlackFunction(cursor.getInt(cursor.getColumnIndex("blackFunction")));
String transferFunction = cursor.getString(cursor.getColumnIndex("transferFunction")); model.setTransferFunction(cursor.getInt(cursor.getColumnIndex("transferFunction")));
if (!SobotStringUtils.isEmpty(transferFunction)){ String ticketFunction = cursor.getString(cursor.getColumnIndex("ticketFunction"));
Map<String, Boolean> map = SobotGsonUtil.jsonToMaps(transferFunction); if (!SobotStringUtils.isEmpty(ticketFunction)){
Map<String, Boolean> map = SobotGsonUtil.jsonToMaps(ticketFunction);
model.setTicketFunction(map); model.setTicketFunction(map);
} }
model.setFace(cursor.getString(cursor.getColumnIndex("face"))); model.setFace(cursor.getString(cursor.getColumnIndex("face")));
......
...@@ -2,11 +2,13 @@ package com.sobot.common.login.model; ...@@ -2,11 +2,13 @@ package com.sobot.common.login.model;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
public class SobotBaseCodeThird<T> implements Serializable { public class SobotCallBaseCode<T> implements Serializable {
public T item; public T item;
public List<T> items;
public String retMsg; public String retMsg;
public String retCode; public String retCode;
public int totalCount; public int totalCount;
...@@ -15,6 +17,14 @@ public class SobotBaseCodeThird<T> implements Serializable { ...@@ -15,6 +17,14 @@ public class SobotBaseCodeThird<T> implements Serializable {
return item; return item;
} }
public List<T> getItems() {
return items;
}
public void setItems(List<T> items) {
this.items = items;
}
public void setItem(T item) { public void setItem(T item) {
this.item = item; this.item = item;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment