Commit 5e2ed2b4fafa7ee72d1ae834b33a8fd4ea190071

Authored by YangShuai
2 parents ad6015ce eca4a56e

Merge branch 'master' of bj.gitlab.cnlive.com:cnlive-team/newModuleStrike

Showing 61 changed files with 4066 additions and 258 deletions

Too many changes to show.

To preserve performance only 61 of 106 files are displayed.

cloud/third_tool/build.gradle
@@ -68,5 +68,5 @@ dependencies { @@ -68,5 +68,5 @@ dependencies {
68 68
69 implementation project(':core:network') 69 implementation project(':core:network')
70 implementation project(':core:base') 70 implementation project(':core:base')
71 - implementation project (':cloud:user') 71 +// implementation project (':cloud:user')
72 } 72 }
cloud/third_tool/src/debug/java/com/cnlive/strike/debug/wxapi/WXEntryActivity.java
@@ -7,8 +7,9 @@ import android.os.Bundle; @@ -7,8 +7,9 @@ import android.os.Bundle;
7 import android.text.TextUtils; 7 import android.text.TextUtils;
8 import android.widget.Toast; 8 import android.widget.Toast;
9 9
10 -import com.cnlive.cloud.user.auth.UserService; 10 +import com.alibaba.android.arouter.launcher.ARouter;
11 import com.cnlive.core.libs.base.application.AppConfig; 11 import com.cnlive.core.libs.base.application.AppConfig;
  12 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
12 import com.cnlive.core.libs.base.util.AlertUtil; 13 import com.cnlive.core.libs.base.util.AlertUtil;
13 import com.cnlive.share.BuildConfig; 14 import com.cnlive.share.BuildConfig;
14 import com.cnlive.share.arouter.ARouterUtil; 15 import com.cnlive.share.arouter.ARouterUtil;
@@ -172,12 +173,13 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler { @@ -172,12 +173,13 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
172 try { 173 try {
173 Gson gson = new Gson(); 174 Gson gson = new Gson();
174 ShareIntegralTypeInfo integralTypeInfo = gson.fromJson(shareType, ShareIntegralTypeInfo.class); 175 ShareIntegralTypeInfo integralTypeInfo = gson.fromJson(shareType, ShareIntegralTypeInfo.class);
175 - 176 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  177 + String userId = service.getUid(this);
176 if ("witnessVideo".equals(integralTypeInfo.getShareType())) { 178 if ("witnessVideo".equals(integralTypeInfo.getShareType())) {
177 SharedPreferences preferences = this.getSharedPreferences("sharevideo", MODE_PRIVATE); 179 SharedPreferences preferences = this.getSharedPreferences("sharevideo", MODE_PRIVATE);
178 - boolean status = preferences.getBoolean(UserService.getUid(this), false); 180 + boolean status = preferences.getBoolean(userId, false);
179 String newTime = DateTimeUtil.getCurrentTime(); 181 String newTime = DateTimeUtil.getCurrentTime();
180 - String oldtime = preferences.getString(UserService.getUid(this) + "time", "2019-04-10"); 182 + String oldtime = preferences.getString(userId + "time", "2019-04-10");
181 boolean sameDay = DateTimeUtil.isSameDay(newTime, oldtime); 183 boolean sameDay = DateTimeUtil.isSameDay(newTime, oldtime);
182 if (!status) { 184 if (!status) {
183 ARouterUtil.addIntegrationPic(this, "share_video", integralTypeInfo.getContentId(), "sharevideo"); 185 ARouterUtil.addIntegrationPic(this, "share_video", integralTypeInfo.getContentId(), "sharevideo");
@@ -188,9 +190,9 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler { @@ -188,9 +190,9 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
188 190
189 } else if (integralTypeInfo.getShareType() != null) { 191 } else if (integralTypeInfo.getShareType() != null) {
190 SharedPreferences preferences = this.getSharedPreferences("sharearticle", MODE_PRIVATE); 192 SharedPreferences preferences = this.getSharedPreferences("sharearticle", MODE_PRIVATE);
191 - boolean status = preferences.getBoolean(UserService.getUid(this), false); 193 + boolean status = preferences.getBoolean(userId, false);
192 String newTime = DateTimeUtil.getCurrentTime(); 194 String newTime = DateTimeUtil.getCurrentTime();
193 - String oldtime = preferences.getString(UserService.getUid(this) + "time", "2019-04-10"); 195 + String oldtime = preferences.getString(userId + "time", "2019-04-10");
194 boolean sameDay = DateTimeUtil.isSameDay(newTime, oldtime); 196 boolean sameDay = DateTimeUtil.isSameDay(newTime, oldtime);
195 if (!status) { 197 if (!status) {
196 ARouterUtil.addIntegrationPic(this, "share_article", integralTypeInfo.getContentId(), "sharearticle"); 198 ARouterUtil.addIntegrationPic(this, "share_article", integralTypeInfo.getContentId(), "sharearticle");
cloud/third_tool/src/main/AndroidManifest.xml
@@ -14,7 +14,8 @@ @@ -14,7 +14,8 @@
14 <uses-permission android:name="android.permission.READ_PHONE_STATE" /> 14 <uses-permission android:name="android.permission.READ_PHONE_STATE" />
15 15
16 <application android:largeHeap="true"> 16 <application android:largeHeap="true">
17 - 17 + <uses-library android:name="org.apache.http.legacy"
  18 + android:required="false" />
18 <meta-data 19 <meta-data
19 android:name="WEIBO_APPKEY" 20 android:name="WEIBO_APPKEY"
20 android:value="3884700821" /> 21 android:value="3884700821" />
cloud/third_tool/src/main/java/com/cnlive/login/action/UserThirdAction.java deleted 100644 โ†’ 0
1 -package com.cnlive.login.action;  
2 -  
3 -import android.accounts.Account;  
4 -import android.content.Context;  
5 -import android.text.TextUtils;  
6 -  
7 -import com.cnlive.cloud.user.auth.UserService;  
8 -import com.cnlive.cloud.user.model.CNLiveUserInfo;  
9 -import com.cnlive.core.network.HttpConn;  
10 -import com.cnlive.core.network.NetCallBack;  
11 -import com.cnlive.core.network.model.BaseResult;  
12 -import com.cnlive.core.network.model.UserData;  
13 -  
14 -import io.reactivex.Observable;  
15 -  
16 -//import com.cnlive.strike.user.model.CNLiveUserInfo;  
17 -  
18 -/**  
19 - * created by hanyayun  
20 - * on 2019/12/4  
21 - */  
22 -public class UserThirdAction {  
23 -  
24 -  
25 - private static final int MAX_USER_COUNT = 1;  
26 -  
27 - public static void otherLogin(Context context, String thirdPartyPlat, String thirdPartyId, CallBack callBack) {  
28 -  
29 - HttpConn.action(UserThirdUtilAction.otherLogin(context, thirdPartyPlat, thirdPartyId), new NetCallBack<BaseResult<UserData>>() {  
30 - @Override  
31 - public void onRequestState(int state) {  
32 - if (null != callBack) {  
33 - callBack.callback(state, "", null);  
34 - }  
35 - }  
36 -  
37 - @Override  
38 - public void onSuccess(BaseResult<UserData> data) {  
39 - loginAppAction(data, context, "", "", true, callBack);  
40 - }  
41 -  
42 - @Override  
43 - public void onFailure(String errCode, String errMsg, Exception e) {  
44 - if (null != callBack) {  
45 - callBack.callback(Integer.parseInt(errCode), errMsg, null);  
46 - }  
47 - }  
48 - });  
49 - }  
50 -  
51 -  
52 - public static void otherLoginBindMobile(Context context, String phone, String countryCode, String ems,  
53 - String thirdPartyPlat, String thirdPartyId, String nickName, String gender,  
54 - String location, String faceUrl, CallBack callBack) {  
55 -  
56 - HttpConn.action(UserThirdUtilAction.otherLoginBindMobile(context, phone, countryCode, ems,  
57 - thirdPartyPlat, thirdPartyId, nickName, gender, location, faceUrl), new NetCallBack<BaseResult<UserData>>() {  
58 - @Override  
59 - public void onRequestState(int state) {  
60 - if (null != callBack) {  
61 - callBack.callback(state, "", null);  
62 - }  
63 - }  
64 -  
65 - @Override  
66 - public void onSuccess(BaseResult<UserData> data) {  
67 - loginAppAction(data,context, "", "", true, callBack);  
68 - }  
69 -  
70 - @Override  
71 - public void onFailure(String errCode, String errMsg, Exception e) {  
72 -  
73 - }  
74 - });  
75 - }  
76 -  
77 -  
78 - private static Observable<CNLiveUserInfo> loginAppAction(BaseResult<UserData> data, Context context, String userName, String userPassword, boolean otherLogin, CallBack callBack) {  
79 - CNLiveUserInfo userinfo = null;  
80 - if (null == data || null == data.getData()) {  
81 - if (null != callBack) {  
82 - callBack.callback(-5, "่Žทๅ–่ดฆๆˆทไฟกๆฏๅคฑ่ดฅ ่ฏท้‡่ฏ•.", null);  
83 - }  
84 - } else if (TextUtils.isEmpty(data.getData().getMobile())) {  
85 - callBack.callback(-5, "็ป‘ๅฎšๆ‰‹ๆœบๅทๅทฒๅคฑๆ•ˆ..", null);  
86 - } else {  
87 - //ๆ›ดๆ–ฐ็™ปๅฝ•็”จๆˆทไฟกๆฏ  
88 - UserService userService = UserService.getInstance(context);  
89 - userService.loginAppAccount(  
90 - otherLogin ? data.getData().getMobile() : userName,  
91 - otherLogin ? data.getData().getMobile() : userPassword,  
92 - data.getData());  
93 - //ไฟ็•™่ฟ‘ๆœŸ็™ปๅฝ•็”จๆˆท  
94 - Account[] accounts = userService.getUserList();  
95 - userinfo = userService.getAppAccount();  
96 - if (accounts.length <= MAX_USER_COUNT) {  
97 - callBack.callback(0, "", userinfo);  
98 - } else {  
99 - CNLiveUserInfo finalUserinfo = userinfo;  
100 - userService.removeUser(accounts[0], future -> callBack.callback(0, "", finalUserinfo));  
101 - }  
102 - }  
103 - return Observable.just(userinfo);  
104 - }  
105 -  
106 -  
107 - public interface CallBack {  
108 - void callback(int state, String msg, Object object);  
109 - }  
110 -}  
cloud/third_tool/src/main/java/com/cnlive/login/action/UserThirdUtilAction.java deleted 100644 โ†’ 0
1 -package com.cnlive.login.action;  
2 -  
3 -import android.content.Context;  
4 -  
5 -import com.cnlive.core.libs.base.application.AppConfig;  
6 -import com.cnlive.core.network.api.ApiBaseServiceOpen;  
7 -import com.cnlive.core.network.model.BaseResult;  
8 -import com.cnlive.core.network.model.UserData;  
9 -import com.cnlive.core.network.request.BaseRequest;  
10 -  
11 -import java.util.HashMap;  
12 -import java.util.Map;  
13 -  
14 -import io.reactivex.Observable;  
15 -  
16 -/**  
17 - * created by hanyayun  
18 - * on 2019/12/4  
19 - */  
20 -public class UserThirdUtilAction {  
21 -  
22 - /**  
23 - * ๅ…ถไป–ๅนณๅฐ่ดฆๆˆท็™ปๅฝ•  
24 - *  
25 - * @param context  
26 - * @param thirdPartyPlat ๅนณๅฐ็ฑปๅž‹ 1:sina 2:qq 3:weixin 4:renren  
27 - * @param thirdPartyId ็ฌฌไธ‰ๆ–น็”จๆˆทID  
28 - * [qq: ๅปบ่ฎฎไฝฟ็”จopenid, wx: ๅปบ่ฎฎไฝฟ็”จunionid, sina: ๅปบ่ฎฎไฝฟ็”จidstr]๏ผ›  
29 - * ๆณจๆ„๏ผšๅŒไธ€็”จๆˆทๅœจ็™ปๅฝ•Spไธ‹ไธๅŒappๆ—ถ๏ผŒthirdPartyIdๅฟ…้กป็›ธๅŒ  
30 - */  
31 - public static Observable<BaseResult<UserData>> otherLogin(Context context, String thirdPartyPlat, String thirdPartyId) {  
32 -  
33 - Map<String, String> requestMap = new HashMap<>();  
34 - requestMap.put("appId", AppConfig.getAppId());  
35 - requestMap.put("thirdPartyPlat", thirdPartyPlat);  
36 - requestMap.put("thirdPartyId", thirdPartyId);  
37 - requestMap.put("frmId", AppConfig.getAppChannel());  
38 - requestMap.put("clientPlat", "a");  
39 - return BaseRequest.init().service(ApiBaseServiceOpen.class).loginIn3rdForWJJ(requestMap);  
40 - }  
41 -  
42 - /**  
43 - * ๅ…ถไป–ๅนณๅฐ่ดฆๆˆท็‰ˆๅฎšๆ‰‹ๆœบๅทๅนถ็™ปๅฝ•  
44 - *  
45 - * @param context  
46 - * @param thirdPartyPlat ๅนณๅฐ็ฑปๅž‹ 1:sina 2:qq 3:weixin 4:renren  
47 - * @param thirdPartyId ็ฌฌไธ‰ๆ–น็”จๆˆทID  
48 - * [qq: ๅปบ่ฎฎไฝฟ็”จopenid, wx: ๅปบ่ฎฎไฝฟ็”จunionid, sina: ๅปบ่ฎฎไฝฟ็”จidstr]๏ผ›  
49 - * ๆณจๆ„๏ผšๅŒไธ€็”จๆˆทๅœจ็™ปๅฝ•Spไธ‹ไธๅŒappๆ—ถ๏ผŒthirdPartyIdๅฟ…้กป็›ธๅŒ  
50 - */  
51 -  
52 -  
53 - public static Observable<BaseResult<UserData>> otherLoginBindMobile(Context context,  
54 - String phone,  
55 - String countryCode,  
56 - String ems,  
57 - String thirdPartyPlat,  
58 - String thirdPartyId,  
59 - String nickName,  
60 - String gender,  
61 - String location,  
62 - String faceUrl) {  
63 - Map<String, String> requestMap = new HashMap<>();  
64 -  
65 - requestMap.put("frmId", AppConfig.getAppChannel());  
66 - requestMap.put("clientPlat", "a");  
67 - requestMap.put("uuid", AppConfig.getAppUUID());  
68 -  
69 - requestMap.put("appId", AppConfig.getAppId());  
70 - requestMap.put("mobile", phone);  
71 - requestMap.put("countryCode", countryCode);  
72 - requestMap.put("verificationCode", ems);  
73 -  
74 - requestMap.put("thirdPartyPlat", thirdPartyPlat);  
75 - requestMap.put("thirdPartyId", thirdPartyId);  
76 - requestMap.put("nickName", nickName);  
77 - requestMap.put("gender", gender);  
78 - requestMap.put("location", location);  
79 - requestMap.put("faceUrl", faceUrl);  
80 -  
81 - return BaseRequest.init().service(ApiBaseServiceOpen.class).loginIn3rdAndMobileForWJJ(requestMap);  
82 - }  
83 -}  
cloud/user/src/main/java/com/cnlive/cloud/user/frame/data/OtherUserInfo.java renamed to cloud/third_tool/src/main/java/com/cnlive/login/model/OtherUserInfo.java
1 -package com.cnlive.cloud.user.frame.data; 1 +package com.cnlive.login.model;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
4 4
cloud/third_tool/src/main/java/com/cnlive/login/model/ThirdLoginInfo.java
1 package com.cnlive.login.model; 1 package com.cnlive.login.model;
2 2
3 3
4 -import com.cnlive.cloud.user.frame.data.OtherUserInfo;  
5 4
6 /** 5 /**
7 * ไฝœ่€…: ๅดๅฅŽๅบ† 6 * ไฝœ่€…: ๅดๅฅŽๅบ†
cloud/third_tool/src/main/java/com/cnlive/login/utils/ThirdLoginUtil.java
1 package com.cnlive.login.utils; 1 package com.cnlive.login.utils;
2 2
  3 +import android.app.Activity;
3 import android.content.Context; 4 import android.content.Context;
  5 +import android.content.Intent;
4 import android.text.TextUtils; 6 import android.text.TextUtils;
  7 +import android.util.Log;
5 8
6 -import com.cnlive.cloud.user.frame.data.OtherUserInfo; 9 +import com.cnlive.core.libs.base.application.AppConfig;
  10 +import com.cnlive.core.libs.base.util.AlertUtil;
  11 +import com.cnlive.login.model.OtherUserInfo;
7 import com.cnlive.login.model.ThirdLoginInfo; 12 import com.cnlive.login.model.ThirdLoginInfo;
8 import com.cnlive.login.observer.ThirdLoginObservable; 13 import com.cnlive.login.observer.ThirdLoginObservable;
  14 +import com.cnlive.share.BuildConfig;
9 import com.sina.weibo.sdk.auth.Oauth2AccessToken; 15 import com.sina.weibo.sdk.auth.Oauth2AccessToken;
  16 +import com.sina.weibo.sdk.auth.WbAuthListener;
  17 +import com.sina.weibo.sdk.auth.WbConnectErrorMessage;
  18 +import com.sina.weibo.sdk.auth.sso.SsoHandler;
10 import com.sina.weibo.sdk.net.HttpManager; 19 import com.sina.weibo.sdk.net.HttpManager;
11 import com.sina.weibo.sdk.net.WeiboParameters; 20 import com.sina.weibo.sdk.net.WeiboParameters;
12 import com.tencent.connect.UserInfo; 21 import com.tencent.connect.UserInfo;
  22 +import com.tencent.mm.opensdk.modelmsg.SendAuth;
  23 +import com.tencent.mm.opensdk.openapi.IWXAPI;
  24 +import com.tencent.mm.opensdk.openapi.WXAPIFactory;
13 import com.tencent.tauth.IUiListener; 25 import com.tencent.tauth.IUiListener;
14 import com.tencent.tauth.Tencent; 26 import com.tencent.tauth.Tencent;
15 import com.tencent.tauth.UiError; 27 import com.tencent.tauth.UiError;
@@ -37,6 +49,101 @@ import static com.tencent.open.SocialConstants.PARAM_OPEN_ID; @@ -37,6 +49,101 @@ import static com.tencent.open.SocialConstants.PARAM_OPEN_ID;
37 * ็ฎ€ไป‹: ไธ‰ๆ–น็™ป้™†็š„ๅทฅๅ…ท็ฑป 49 * ็ฎ€ไป‹: ไธ‰ๆ–น็™ป้™†็š„ๅทฅๅ…ท็ฑป
38 */ 50 */
39 public class ThirdLoginUtil { 51 public class ThirdLoginUtil {
  52 +
  53 + //qq็™ปๅฝ•
  54 + private static Tencent mTencent;
  55 + public static final String ACOPE_ALL = "all";
  56 + private static Activity mContext;
  57 +
  58 + private static SsoHandler mSsoHandler;
  59 +
  60 + public static void init(Context context) {
  61 + synchronized (Tencent.class) {
  62 + if (mTencent == null) {
  63 + mTencent = Tencent.createInstance(BuildConfig.QQ_SHARE, context);
  64 + }
  65 + }
  66 + }
  67 +
  68 +
  69 + /**
  70 + * ๆ˜ฏๅฆๅฎ‰่ฃ…qq
  71 + * @param context
  72 + * @return
  73 + */
  74 + public static boolean isQQInstalled(Activity context){
  75 + boolean isInstall = false;
  76 + mContext = context;
  77 + isInstall = mTencent.isQQInstalled(context);
  78 + if(isInstall) mTencent.login(context, ACOPE_ALL, listener);
  79 + return isInstall;
  80 + }
  81 +
  82 + /**
  83 + * ๅ›ž่ฐƒๅค„็†
  84 + * @param requestCode
  85 + * @param resultCode
  86 + * @param data
  87 + */
  88 + public static void getQQResult(int requestCode, int resultCode, Intent data){
  89 + Tencent.onActivityResultData(requestCode, resultCode, data, listener);
  90 + }
  91 +
  92 +
  93 + /**
  94 + * ๅพฎๅš็™ปๅฝ•
  95 + * @param activity
  96 + */
  97 + public static void loginWeibo(Activity activity){
  98 + if(mSsoHandler == null)mSsoHandler = new SsoHandler(activity);
  99 + mSsoHandler.authorize(new WbAuthListener() {
  100 + @Override
  101 + public void onSuccess(Oauth2AccessToken oauth2AccessToken) {
  102 + getWeiBoInfo(activity, oauth2AccessToken);
  103 + }
  104 +
  105 + @Override
  106 + public void cancel() {
  107 + AlertUtil.showDeftToast(activity, "ๅ–ๆถˆ็™ปๅฝ•");
  108 + }
  109 +
  110 + @Override
  111 + public void onFailure(WbConnectErrorMessage wbConnectErrorMessage) {
  112 + AlertUtil.showDeftToast(activity, "็™ปๅฝ•ๅคฑ่ดฅ");
  113 + }
  114 + });
  115 + }
  116 +
  117 + /**
  118 + * ๅพฎๅšๅ›ž่ฐƒๅค„็†
  119 + * @param requestCode
  120 + * @param resultCode
  121 + * @param data
  122 + */
  123 + public static void getWeiboResult(int requestCode, int resultCode, Intent data){
  124 + if (mSsoHandler != null) {
  125 + try {
  126 + mSsoHandler.authorizeCallBack(requestCode, resultCode, data);
  127 + } catch (Exception e) {
  128 + Log.e("ๆ–ฐๆตชๅผ‚ๅธธ:", "", e);
  129 + }
  130 + }
  131 + }
  132 +
  133 + /**
  134 + * ๅพฎไฟก็™ปๅฝ•
  135 + * @param activity
  136 + * @param wechatAppId
  137 + */
  138 + public static void loginWechat(Activity activity,String wechatAppId){
  139 + SendAuth.Req req = new SendAuth.Req();
  140 + req.scope = "snsapi_userinfo";
  141 + req.state = BuildConfig.SEND_AUTH_REQ_STATE;
  142 +
  143 + IWXAPI iwxapi = WXAPIFactory.createWXAPI(activity, AppConfig.getWechatAppid(), true);
  144 + iwxapi.registerApp(wechatAppId);
  145 + iwxapi.sendReq(req);
  146 + }
40 /** 147 /**
41 * ่Žทๅ–ๅพฎๅšไฟกๆฏ 148 * ่Žทๅ–ๅพฎๅšไฟกๆฏ
42 * 149 *
@@ -206,4 +313,20 @@ public class ThirdLoginUtil { @@ -206,4 +313,20 @@ public class ThirdLoginUtil {
206 }); 313 });
207 } 314 }
208 315
  316 + static IUiListener listener = new IUiListener() {
  317 + @Override
  318 + public void onComplete(Object o) {
  319 + getQQInfo(mContext, mTencent, o);
  320 + }
  321 +
  322 + @Override
  323 + public void onError(UiError uiError) {
  324 + AlertUtil.showDeftToast(mContext, "็™ปๅฝ•ๅคฑ่ดฅ");
  325 + }
  326 +
  327 + @Override
  328 + public void onCancel() {
  329 + AlertUtil.showDeftToast(mContext, "ๅ–ๆถˆ็™ปๅฝ•");
  330 + }
  331 + };
209 } 332 }
cloud/third_tool/src/main/java/com/cnlive/share/arouter/ARouterUtil.java
@@ -3,9 +3,9 @@ package com.cnlive.share.arouter; @@ -3,9 +3,9 @@ package com.cnlive.share.arouter;
3 import android.content.Context; 3 import android.content.Context;
4 4
5 import com.alibaba.android.arouter.launcher.ARouter; 5 import com.alibaba.android.arouter.launcher.ARouter;
  6 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
6 import com.cnlive.core.libs.base.util.SharedPreferencesHelper; 7 import com.cnlive.core.libs.base.util.SharedPreferencesHelper;
7 import com.cnlive.core.network.action.CoinRainAction; 8 import com.cnlive.core.network.action.CoinRainAction;
8 -import com.cnlive.cloud.user.auth.UserService;  
9 9
10 public class ARouterUtil { 10 public class ARouterUtil {
11 /** 11 /**
@@ -14,7 +14,9 @@ public class ARouterUtil { @@ -14,7 +14,9 @@ public class ARouterUtil {
14 public static void addIntegrationPic(Context context, String taskId, String contentId, String addtype) { 14 public static void addIntegrationPic(Context context, String taskId, String contentId, String addtype) {
15 Boolean app_is_show_integral = SharedPreferencesHelper.getInstance(context).getBoolValue("APP_IS_SHOW_INTEGRAL"); 15 Boolean app_is_show_integral = SharedPreferencesHelper.getInstance(context).getBoolValue("APP_IS_SHOW_INTEGRAL");
16 if (app_is_show_integral) { 16 if (app_is_show_integral) {
17 - CoinRainAction.code(context, UserService.getUid(context), taskId, contentId, addtype,false); 17 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  18 + String sid = service.getUid(context);
  19 + CoinRainAction.code(context, sid, taskId, contentId, addtype,false);
18 } 20 }
19 } 21 }
20 22
cloud/third_tool/src/main/java/com/cnlive/share/ui/ShareImgActivity.java
@@ -15,6 +15,8 @@ import android.view.ViewGroup; @@ -15,6 +15,8 @@ import android.view.ViewGroup;
15 import android.widget.LinearLayout; 15 import android.widget.LinearLayout;
16 16
17 import com.alibaba.android.arouter.facade.annotation.Route; 17 import com.alibaba.android.arouter.facade.annotation.Route;
  18 +import com.alibaba.android.arouter.launcher.ARouter;
  19 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
18 import com.cnlive.core.libs.base.util.AlertUtil; 20 import com.cnlive.core.libs.base.util.AlertUtil;
19 import com.cnlive.core.libs.base.util.DoublePressed; 21 import com.cnlive.core.libs.base.util.DoublePressed;
20 import com.cnlive.share.BuildConfig; 22 import com.cnlive.share.BuildConfig;
@@ -23,7 +25,6 @@ import com.cnlive.share.data.IconInfo; @@ -23,7 +25,6 @@ import com.cnlive.share.data.IconInfo;
23 import com.cnlive.share.observable.ShareClickObservable; 25 import com.cnlive.share.observable.ShareClickObservable;
24 import com.cnlive.share.util.ShareUtils; 26 import com.cnlive.share.util.ShareUtils;
25 import com.cnlive.share.util.Util; 27 import com.cnlive.share.util.Util;
26 -import com.cnlive.cloud.user.auth.UserService;  
27 import com.sina.weibo.sdk.share.WbShareCallback; 28 import com.sina.weibo.sdk.share.WbShareCallback;
28 import com.sina.weibo.sdk.share.WbShareHandler; 29 import com.sina.weibo.sdk.share.WbShareHandler;
29 import com.tencent.connect.common.Constants; 30 import com.tencent.connect.common.Constants;
@@ -90,8 +91,11 @@ public class ShareImgActivity extends AppCompatActivity implements ShareDialogLi @@ -90,8 +91,11 @@ public class ShareImgActivity extends AppCompatActivity implements ShareDialogLi
90 } 91 }
91 92
92 private void initList() { 93 private void initList() {
93 - if (getIntent().getStringExtra("fileName") != null)  
94 - fileName = UserService.getUid(this) + getIntent().getStringExtra("fileName"); 94 + if (getIntent().getStringExtra("fileName") != null){
  95 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  96 + String sid = service.getUid(this);
  97 + fileName = sid + getIntent().getStringExtra("fileName");
  98 + }
95 SharedPreferences sp = this.getSharedPreferences("sp", Context.MODE_PRIVATE); 99 SharedPreferences sp = this.getSharedPreferences("sp", Context.MODE_PRIVATE);
96 String bt = sp.getString("share_img_string", ""); 100 String bt = sp.getString("share_img_string", "");
97 bitmap = convertStringToIcon(bt); 101 bitmap = convertStringToIcon(bt);
cloud/third_tool/src/main/java/com/cnlive/share/util/ShareUtils.java
@@ -16,6 +16,7 @@ import com.alibaba.android.arouter.launcher.ARouter; @@ -16,6 +16,7 @@ import com.alibaba.android.arouter.launcher.ARouter;
16 import com.bumptech.glide.Glide; 16 import com.bumptech.glide.Glide;
17 import com.bumptech.glide.request.RequestOptions; 17 import com.bumptech.glide.request.RequestOptions;
18 import com.cnlive.core.libs.base.application.AppConfig; 18 import com.cnlive.core.libs.base.application.AppConfig;
  19 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
19 import com.cnlive.core.libs.base.util.AlertUtil; 20 import com.cnlive.core.libs.base.util.AlertUtil;
20 import com.cnlive.core.libs.base.util.FileUtils; 21 import com.cnlive.core.libs.base.util.FileUtils;
21 import com.cnlive.core.libs.base.util.NetworkUtil; 22 import com.cnlive.core.libs.base.util.NetworkUtil;
@@ -33,7 +34,6 @@ import com.cnlive.share.data.ShareInfo; @@ -33,7 +34,6 @@ import com.cnlive.share.data.ShareInfo;
33 import com.cnlive.share.data.ShareIntegralTypeInfo; 34 import com.cnlive.share.data.ShareIntegralTypeInfo;
34 import com.cnlive.share.model.ShareReleaseInfoUtil; 35 import com.cnlive.share.model.ShareReleaseInfoUtil;
35 import com.cnlive.share.model.ShortLinkInfo; 36 import com.cnlive.share.model.ShortLinkInfo;
36 -import com.cnlive.cloud.user.auth.UserService;  
37 import com.google.gson.Gson; 37 import com.google.gson.Gson;
38 import com.sina.weibo.sdk.api.ImageObject; 38 import com.sina.weibo.sdk.api.ImageObject;
39 import com.sina.weibo.sdk.api.TextObject; 39 import com.sina.weibo.sdk.api.TextObject;
@@ -284,12 +284,14 @@ public class ShareUtils { @@ -284,12 +284,14 @@ public class ShareUtils {
284 */ 284 */
285 public static void processQQCallBack(Activity mContext, String shareType, String contentId) { 285 public static void processQQCallBack(Activity mContext, String shareType, String contentId) {
286 if (TextUtils.isEmpty(shareType)) return; 286 if (TextUtils.isEmpty(shareType)) return;
  287 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  288 + String sid = service.getUid(mContext);
287 switch (shareType) { 289 switch (shareType) {
288 case "witnessVideo": 290 case "witnessVideo":
289 SharedPreferences preferences = mContext.getSharedPreferences("sharevideo", MODE_PRIVATE); 291 SharedPreferences preferences = mContext.getSharedPreferences("sharevideo", MODE_PRIVATE);
290 - boolean status = preferences.getBoolean(UserService.getUid(mContext), false); 292 + boolean status = preferences.getBoolean(sid, false);
291 String newTime = DateTimeUtil.getCurrentTime(); 293 String newTime = DateTimeUtil.getCurrentTime();
292 - String oldtime = preferences.getString(UserService.getUid(mContext) + "time", "2019-04-10"); 294 + String oldtime = preferences.getString(sid + "time", "2019-04-10");
293 boolean sameDay = DateTimeUtil.isSameDay(newTime, oldtime); 295 boolean sameDay = DateTimeUtil.isSameDay(newTime, oldtime);
294 if (!status) { 296 if (!status) {
295 ARouterUtil.addIntegrationPic(mContext, "share_video", contentId, "sharevideo"); 297 ARouterUtil.addIntegrationPic(mContext, "share_video", contentId, "sharevideo");
@@ -300,9 +302,9 @@ public class ShareUtils { @@ -300,9 +302,9 @@ public class ShareUtils {
300 break; 302 break;
301 default: 303 default:
302 SharedPreferences preferences1 = mContext.getSharedPreferences("sharearticle", MODE_PRIVATE); 304 SharedPreferences preferences1 = mContext.getSharedPreferences("sharearticle", MODE_PRIVATE);
303 - boolean status1 = preferences1.getBoolean(UserService.getUid(mContext), false); 305 + boolean status1 = preferences1.getBoolean(sid, false);
304 String newTime1 = DateTimeUtil.getCurrentTime(); 306 String newTime1 = DateTimeUtil.getCurrentTime();
305 - String oldtime1 = preferences1.getString(UserService.getUid(mContext) + "time", "2019-04-10"); 307 + String oldtime1 = preferences1.getString(sid + "time", "2019-04-10");
306 boolean sameDay1 = DateTimeUtil.isSameDay(newTime1, oldtime1); 308 boolean sameDay1 = DateTimeUtil.isSameDay(newTime1, oldtime1);
307 if (!status1) { 309 if (!status1) {
308 ARouterUtil.addIntegrationPic(mContext, "share_article", contentId, "sharearticle"); 310 ARouterUtil.addIntegrationPic(mContext, "share_article", contentId, "sharearticle");
cloud/third_tool/src/main/java/com/cnlive/share/util/Util.java
@@ -20,10 +20,11 @@ import android.graphics.Rect; @@ -20,10 +20,11 @@ import android.graphics.Rect;
20 import android.net.Uri; 20 import android.net.Uri;
21 import android.text.TextUtils; 21 import android.text.TextUtils;
22 22
  23 +import com.alibaba.android.arouter.launcher.ARouter;
23 import com.cnlive.core.libs.base.application.AppConfig; 24 import com.cnlive.core.libs.base.application.AppConfig;
  25 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
24 import com.cnlive.core.network.util.UriUtil; 26 import com.cnlive.core.network.util.UriUtil;
25 import com.cnlive.share.BuildConfig; 27 import com.cnlive.share.BuildConfig;
26 -import com.cnlive.cloud.user.auth.UserService;  
27 import com.sina.weibo.sdk.WbSdk; 28 import com.sina.weibo.sdk.WbSdk;
28 import com.sina.weibo.sdk.auth.AuthInfo; 29 import com.sina.weibo.sdk.auth.AuthInfo;
29 import com.tencent.mm.opensdk.openapi.IWXAPI; 30 import com.tencent.mm.opensdk.openapi.IWXAPI;
@@ -156,6 +157,8 @@ public class Util { @@ -156,6 +157,8 @@ public class Util {
156 */ 157 */
157 public static String processUrlData(String shareInfoUrl, Context mContext, boolean isToWjj) { 158 public static String processUrlData(String shareInfoUrl, Context mContext, boolean isToWjj) {
158 if (shareInfoUrl.contains("http://wjjh5.cnlive.com") || shareInfoUrl.contains("http://wjjh5test.cnlive.com")) { 159 if (shareInfoUrl.contains("http://wjjh5.cnlive.com") || shareInfoUrl.contains("http://wjjh5test.cnlive.com")) {
  160 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  161 + String userId = service.getUid(mContext);
159 Uri oldUri = Uri.parse(shareInfoUrl); 162 Uri oldUri = Uri.parse(shareInfoUrl);
160 //ๅˆคๆ–ญๅˆ†ไบซๅœฐๅ€ไธญๆ˜ฏๅฆๆœ‰ๅ‚ๆ•ฐ๏ผŒๅฆ‚ๆžœๆฒกๆœ‰ๅˆ™ๅ…ˆๆ‹ผๆŽฅ้—ฎๅท 163 //ๅˆคๆ–ญๅˆ†ไบซๅœฐๅ€ไธญๆ˜ฏๅฆๆœ‰ๅ‚ๆ•ฐ๏ผŒๅฆ‚ๆžœๆฒกๆœ‰ๅˆ™ๅ…ˆๆ‹ผๆŽฅ้—ฎๅท
161 if (oldUri.getQueryParameterNames().size() <= 0) { 164 if (oldUri.getQueryParameterNames().size() <= 0) {
@@ -164,13 +167,13 @@ public class Util { @@ -164,13 +167,13 @@ public class Util {
164 } 167 }
165 if (!shareInfoUrl.contains("?sid=") && !shareInfoUrl.contains("&sid=")) { 168 if (!shareInfoUrl.contains("?sid=") && !shareInfoUrl.contains("&sid=")) {
166 StringBuilder pageUrl = new StringBuilder(shareInfoUrl); 169 StringBuilder pageUrl = new StringBuilder(shareInfoUrl);
167 - pageUrl.append(oldUri.getQueryParameterNames().size() <= 0 ? "sid=" : "&sid=").append(UserService.getUid(mContext)); 170 + pageUrl.append(oldUri.getQueryParameterNames().size() <= 0 ? "sid=" : "&sid=").append(userId);
168 shareInfoUrl = pageUrl.toString(); 171 shareInfoUrl = pageUrl.toString();
169 } 172 }
170 173
171 if (!shareInfoUrl.contains("?shareSid=") && !shareInfoUrl.contains("&shareSid=")) { 174 if (!shareInfoUrl.contains("?shareSid=") && !shareInfoUrl.contains("&shareSid=")) {
172 StringBuilder pageUrl = new StringBuilder(shareInfoUrl); 175 StringBuilder pageUrl = new StringBuilder(shareInfoUrl);
173 - pageUrl.append("&shareSid=").append(UserService.getUid(mContext)); 176 + pageUrl.append("&shareSid=").append(userId);
174 shareInfoUrl = pageUrl.toString(); 177 shareInfoUrl = pageUrl.toString();
175 } 178 }
176 if (!shareInfoUrl.contains("?isApp=") && !shareInfoUrl.contains("&isApp=")) { 179 if (!shareInfoUrl.contains("?isApp=") && !shareInfoUrl.contains("&isApp=")) {
@@ -208,15 +211,16 @@ public class Util { @@ -208,15 +211,16 @@ public class Util {
208 String url = urls[0]; 211 String url = urls[0];
209 StringBuilder pageUrl = new StringBuilder(url); 212 StringBuilder pageUrl = new StringBuilder(url);
210 pageUrl.append("?"); 213 pageUrl.append("?");
  214 +
211 for (String key : uri.getQueryParameterNames()) { 215 for (String key : uri.getQueryParameterNames()) {
212 if ("sid".equals(key)) { 216 if ("sid".equals(key)) {
213 - pageUrl.append(key).append("=").append(Uri.encode(TextUtils.isEmpty(UserService.getUid(mContext)) ? "" : UserService.getUid(mContext))).append("&"); 217 + pageUrl.append(key).append("=").append(Uri.encode(TextUtils.isEmpty(userId) ? "" : userId)).append("&");
214 } else if ("ver".equals(key)) { 218 } else if ("ver".equals(key)) {
215 pageUrl.append(key).append("=").append(Uri.encode(TextUtils.isEmpty(AppConfig.getAppVersion()) ? "" : AppConfig.getAppVersion())).append("&"); 219 pageUrl.append(key).append("=").append(Uri.encode(TextUtils.isEmpty(AppConfig.getAppVersion()) ? "" : AppConfig.getAppVersion())).append("&");
216 } else if ("plat".equals(key)) { 220 } else if ("plat".equals(key)) {
217 pageUrl.append(key).append("=").append(Uri.encode("a")).append("&"); 221 pageUrl.append(key).append("=").append(Uri.encode("a")).append("&");
218 } else if ("shareSid".equals(key)) { 222 } else if ("shareSid".equals(key)) {
219 - pageUrl.append(key).append("=").append(Uri.encode(TextUtils.isEmpty(UserService.getUid(mContext)) ? "" : UserService.getUid(mContext))).append("&"); 223 + pageUrl.append(key).append("=").append(Uri.encode(TextUtils.isEmpty(userId) ? "" : userId)).append("&");
220 } else if ("isApp".equals(key)) { 224 } else if ("isApp".equals(key)) {
221 pageUrl.append(key).append("=").append(isToWjj).append("&"); 225 pageUrl.append(key).append("=").append(isToWjj).append("&");
222 } else if ("wjjFrom".equals(key)) { 226 } else if ("wjjFrom".equals(key)) {
cloud/user/build.gradle
@@ -49,6 +49,6 @@ dependencies { @@ -49,6 +49,6 @@ dependencies {
49 implementation "com.cnlive.libs:emoj:$rootProject.libEmoj" 49 implementation "com.cnlive.libs:emoj:$rootProject.libEmoj"
50 //ๅ›พ็‰‡้€‰ๆ‹ฉๅ™จ 50 //ๅ›พ็‰‡้€‰ๆ‹ฉๅ™จ
51 implementation "com.cnlive.libs:mediapicker:$rootProject.libMediaPicker" 51 implementation "com.cnlive.libs:mediapicker:$rootProject.libMediaPicker"
52 -// implementation project(path: ':cloud:third_tool') 52 + implementation project(path: ':cloud:third_tool')
53 53
54 } 54 }
cloud/user/src/main/java/com/cnlive/cloud/user/UserUtilAction.java
@@ -325,6 +325,70 @@ public class UserUtilAction { @@ -325,6 +325,70 @@ public class UserUtilAction {
325 // return null; 325 // return null;
326 // } 326 // }
327 327
  328 +
  329 + /**
  330 + * ๅ…ถไป–ๅนณๅฐ่ดฆๆˆท็™ปๅฝ•
  331 + *
  332 + * @param context
  333 + * @param thirdPartyPlat ๅนณๅฐ็ฑปๅž‹ 1:sina 2:qq 3:weixin 4:renren
  334 + * @param thirdPartyId ็ฌฌไธ‰ๆ–น็”จๆˆทID
  335 + * [qq: ๅปบ่ฎฎไฝฟ็”จopenid, wx: ๅปบ่ฎฎไฝฟ็”จunionid, sina: ๅปบ่ฎฎไฝฟ็”จidstr]๏ผ›
  336 + * ๆณจๆ„๏ผšๅŒไธ€็”จๆˆทๅœจ็™ปๅฝ•Spไธ‹ไธๅŒappๆ—ถ๏ผŒthirdPartyIdๅฟ…้กป็›ธๅŒ
  337 + */
  338 + public static Observable<BaseResult<UserData>> otherLogin(Context context, String thirdPartyPlat, String thirdPartyId) {
  339 +
  340 + Map<String, String> requestMap = new HashMap<>();
  341 + requestMap.put("appId", AppConfig.getAppId());
  342 + requestMap.put("thirdPartyPlat", thirdPartyPlat);
  343 + requestMap.put("thirdPartyId", thirdPartyId);
  344 + requestMap.put("frmId", AppConfig.getAppChannel());
  345 + requestMap.put("clientPlat", "a");
  346 + return BaseRequest.init().service(ApiBaseServiceOpen.class).loginIn3rdForWJJ(requestMap);
  347 + }
  348 +
  349 + /**
  350 + * ๅ…ถไป–ๅนณๅฐ่ดฆๆˆท็‰ˆๅฎšๆ‰‹ๆœบๅทๅนถ็™ปๅฝ•
  351 + *
  352 + * @param context
  353 + * @param thirdPartyPlat ๅนณๅฐ็ฑปๅž‹ 1:sina 2:qq 3:weixin 4:renren
  354 + * @param thirdPartyId ็ฌฌไธ‰ๆ–น็”จๆˆทID
  355 + * [qq: ๅปบ่ฎฎไฝฟ็”จopenid, wx: ๅปบ่ฎฎไฝฟ็”จunionid, sina: ๅปบ่ฎฎไฝฟ็”จidstr]๏ผ›
  356 + * ๆณจๆ„๏ผšๅŒไธ€็”จๆˆทๅœจ็™ปๅฝ•Spไธ‹ไธๅŒappๆ—ถ๏ผŒthirdPartyIdๅฟ…้กป็›ธๅŒ
  357 + */
  358 +
  359 +
  360 + public static Observable<BaseResult<UserData>> otherLoginBindMobile(Context context,
  361 + String phone,
  362 + String countryCode,
  363 + String ems,
  364 + String thirdPartyPlat,
  365 + String thirdPartyId,
  366 + String nickName,
  367 + String gender,
  368 + String location,
  369 + String faceUrl) {
  370 + Map<String, String> requestMap = new HashMap<>();
  371 +
  372 + requestMap.put("frmId", AppConfig.getAppChannel());
  373 + requestMap.put("clientPlat", "a");
  374 + requestMap.put("uuid", AppConfig.getAppUUID());
  375 +
  376 + requestMap.put("appId", AppConfig.getAppId());
  377 + requestMap.put("mobile", phone);
  378 + requestMap.put("countryCode", countryCode);
  379 + requestMap.put("verificationCode", ems);
  380 +
  381 + requestMap.put("thirdPartyPlat", thirdPartyPlat);
  382 + requestMap.put("thirdPartyId", thirdPartyId);
  383 + requestMap.put("nickName", nickName);
  384 + requestMap.put("gender", gender);
  385 + requestMap.put("location", location);
  386 + requestMap.put("faceUrl", faceUrl);
  387 +
  388 + return BaseRequest.init().service(ApiBaseServiceOpen.class).loginIn3rdAndMobileForWJJ(requestMap);
  389 + }
  390 +
  391 +
328 private static String getPath() { 392 private static String getPath() {
329 String path = Environment.getExternalStorageDirectory() + "/strike/image/"; 393 String path = Environment.getExternalStorageDirectory() + "/strike/image/";
330 File file = new File(path); 394 File file = new File(path);
cloud/user/src/main/java/com/cnlive/cloud/user/frame/presenter/LoginDialogPresenter.java
@@ -13,7 +13,6 @@ import com.cnlive.core.network.model.BaseResult; @@ -13,7 +13,6 @@ import com.cnlive.core.network.model.BaseResult;
13 import com.cnlive.cloud.user.R; 13 import com.cnlive.cloud.user.R;
14 import com.cnlive.cloud.user.UserUtilAction; 14 import com.cnlive.cloud.user.UserUtilAction;
15 import com.cnlive.cloud.user.auth.UserService; 15 import com.cnlive.cloud.user.auth.UserService;
16 -import com.cnlive.cloud.user.frame.data.OtherUserInfo;  
17 import com.cnlive.cloud.user.frame.data.QuickLoginData; 16 import com.cnlive.cloud.user.frame.data.QuickLoginData;
18 import com.cnlive.cloud.user.frame.view.LoginDialogView; 17 import com.cnlive.cloud.user.frame.view.LoginDialogView;
19 import com.cnlive.cloud.user.model.CNLiveUserInfo; 18 import com.cnlive.cloud.user.model.CNLiveUserInfo;
@@ -21,6 +20,7 @@ import com.cnlive.cloud.user.router.user.UserAction; @@ -21,6 +20,7 @@ import com.cnlive.cloud.user.router.user.UserAction;
21 import com.cnlive.cloud.user.ui.activity.LoginDialogActivity; 20 import com.cnlive.cloud.user.ui.activity.LoginDialogActivity;
22 import com.cnlive.cloud.user.util.RegexUtils; 21 import com.cnlive.cloud.user.util.RegexUtils;
23 import com.cnlive.cloud.user.util.TimeEvent; 22 import com.cnlive.cloud.user.util.TimeEvent;
  23 +import com.cnlive.login.model.OtherUserInfo;
24 24
25 import java.util.Arrays; 25 import java.util.Arrays;
26 import java.util.Collections; 26 import java.util.Collections;
@@ -40,6 +40,7 @@ public class LoginDialogPresenter extends BasePresenter&lt;LoginDialogView&gt; { @@ -40,6 +40,7 @@ public class LoginDialogPresenter extends BasePresenter&lt;LoginDialogView&gt; {
40 private static final String TAG = "QuickLoginPresenter"; 40 private static final String TAG = "QuickLoginPresenter";
41 41
42 private Disposable event; 42 private Disposable event;
  43 + private Disposable otherEvent;
43 private Disposable sendMsgBefQuickLogin; 44 private Disposable sendMsgBefQuickLogin;
44 private TimerWaitUtil timerUtil; //่ฎกๆ—ถๅทฅๅ…ท็ฑป 45 private TimerWaitUtil timerUtil; //่ฎกๆ—ถๅทฅๅ…ท็ฑป
45 46
@@ -65,8 +66,10 @@ public class LoginDialogPresenter extends BasePresenter&lt;LoginDialogView&gt; { @@ -65,8 +66,10 @@ public class LoginDialogPresenter extends BasePresenter&lt;LoginDialogView&gt; {
65 Account account = accounts.length > 0 ? accounts[0] : null; 66 Account account = accounts.length > 0 ? accounts[0] : null;
66 String name = account == null ? "" : account.name; 67 String name = account == null ? "" : account.name;
67 //้กต้ขๅกซๅ……ๆ•ฐๆฎ 68 //้กต้ขๅกซๅ……ๆ•ฐๆฎ
68 - ifViewAttached(view -> view.uploadInputData(name));  
69 - ifViewAttached(view -> view.uploadListData(accounts)); 69 + if(getView() != null){
  70 + getView().uploadInputData(name);
  71 + getView().uploadListData(accounts);
  72 + }
70 } 73 }
71 74
72 private void startTimer() { 75 private void startTimer() {
@@ -217,26 +220,27 @@ public class LoginDialogPresenter extends BasePresenter&lt;LoginDialogView&gt; { @@ -217,26 +220,27 @@ public class LoginDialogPresenter extends BasePresenter&lt;LoginDialogView&gt; {
217 break; 220 break;
218 } 221 }
219 } 222 }
220 -// /**  
221 -// * ไธ‰ๆ–น็™ป้™†  
222 -// *  
223 -// * @param context  
224 -// * @param otherUserInfo  
225 -// */  
226 -// public void otherLogin(LoginDialogActivity context, OtherUserInfo otherUserInfo) {  
227 -// if (otherUserInfo == null) {  
228 -// getView().showToast(context.getString(R.string.user_toast_other_info_error));  
229 -// } else {  
230 -// cancelLoad();  
231 -// context.isLogin = true;  
232 -//  
233 -// UserAction.otherLogin(context, context.otherUserInfo.getLoginType(), context.otherUserInfo.getThirdPartyId(), initLoginEvent(context, false, otherUserInfo));  
234 -// }  
235 -// }  
236 -//  
237 -// private Event<CNLiveUserInfo> initLoginEvent(LoginDialogActivity context, Boolean retry) {  
238 -// return initLoginEvent(context, retry, null);  
239 -// } 223 + /**
  224 + * ไธ‰ๆ–น็™ป้™†
  225 + *
  226 + * @param context
  227 + * @param otherUserInfo
  228 + */
  229 + public void otherLogin(LoginDialogActivity context, OtherUserInfo otherUserInfo) {
  230 + if (otherUserInfo == null) {
  231 + getView().showToast(context.getString(R.string.user_toast_other_info_error));
  232 + } else {
  233 + cancelLoad();
  234 + context.isLogin = true;
  235 +
  236 + otherEvent = UserAction.otherLogin(context, otherUserInfo.getLoginType(), otherUserInfo.getThirdPartyId(), new UserAction.CallBack() {
  237 + @Override
  238 + public void callback(int state, String msg, Object object) {
  239 + initLoginEvent(context, state,msg,false, otherUserInfo);
  240 + }
  241 + });
  242 + }
  243 + }
240 244
241 245
242 public void cancelLoad() { 246 public void cancelLoad() {
@@ -246,6 +250,13 @@ public class LoginDialogPresenter extends BasePresenter&lt;LoginDialogView&gt; { @@ -246,6 +250,13 @@ public class LoginDialogPresenter extends BasePresenter&lt;LoginDialogView&gt; {
246 } 250 }
247 event = null; 251 event = null;
248 } 252 }
  253 +
  254 + if (otherEvent != null) {
  255 + if (!otherEvent.isDisposed()) {
  256 + otherEvent.dispose();
  257 + }
  258 + otherEvent = null;
  259 + }
249 } 260 }
250 261
251 /** 262 /**
cloud/user/src/main/java/com/cnlive/cloud/user/frame/presenter/QuickLoginPresenter.java
1 package com.cnlive.cloud.user.frame.presenter; 1 package com.cnlive.cloud.user.frame.presenter;
2 2
3 import android.accounts.Account; 3 import android.accounts.Account;
  4 +import android.app.Activity;
4 import android.content.Context; 5 import android.content.Context;
5 import android.text.TextUtils; 6 import android.text.TextUtils;
6 7
7 import com.cnlive.cloud.user.R; 8 import com.cnlive.cloud.user.R;
8 import com.cnlive.cloud.user.UserUtilAction; 9 import com.cnlive.cloud.user.UserUtilAction;
9 import com.cnlive.cloud.user.auth.UserService; 10 import com.cnlive.cloud.user.auth.UserService;
10 -import com.cnlive.cloud.user.frame.data.OtherUserInfo;  
11 import com.cnlive.cloud.user.frame.data.QuickLoginData; 11 import com.cnlive.cloud.user.frame.data.QuickLoginData;
12 import com.cnlive.cloud.user.frame.view.QuickLoginView; 12 import com.cnlive.cloud.user.frame.view.QuickLoginView;
13 import com.cnlive.cloud.user.model.CNLiveUserInfo; 13 import com.cnlive.cloud.user.model.CNLiveUserInfo;
14 import com.cnlive.cloud.user.router.user.UserAction; 14 import com.cnlive.cloud.user.router.user.UserAction;
  15 +import com.cnlive.cloud.user.ui.activity.LoginDialogActivity;
15 import com.cnlive.cloud.user.ui.fragment.QuickLoginFragment; 16 import com.cnlive.cloud.user.ui.fragment.QuickLoginFragment;
16 import com.cnlive.cloud.user.util.RegexUtils; 17 import com.cnlive.cloud.user.util.RegexUtils;
17 import com.cnlive.cloud.user.util.TimeEvent; 18 import com.cnlive.cloud.user.util.TimeEvent;
@@ -21,6 +22,7 @@ import com.cnlive.core.network.model.BaseResult; @@ -21,6 +22,7 @@ import com.cnlive.core.network.model.BaseResult;
21 import com.cnlive.core.network.HttpConn; 22 import com.cnlive.core.network.HttpConn;
22 import com.cnlive.core.network.NetCallBack; 23 import com.cnlive.core.network.NetCallBack;
23 import com.cnlive.core.libs.base.util.TimerWaitUtil; 24 import com.cnlive.core.libs.base.util.TimerWaitUtil;
  25 +import com.cnlive.login.model.OtherUserInfo;
24 26
25 import java.util.Arrays; 27 import java.util.Arrays;
26 import java.util.Collections; 28 import java.util.Collections;
@@ -38,7 +40,7 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; { @@ -38,7 +40,7 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; {
38 40
39 private Disposable event; 41 private Disposable event;
40 private Disposable sendMsgBefQuickLogin; 42 private Disposable sendMsgBefQuickLogin;
41 -// private Event otherEvent; 43 + private Disposable otherEvent;
42 44
43 public void deleteUserInfo(Context context, String userName) { 45 public void deleteUserInfo(Context context, String userName) {
44 UserService.getInstance(context).removeUser(userName, future -> { 46 UserService.getInstance(context).removeUser(userName, future -> {
@@ -62,8 +64,8 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; { @@ -62,8 +64,8 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; {
62 Account account = accounts.length > 0 ? accounts[0] : null; 64 Account account = accounts.length > 0 ? accounts[0] : null;
63 String name = account == null ? "" : account.name; 65 String name = account == null ? "" : account.name;
64 //้กต้ขๅกซๅ……ๆ•ฐๆฎ 66 //้กต้ขๅกซๅ……ๆ•ฐๆฎ
65 - ifViewAttached(view -> view.uploadInputData(name));  
66 - ifViewAttached(view -> view.uploadListData(accounts)); 67 + getView().uploadInputData(name);
  68 + getView().uploadListData(accounts);
67 } 69 }
68 70
69 private void startTimer() { 71 private void startTimer() {
@@ -137,6 +139,29 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; { @@ -137,6 +139,29 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; {
137 } 139 }
138 } 140 }
139 141
  142 +
  143 + /**
  144 + * ไธ‰ๆ–น็™ป้™†
  145 + *
  146 + * @param context
  147 + * @param otherUserInfo
  148 + */
  149 + public void otherLogin(QuickLoginFragment context, OtherUserInfo otherUserInfo) {
  150 + if (otherUserInfo == null) {
  151 + getView().showToast(context.getString(R.string.user_toast_other_info_error));
  152 + } else {
  153 + cancelLoad();
  154 + context.isLogin = true;
  155 +
  156 + otherEvent = UserAction.otherLogin(context.getActivity(), otherUserInfo.getLoginType(), otherUserInfo.getThirdPartyId(), new UserAction.CallBack() {
  157 + @Override
  158 + public void callback(int state, String msg, Object object) {
  159 + initLoginEvent(context, state,msg,false, otherUserInfo);
  160 + }
  161 + });
  162 + }
  163 + }
  164 +
140 private void initLoginEvent(QuickLoginFragment context, int state, String msg, Boolean retry, OtherUserInfo otherUserInfo) { 165 private void initLoginEvent(QuickLoginFragment context, int state, String msg, Boolean retry, OtherUserInfo otherUserInfo) {
141 switch (state) { 166 switch (state) {
142 //่ฏทๆฑ‚ๆˆๅŠŸ 167 //่ฏทๆฑ‚ๆˆๅŠŸ
@@ -173,10 +198,12 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; { @@ -173,10 +198,12 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; {
173 } 198 }
174 break; 199 break;
175 case HttpConn.ON_START: 200 case HttpConn.ON_START:
176 - ifViewAttached(view -> view.showProgress()); 201 + if(getView() != null) getView().showProgress();
  202 +// ifViewAttached(view -> view.showProgress());
177 break; 203 break;
178 case HttpConn.ON_END: 204 case HttpConn.ON_END:
179 - ifViewAttached(view -> view.hideProgress()); 205 + if(getView() != null) getView().hideProgress();
  206 +// ifViewAttached(view -> view.hideProgress());
180 break; 207 break;
181 case 41010: //ๆ‰‹ๆœบๅทๆ— ๆ•ˆ 208 case 41010: //ๆ‰‹ๆœบๅทๆ— ๆ•ˆ
182 ifViewAttached(view -> view.showToast(msg)); 209 ifViewAttached(view -> view.showToast(msg));
@@ -301,5 +328,12 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; { @@ -301,5 +328,12 @@ public class QuickLoginPresenter extends BasePresenter&lt;QuickLoginView&gt; {
301 } 328 }
302 event = null; 329 event = null;
303 } 330 }
  331 +
  332 + if (otherEvent != null) {
  333 + if (!otherEvent.isDisposed()) {
  334 + otherEvent.dispose();
  335 + }
  336 + otherEvent = null;
  337 + }
304 } 338 }
305 } 339 }
cloud/user/src/main/java/com/cnlive/cloud/user/frame/view/LoginDialogView.java
@@ -19,13 +19,13 @@ import com.cnlive.core.libs.base.frame.view.BaseView; @@ -19,13 +19,13 @@ import com.cnlive.core.libs.base.frame.view.BaseView;
19 import com.cnlive.core.libs.base.util.AlertUtil; 19 import com.cnlive.core.libs.base.util.AlertUtil;
20 import com.cnlive.core.libs.base.util.DoublePressed; 20 import com.cnlive.core.libs.base.util.DoublePressed;
21 import com.cnlive.cloud.user.R; 21 import com.cnlive.cloud.user.R;
22 -import com.cnlive.cloud.user.frame.data.OtherUserInfo;  
23 import com.cnlive.cloud.user.sms.OnSmsCatchListener; 22 import com.cnlive.cloud.user.sms.OnSmsCatchListener;
24 import com.cnlive.cloud.user.sms.SmsVerifyCatcher; 23 import com.cnlive.cloud.user.sms.SmsVerifyCatcher;
25 import com.cnlive.cloud.user.ui.activity.FirstLoginActivity; 24 import com.cnlive.cloud.user.ui.activity.FirstLoginActivity;
26 import com.cnlive.cloud.user.ui.activity.LoginActivity; 25 import com.cnlive.cloud.user.ui.activity.LoginActivity;
27 import com.cnlive.cloud.user.ui.activity.LoginDialogActivity; 26 import com.cnlive.cloud.user.ui.activity.LoginDialogActivity;
28 import com.cnlive.cloud.user.util.UserRouterHelper; 27 import com.cnlive.cloud.user.util.UserRouterHelper;
  28 +import com.cnlive.login.model.OtherUserInfo;
29 29
30 import java.util.regex.Matcher; 30 import java.util.regex.Matcher;
31 import java.util.regex.Pattern; 31 import java.util.regex.Pattern;
cloud/user/src/main/java/com/cnlive/cloud/user/frame/view/QuickLoginView.java
@@ -17,7 +17,6 @@ import android.view.View; @@ -17,7 +17,6 @@ import android.view.View;
17 17
18 import com.alibaba.android.arouter.launcher.ARouter; 18 import com.alibaba.android.arouter.launcher.ARouter;
19 import com.cnlive.cloud.user.R; 19 import com.cnlive.cloud.user.R;
20 -import com.cnlive.cloud.user.frame.data.OtherUserInfo;  
21 import com.cnlive.cloud.user.model.LoginSuccessInfo; 20 import com.cnlive.cloud.user.model.LoginSuccessInfo;
22 import com.cnlive.cloud.user.sms.OnSmsCatchListener; 21 import com.cnlive.cloud.user.sms.OnSmsCatchListener;
23 import com.cnlive.cloud.user.sms.SmsVerifyCatcher; 22 import com.cnlive.cloud.user.sms.SmsVerifyCatcher;
@@ -28,6 +27,8 @@ import com.cnlive.core.libs.base.application.AppConfig; @@ -28,6 +27,8 @@ import com.cnlive.core.libs.base.application.AppConfig;
28 import com.cnlive.core.libs.base.frame.view.BaseView; 27 import com.cnlive.core.libs.base.frame.view.BaseView;
29 import com.cnlive.core.libs.base.util.AlertUtil; 28 import com.cnlive.core.libs.base.util.AlertUtil;
30 import com.cnlive.core.libs.base.util.DoublePressed; 29 import com.cnlive.core.libs.base.util.DoublePressed;
  30 +import com.cnlive.login.model.OtherUserInfo;
  31 +
31 import java.util.regex.Matcher; 32 import java.util.regex.Matcher;
32 import java.util.regex.Pattern; 33 import java.util.regex.Pattern;
33 34
cloud/user/src/main/java/com/cnlive/cloud/user/router/user/UserAction.java
@@ -76,6 +76,31 @@ public class UserAction { @@ -76,6 +76,31 @@ public class UserAction {
76 76
77 } 77 }
78 78
  79 +
  80 + public static Disposable otherLogin(Context context, String thirdPartyPlat, String thirdPartyId, CallBack callBack) {
  81 +
  82 + return HttpConn.action(UserUtilAction.otherLogin(context, thirdPartyPlat, thirdPartyId), new NetCallBack<BaseResult<UserData>>() {
  83 + @Override
  84 + public void onRequestState(int state) {
  85 + if (null != callBack) {
  86 + callBack.callback(state, "", null);
  87 + }
  88 + }
  89 +
  90 + @Override
  91 + public void onSuccess(BaseResult<UserData> data) {
  92 + loginAppAction(data, context, "", "", true, callBack);
  93 + }
  94 +
  95 + @Override
  96 + public void onFailure(String errCode, String errMsg, Exception e) {
  97 + if (null != callBack) {
  98 + callBack.callback(Integer.parseInt(errCode), errMsg, null);
  99 + }
  100 + }
  101 + });
  102 + }
  103 +
79 private static Observable<CNLiveUserInfo> loginAppAction(BaseResult<UserData> data, Context context, String userName, String userPassword, boolean otherLogin, CallBack callBack) { 104 private static Observable<CNLiveUserInfo> loginAppAction(BaseResult<UserData> data, Context context, String userName, String userPassword, boolean otherLogin, CallBack callBack) {
80 CNLiveUserInfo userinfo = null; 105 CNLiveUserInfo userinfo = null;
81 if (null == data || null == data.getData()) { 106 if (null == data || null == data.getData()) {
@@ -104,6 +129,32 @@ public class UserAction { @@ -104,6 +129,32 @@ public class UserAction {
104 return Observable.just(userinfo); 129 return Observable.just(userinfo);
105 } 130 }
106 131
  132 +
  133 + public static void otherLoginBindMobile(Context context, String phone, String countryCode, String ems,
  134 + String thirdPartyPlat, String thirdPartyId, String nickName, String gender,
  135 + String location, String faceUrl, CallBack callBack) {
  136 +
  137 + HttpConn.action(UserUtilAction.otherLoginBindMobile(context, phone, countryCode, ems,
  138 + thirdPartyPlat, thirdPartyId, nickName, gender, location, faceUrl), new NetCallBack<BaseResult<UserData>>() {
  139 + @Override
  140 + public void onRequestState(int state) {
  141 + if (null != callBack) {
  142 + callBack.callback(state, "", null);
  143 + }
  144 + }
  145 +
  146 + @Override
  147 + public void onSuccess(BaseResult<UserData> data) {
  148 + loginAppAction(data,context, "", "", true, callBack);
  149 + }
  150 +
  151 + @Override
  152 + public void onFailure(String errCode, String errMsg, Exception e) {
  153 +
  154 + }
  155 + });
  156 + }
  157 +
107 public interface CallBack { 158 public interface CallBack {
108 void callback(int state, String msg, Object object); 159 void callback(int state, String msg, Object object);
109 } 160 }
cloud/user/src/main/java/com/cnlive/cloud/user/ui/activity/LoginDialogActivity.java
@@ -25,6 +25,15 @@ import com.cnlive.cloud.user.frame.view.LoginDialogView; @@ -25,6 +25,15 @@ import com.cnlive.cloud.user.frame.view.LoginDialogView;
25 import com.cnlive.cloud.user.router.user.UserAction; 25 import com.cnlive.cloud.user.router.user.UserAction;
26 import com.cnlive.cloud.user.sms.SmsVerifyCatcher; 26 import com.cnlive.cloud.user.sms.SmsVerifyCatcher;
27 import com.cnlive.cloud.user.ui.adapter.UserListAdapter; 27 import com.cnlive.cloud.user.ui.adapter.UserListAdapter;
  28 +import com.cnlive.login.model.OtherUserInfo;
  29 +import com.cnlive.login.model.ThirdLoginInfo;
  30 +import com.cnlive.login.observer.ThirdLoginObservable;
  31 +import com.cnlive.login.observer.WechatLoginObservable;
  32 +import com.cnlive.login.utils.ThirdLoginUtil;
  33 +import com.cnlive.share.data.WeChatInfo;
  34 +import com.cnlive.share.util.Util;
  35 +
  36 +import java.util.Observable;
28 37
29 import static com.cnlive.cloud.user.ui.activity.LoginActivity.TAG_CLICK_AD; 38 import static com.cnlive.cloud.user.ui.activity.LoginActivity.TAG_CLICK_AD;
30 39
@@ -48,11 +57,11 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial @@ -48,11 +57,11 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial
48 public boolean hasLogin = false;//ๆ˜ฏๅฆๅทฒ็ป็™ปๅฝ• 57 public boolean hasLogin = false;//ๆ˜ฏๅฆๅทฒ็ป็™ปๅฝ•
49 public Uri uri; 58 public Uri uri;
50 public String tagShare; 59 public String tagShare;
51 - //ไธ‰ๆ–น็™ป้™†  
52 - //qq็š„ๆƒ้™  
53 - public final String ACOPE_ALL = "all"; 60 +
54 //ไธ‰ๆ–น็™ป้™†็š„ไฟกๆฏ 61 //ไธ‰ๆ–น็™ป้™†็š„ไฟกๆฏ
  62 + public OtherUserInfo otherUserInfo;
55 public Boolean clickAd; 63 public Boolean clickAd;
  64 +
56 public String tagUrl; 65 public String tagUrl;
57 public ActivityLoginDialogBinding binding; 66 public ActivityLoginDialogBinding binding;
58 public QuickLoginData data; 67 public QuickLoginData data;
@@ -83,7 +92,7 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial @@ -83,7 +92,7 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial
83 p.height = WindowManager.LayoutParams.MATCH_PARENT; 92 p.height = WindowManager.LayoutParams.MATCH_PARENT;
84 p.width = (ScreenUtils.getScreenWidth(this) - dp2px(88)); 93 p.width = (ScreenUtils.getScreenWidth(this) - dp2px(88));
85 getWindow().setAttributes(p); 94 getWindow().setAttributes(p);
86 -// initThreeLogin(); 95 + initThreeLogin();
87 uri = UserAction.getUri(this); 96 uri = UserAction.getUri(this);
88 tagUrl = getIntent().getStringExtra(TAG_URL); 97 tagUrl = getIntent().getStringExtra(TAG_URL);
89 clickAd = getIntent().getBooleanExtra(TAG_CLICK_AD, false); 98 clickAd = getIntent().getBooleanExtra(TAG_CLICK_AD, false);
@@ -108,6 +117,15 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial @@ -108,6 +117,15 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial
108 } 117 }
109 118
110 119
  120 + /**
  121 + * ๅˆๅง‹ๅŒ–็ฌฌไธ‰ๆ–น
  122 + */
  123 + private void initThreeLogin() {
  124 + ThirdLoginUtil.init(this);
  125 + WechatLoginObservable.getInstance().addObserver(this);
  126 + ThirdLoginObservable.getInstance().addObserver(this);
  127 + }
  128 +
111 129
112 @Override 130 @Override
113 public void onStart() { 131 public void onStart() {
@@ -153,8 +171,24 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial @@ -153,8 +171,24 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial
153 // } 171 // }
154 else if (id == R.id.iv_qq) { 172 else if (id == R.id.iv_qq) {
155 if (DoublePressed.onDoublePressed()) return; 173 if (DoublePressed.onDoublePressed()) return;
  174 + if (!ThirdLoginUtil.isQQInstalled(LoginDialogActivity.this) && getMvpView() != null)
  175 + getMvpView().showToast("ๆ‚จๆœชๅฎ‰่ฃ…่ฏฅ็ฌฌไธ‰ๆ–นๅบ”็”จ๏ผŒๆ— ๆณ•่Žทๅ–็”จๆˆทไฟกๆฏ๏ผ");
156 } else if (id == R.id.iv_wb) { 176 } else if (id == R.id.iv_wb) {
157 if (DoublePressed.onDoublePressed()) return; 177 if (DoublePressed.onDoublePressed()) return;
  178 + if (Util.isWeiboInstallAndInit(this)) {
  179 + ThirdLoginUtil.loginWeibo(LoginDialogActivity.this);
  180 + } else {
  181 + if (getMvpView() != null) getMvpView().showToast("ๆ‚จๆœชๅฎ‰่ฃ…่ฏฅ็ฌฌไธ‰ๆ–นๅบ”็”จ๏ผŒๆ— ๆณ•่Žทๅ–็”จๆˆทไฟกๆฏ๏ผ");
  182 + }
  183 + } else if (id == R.id.iv_wc) {
  184 + if (DoublePressed.onDoublePressed()) return;
  185 + if (Util.isWXAppInstalledAndSupported(this)) {
  186 + new Thread(() -> {
  187 + ThirdLoginUtil.loginWechat(LoginDialogActivity.this, AppConfig.getWechatAppid());
  188 + }).start();
  189 + } else {
  190 + if (getMvpView() != null) getMvpView().showToast("ๆ‚จๆœชๅฎ‰่ฃ…่ฏฅ็ฌฌไธ‰ๆ–นๅบ”็”จ๏ผŒๆ— ๆณ•่Žทๅ–็”จๆˆทไฟกๆฏ๏ผ");
  191 + }
158 } else if (id == R.id.iv_close) { 192 } else if (id == R.id.iv_close) {
159 finish(); 193 finish();
160 } 194 }
@@ -190,6 +224,9 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial @@ -190,6 +224,9 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial
190 super.onDestroy(); 224 super.onDestroy();
191 if (getMvpView() != null) getMvpView().hideProgress(); 225 if (getMvpView() != null) getMvpView().hideProgress();
192 if (getPresenter() != null) getPresenter().destroy(); 226 if (getPresenter() != null) getPresenter().destroy();
  227 +
  228 + WechatLoginObservable.getInstance().deleteObserver(this);
  229 + ThirdLoginObservable.getInstance().deleteObserver(this);
193 } 230 }
194 231
195 @Override 232 @Override
@@ -214,6 +251,9 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial @@ -214,6 +251,9 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial
214 } 251 }
215 } 252 }
216 253
  254 + ThirdLoginUtil.getQQResult(requestCode, resultCode, data);
  255 + ThirdLoginUtil.getWeiboResult(requestCode, resultCode, data);
  256 +
217 } 257 }
218 258
219 @Override 259 @Override
@@ -225,6 +265,48 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial @@ -225,6 +265,48 @@ public class LoginDialogActivity extends BaseActivity&lt;LoginDialogView, LoginDial
225 } 265 }
226 } 266 }
227 267
  268 + //ๅพฎไฟก็™ปๅฝ•ๅ›ž่ฐƒๆŽฅๅฃ
  269 + @Override
  270 + public void update(Observable observable, Object o) {
  271 + if (observable instanceof WechatLoginObservable && null != o) {
  272 + WeChatInfo weChatInfo = (WeChatInfo) o;
  273 + if (weChatInfo != null) {
  274 + otherUserInfo = new OtherUserInfo();
  275 + otherUserInfo.setFaceUrl(weChatInfo.getHeadimgurl());
  276 + if ("1".equals(weChatInfo.getSex())) {
  277 + otherUserInfo.setGender("m");
  278 + } else if ("2".equals(weChatInfo.getSex())) {
  279 + otherUserInfo.setGender("f");
  280 + } else {
  281 + otherUserInfo.setGender("n");
  282 + }
  283 +
  284 + otherUserInfo.setNickName(weChatInfo.getNickname());
  285 + if (!TextUtils.isEmpty(weChatInfo.getProvince())) {
  286 + otherUserInfo.setLocation(weChatInfo.getProvince());
  287 + } else {
  288 + otherUserInfo.setLocation(weChatInfo.getCountry());
  289 + }
  290 +
  291 + otherUserInfo.setThirdPartyId(weChatInfo.getUnionid());
  292 + otherUserInfo.setLoginType("3");
  293 + }
  294 + if (otherUserInfo != null && getPresenter() != null)
  295 + getPresenter().otherLogin(this, otherUserInfo);
  296 + } else if (observable instanceof ThirdLoginObservable) {
  297 + ThirdLoginInfo info = (ThirdLoginInfo) o;
  298 + if (info != null) {
  299 + if (info.getType() == 1) {
  300 + if (info.getOtherUserInfo() != null) otherUserInfo = info.getOtherUserInfo();
  301 + getPresenter().otherLogin(this, otherUserInfo);
  302 + } else if (info.getType() == 2) {
  303 + if (getMvpView() != null) getMvpView().showToast(info.getMessage());
  304 + }
  305 + }
  306 +
  307 + }
  308 + }
  309 +
228 @Override 310 @Override
229 public void finish() { 311 public void finish() {
230 super.finish(); 312 super.finish();
cloud/user/src/main/java/com/cnlive/cloud/user/ui/fragment/QuickLoginFragment.java
@@ -11,6 +11,7 @@ import androidx.databinding.ViewDataBinding; @@ -11,6 +11,7 @@ import androidx.databinding.ViewDataBinding;
11 11
12 import com.cnlive.cloud.user.databinding.FragmentQuickLoginBinding; 12 import com.cnlive.cloud.user.databinding.FragmentQuickLoginBinding;
13 import com.cnlive.cloud.user.frame.presenter.QuickLoginPresenter; 13 import com.cnlive.cloud.user.frame.presenter.QuickLoginPresenter;
  14 +import com.cnlive.cloud.user.ui.activity.LoginDialogActivity;
14 import com.cnlive.core.libs.base.application.AppConfig; 15 import com.cnlive.core.libs.base.application.AppConfig;
15 import com.cnlive.core.libs.base.frame.fragment.BaseFragment; 16 import com.cnlive.core.libs.base.frame.fragment.BaseFragment;
16 import com.cnlive.core.libs.base.util.DoublePressed; 17 import com.cnlive.core.libs.base.util.DoublePressed;
@@ -22,6 +23,16 @@ import com.cnlive.cloud.user.sms.SmsVerifyCatcher; @@ -22,6 +23,16 @@ import com.cnlive.cloud.user.sms.SmsVerifyCatcher;
22 import com.cnlive.cloud.user.ui.activity.LoginActivity; 23 import com.cnlive.cloud.user.ui.activity.LoginActivity;
23 import com.cnlive.cloud.user.ui.activity.SelectCountryActivity; 24 import com.cnlive.cloud.user.ui.activity.SelectCountryActivity;
24 import com.cnlive.cloud.user.ui.adapter.UserListAdapter; 25 import com.cnlive.cloud.user.ui.adapter.UserListAdapter;
  26 +import com.cnlive.login.model.OtherUserInfo;
  27 +import com.cnlive.login.model.ThirdLoginInfo;
  28 +import com.cnlive.login.observer.ThirdLoginObservable;
  29 +import com.cnlive.login.observer.WechatLoginObservable;
  30 +import com.cnlive.login.utils.ThirdLoginUtil;
  31 +import com.cnlive.share.BuildConfig;
  32 +import com.cnlive.share.data.WeChatInfo;
  33 +import com.cnlive.share.util.Util;
  34 +
  35 +import java.util.Observable;
25 36
26 /** 37 /**
27 * @author Lynn 38 * @author Lynn
@@ -48,6 +59,10 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP @@ -48,6 +59,10 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP
48 public String tagUrl; 59 public String tagUrl;
49 public static String TAG_URL = "tagurl"; 60 public static String TAG_URL = "tagurl";
50 61
  62 + //ไธ‰ๆ–น็™ป้™†็š„ไฟกๆฏ
  63 + public OtherUserInfo otherUserInfo;
  64 + private boolean needEntranceBtn;
  65 +
51 @Override 66 @Override
52 protected int getBindLayoutId() { 67 protected int getBindLayoutId() {
53 return R.layout.fragment_quick_login; 68 return R.layout.fragment_quick_login;
@@ -100,6 +115,7 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP @@ -100,6 +115,7 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP
100 115
101 @Override 116 @Override
102 protected void initView() { 117 protected void initView() {
  118 + initThreeLogin();
103 adapter = new UserListAdapter(getActivity(), 0); 119 adapter = new UserListAdapter(getActivity(), 0);
104 adapter.setClickListener((name) -> getMvpView().onUploadLoginUser(name)); 120 adapter.setClickListener((name) -> getMvpView().onUploadLoginUser(name));
105 adapter.setDeleteListener((name) -> getMvpView().onDeleteLoginUser(name)); 121 adapter.setDeleteListener((name) -> getMvpView().onDeleteLoginUser(name));
@@ -116,6 +132,16 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP @@ -116,6 +132,16 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP
116 if (getMvpView() != null) getMvpView().initView(); 132 if (getMvpView() != null) getMvpView().initView();
117 } 133 }
118 134
  135 +
  136 + /**
  137 + * ๅˆๅง‹ๅŒ–็ฌฌไธ‰ๆ–น
  138 + */
  139 + private void initThreeLogin() {
  140 + ThirdLoginUtil.init(getActivity());
  141 + WechatLoginObservable.getInstance().addObserver(this);
  142 + ThirdLoginObservable.getInstance().addObserver(this);
  143 + }
  144 +
119 @Override 145 @Override
120 public void onStart() { 146 public void onStart() {
121 super.onStart(); 147 super.onStart();
@@ -158,8 +184,28 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP @@ -158,8 +184,28 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP
158 if (DoublePressed.onDoublePressed()) return; 184 if (DoublePressed.onDoublePressed()) return;
159 SelectCountryActivity.startSelectCountryActivity(getActivity(), 1010, countryCode); 185 SelectCountryActivity.startSelectCountryActivity(getActivity(), 1010, countryCode);
160 186
161 - } else {  
162 - if (getMvpView() != null) getMvpView().showToast("ๆ‚จๆœชๅฎ‰่ฃ…่ฏฅ็ฌฌไธ‰ๆ–นๅบ”็”จ๏ผŒๆ— ๆณ•่Žทๅ–็”จๆˆทไฟกๆฏ๏ผ"); 187 + }else if (id == R.id.iv_qq) {
  188 + if (DoublePressed.onDoublePressed()) return;
  189 + if (!ThirdLoginUtil.isQQInstalled(getActivity()) && getMvpView() != null)
  190 + getMvpView().showToast("ๆ‚จๆœชๅฎ‰่ฃ…่ฏฅ็ฌฌไธ‰ๆ–นๅบ”็”จ๏ผŒๆ— ๆณ•่Žทๅ–็”จๆˆทไฟกๆฏ๏ผ");
  191 + } else if (id == R.id.iv_wb) {
  192 + if (DoublePressed.onDoublePressed()) return;
  193 + if (Util.isWeiboInstallAndInit(getActivity())) {
  194 + ThirdLoginUtil.loginWeibo(getActivity());
  195 + } else {
  196 + if (getMvpView() != null) getMvpView().showToast("ๆ‚จๆœชๅฎ‰่ฃ…่ฏฅ็ฌฌไธ‰ๆ–นๅบ”็”จ๏ผŒๆ— ๆณ•่Žทๅ–็”จๆˆทไฟกๆฏ๏ผ");
  197 + }
  198 + } else if (id == R.id.iv_wc) {
  199 + if (DoublePressed.onDoublePressed()) return;
  200 + if (Util.isWXAppInstalledAndSupported(getActivity())) {
  201 + new Thread(() -> {
  202 + ThirdLoginUtil.loginWechat(getActivity(), AppConfig.getWechatAppid());
  203 + }).start();
  204 + } else {
  205 + if (getMvpView() != null) getMvpView().showToast("ๆ‚จๆœชๅฎ‰่ฃ…่ฏฅ็ฌฌไธ‰ๆ–นๅบ”็”จ๏ผŒๆ— ๆณ•่Žทๅ–็”จๆˆทไฟกๆฏ๏ผ");
  206 + }
  207 + } else if (id == R.id.iv_close) {
  208 + getActivity().finish();
163 } 209 }
164 } 210 }
165 211
@@ -193,6 +239,8 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP @@ -193,6 +239,8 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP
193 super.onDestroy(); 239 super.onDestroy();
194 if (getMvpView() != null) getMvpView().hideProgress(); 240 if (getMvpView() != null) getMvpView().hideProgress();
195 if (getPresenter() != null) getPresenter().destroy(); 241 if (getPresenter() != null) getPresenter().destroy();
  242 + WechatLoginObservable.getInstance().deleteObserver(this);
  243 + ThirdLoginObservable.getInstance().deleteObserver(this);
196 } 244 }
197 245
198 @Override 246 @Override
@@ -216,6 +264,9 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP @@ -216,6 +264,9 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP
216 return; 264 return;
217 } 265 }
218 } 266 }
  267 +
  268 + ThirdLoginUtil.getQQResult(requestCode, resultCode, data);
  269 + ThirdLoginUtil.getWeiboResult(requestCode, resultCode, data);
219 } 270 }
220 271
221 @Override 272 @Override
@@ -227,5 +278,46 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP @@ -227,5 +278,46 @@ public class QuickLoginFragment extends BaseFragment&lt;QuickLoginView, QuickLoginP
227 } 278 }
228 } 279 }
229 280
  281 + //ๅพฎไฟก็™ปๅฝ•ๅ›ž่ฐƒๆŽฅๅฃ
  282 + @Override
  283 + public void update(Observable observable, Object o) {
  284 + if (observable instanceof WechatLoginObservable && null != o) {
  285 + WeChatInfo weChatInfo = (WeChatInfo) o;
  286 + if (weChatInfo != null) {
  287 + otherUserInfo = new OtherUserInfo();
  288 + otherUserInfo.setFaceUrl(weChatInfo.getHeadimgurl());
  289 + if ("1".equals(weChatInfo.getSex())) {
  290 + otherUserInfo.setGender("m");
  291 + } else if ("2".equals(weChatInfo.getSex())) {
  292 + otherUserInfo.setGender("f");
  293 + } else {
  294 + otherUserInfo.setGender("n");
  295 + }
  296 +
  297 + otherUserInfo.setNickName(weChatInfo.getNickname());
  298 + if (!TextUtils.isEmpty(weChatInfo.getProvince())) {
  299 + otherUserInfo.setLocation(weChatInfo.getProvince());
  300 + } else {
  301 + otherUserInfo.setLocation(weChatInfo.getCountry());
  302 + }
  303 +
  304 + otherUserInfo.setThirdPartyId(weChatInfo.getUnionid());
  305 + otherUserInfo.setLoginType("3");
  306 + }
  307 + if (otherUserInfo != null && getPresenter() != null)
  308 + getPresenter().otherLogin(this, otherUserInfo);
  309 + } else if (observable instanceof ThirdLoginObservable) {
  310 + ThirdLoginInfo info = (ThirdLoginInfo) o;
  311 + if (info != null) {
  312 + if (info.getType() == 1) {
  313 + if (info.getOtherUserInfo() != null) otherUserInfo = info.getOtherUserInfo();
  314 + getPresenter().otherLogin(this, otherUserInfo);
  315 + } else if (info.getType() == 2) {
  316 + if (getMvpView() != null) getMvpView().showToast(info.getMessage());
  317 + }
  318 + }
  319 +
  320 + }
  321 + }
230 322
231 } 323 }
core/base/src/main/java/com/hannesdorfmann/mosby3/mvp/MvpBasePresenter.java
@@ -163,7 +163,7 @@ public class MvpBasePresenter&lt;V extends MvpView&gt; implements MvpPresenter&lt;V&gt; { @@ -163,7 +163,7 @@ public class MvpBasePresenter&lt;V extends MvpView&gt; implements MvpPresenter&lt;V&gt; {
163 * {@inheritDoc} 163 * {@inheritDoc}
164 */ 164 */
165 public void destroy() { 165 public void destroy() {
166 - detachView(false); 166 +// detachView(false);
167 presenterDestroyed = true; 167 presenterDestroyed = true;
168 } 168 }
169 } 169 }
core/database/.gitignore 0 โ†’ 100644
  1 +/build
core/database/build.gradle 0 โ†’ 100644
  1 +apply plugin: 'com.android.library'
  2 +apply plugin: 'org.greenrobot.greendao'
  3 +
  4 +android {
  5 +// compileSdkVersion 29
  6 +// buildToolsVersion "29.0.2"
  7 +//
  8 +//
  9 +// defaultConfig {
  10 +// minSdkVersion 16
  11 +// targetSdkVersion 29
  12 +// versionCode 1
  13 +// versionName "1.0"
  14 +//
  15 +// testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  16 +// consumerProguardFiles 'consumer-rules.pro'
  17 +// }
  18 +//
  19 +// buildTypes {
  20 +// release {
  21 +// minifyEnabled false
  22 +// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  23 +// }
  24 +// }
  25 +
  26 +}
  27 +
  28 +greendao {
  29 + schemaVersion 1 //ๆ•ฐๆฎๅบ“็‰ˆๆœฌๅท
  30 + daoPackage 'com.cnlive.database.dao'
  31 + targetGenDir 'src/main/java'
  32 + generateTests false //่ฎพ็ฝฎไธบtrueไปฅ่‡ชๅŠจ็”Ÿๆˆๅ•ๅ…ƒๆต‹่ฏ•ใ€‚
  33 + targetGenDirTests 'src/main/java'
  34 +}
  35 +
  36 +dependencies {
  37 + implementation fileTree(dir: 'libs', include: ['*.jar'])
  38 +
  39 + //ๆ•ฐๆฎๅบ“ๅŠ ๅฏ†
  40 + implementation 'net.zetetic:android-database-sqlcipher:3.5.6'
  41 +}
core/database/consumer-rules.pro 0 โ†’ 100644
core/database/proguard-rules.pro 0 โ†’ 100644
  1 +# Add project specific ProGuard rules here.
  2 +# You can control the set of applied configuration files using the
  3 +# proguardFiles setting in build.gradle.
  4 +#
  5 +# For more details, see
  6 +# http://developer.android.com/guide/developing/tools/proguard.html
  7 +
  8 +# If your project uses WebView with JS, uncomment the following
  9 +# and specify the fully qualified class name to the JavaScript interface
  10 +# class:
  11 +#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
  12 +# public *;
  13 +#}
  14 +
  15 +# Uncomment this to preserve the line number information for
  16 +# debugging stack traces.
  17 +#-keepattributes SourceFile,LineNumberTable
  18 +
  19 +# If you keep the line number information, uncomment this to
  20 +# hide the original source file name.
  21 +#-renamesourcefileattribute SourceFile
core/database/src/androidTest/java/com/cnlive/database/ExampleInstrumentedTest.java 0 โ†’ 100644
  1 +package com.cnlive.database;
  2 +
  3 +import android.content.Context;
  4 +
  5 +import androidx.test.platform.app.InstrumentationRegistry;
  6 +import androidx.test.ext.junit.runners.AndroidJUnit4;
  7 +
  8 +import org.junit.Test;
  9 +import org.junit.runner.RunWith;
  10 +
  11 +import static org.junit.Assert.*;
  12 +
  13 +/**
  14 + * Instrumented test, which will execute on an Android device.
  15 + *
  16 + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
  17 + */
  18 +@RunWith(AndroidJUnit4.class)
  19 +public class ExampleInstrumentedTest {
  20 + @Test
  21 + public void useAppContext() {
  22 + // Context of the app under test.
  23 + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
  24 +
  25 + assertEquals("com.cnlive.database.test", appContext.getPackageName());
  26 + }
  27 +}
core/database/src/main/AndroidManifest.xml 0 โ†’ 100644
  1 +<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  2 + package="com.cnlive.database" />
core/database/src/main/java/com/cnlive/database/api/AudioDownAPI.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +import android.os.Build;
  5 +import android.os.Environment;
  6 +
  7 +import com.alibaba.android.arouter.launcher.ARouter;
  8 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
  9 +import com.cnlive.database.bean.DownloadInfo;
  10 +import com.cnlive.database.dao.DownloadInfoDao;
  11 +import com.cnlive.database.dbUtil.DaoHelper;
  12 +
  13 +import java.io.File;
  14 +import java.util.List;
  15 +
  16 +/**
  17 + * Created by hanyayun on 2019/05/13.
  18 + */
  19 +public class AudioDownAPI {
  20 +
  21 + /**
  22 + * ไธ‹่ฝฝๅฎŒๆˆๅนถไธ”ๆœฌๅœฐๆ˜ฏๅญ˜ๅœจ
  23 + * @param activityId
  24 + * @param context
  25 + * @return
  26 + */
  27 + public static String isDown(String activityId, Context context){
  28 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  29 + String userId = service.getUid(context);
  30 + List<DownloadInfo> downloadInfos = DaoHelper.getInstance(context).getDownloadInfoDao().queryBuilder().where(DownloadInfoDao.Properties.UrlId.eq(activityId)).list();
  31 + if(downloadInfos != null && downloadInfos.size() > 0 && downloadInfos.get(0).getDownloadStatus() != null &&
  32 + downloadInfos.get(0).getDownloadStatus().equals("over") && new File((Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q ?context.getExternalFilesDir(""):Environment.getExternalStorageDirectory()) + "/strike/voice/" + userId+"/"+downloadInfos.get(0).getFileName()).exists()) {
  33 + return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q ?context.getExternalFilesDir(""):Environment.getExternalStorageDirectory().getAbsolutePath()) + "/strike/voice/" + userId+"/"+downloadInfos.get(0).getFileName();
  34 + }
  35 + return null;
  36 + }
  37 +}
core/database/src/main/java/com/cnlive/database/api/DBFriendCircleDetailAPI.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +
  5 +
  6 +import com.cnlive.database.bean.DBMomentDetail;
  7 +import com.cnlive.database.bean.DBMomentItem;
  8 +import com.cnlive.database.dao.DBMomentDetailDao;
  9 +import com.cnlive.database.dao.DBMomentItemDao;
  10 +import com.cnlive.database.dbUtil.DaoHelper;
  11 +
  12 +import org.greenrobot.greendao.query.WhereCondition;
  13 +
  14 +import java.util.List;
  15 +
  16 +
  17 +public class DBFriendCircleDetailAPI {
  18 + public static void insertData(Context context, List<DBMomentItem> dbMomentItems) {
  19 + if (dbMomentItems == null) return;
  20 + DaoHelper.getInstance(context).getDBMomentItemDao().insertInTx(dbMomentItems);
  21 + }
  22 +
  23 +
  24 + public static long insertData(Context context, DBMomentDetail momentDetail) {
  25 + if (momentDetail == null) return -1;
  26 + return DaoHelper.getInstance(context).getDBMomentDetailDao().insertOrReplace(momentDetail);
  27 + }
  28 +
  29 + public static void removeData(Context context, int type, String sid) {
  30 + WhereCondition sidWC = DBMomentDetailDao.Properties.Sid.eq(sid + "_" + type);
  31 + WhereCondition typeWC = DBMomentDetailDao.Properties.Type.eq(type);
  32 +
  33 + DBMomentItemDao itemDao = DaoHelper.getInstance(context).getDBMomentItemDao();
  34 + DBMomentDetailDao detailDao = DaoHelper.getInstance(context).getDBMomentDetailDao();
  35 +
  36 + DBMomentDetail oldData = detailDao.queryBuilder().where(sidWC, typeWC).unique();
  37 + if (oldData != null && oldData.getMomentItems() != null)
  38 + itemDao.deleteInTx(oldData.getMomentItems());
  39 + }
  40 +
  41 + public static DBMomentDetail loadData(Context context, int type, String sid) {
  42 + DBMomentDetailDao dao = DaoHelper.getInstance(context).getDBMomentDetailDao();
  43 + DBMomentDetail data = dao.queryBuilder()
  44 + .where(DBMomentDetailDao.Properties.Sid.eq(sid + "_" + type), DBMomentDetailDao.Properties.Type.eq(type))
  45 + .unique();
  46 +
  47 + return data != null ? data : new DBMomentDetail();
  48 + }
  49 +
  50 + public static void deleteMomentItem(Context context, String momentId) {
  51 + DBMomentItemDao dao = DaoHelper.getInstance(context).getDBMomentItemDao();
  52 + dao.deleteInTx(dao.queryBuilder().where(DBMomentItemDao.Properties.ItemId.eq(momentId)).list());
  53 + }
  54 +
  55 +}
core/database/src/main/java/com/cnlive/database/api/DBFriendCircleMessageAPI.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +
  5 +import com.alibaba.android.arouter.launcher.ARouter;
  6 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
  7 +import com.cnlive.database.bean.DBFriendCircleMessage;
  8 +import com.cnlive.database.dao.DBFriendCircleMessageDao;
  9 +import com.cnlive.database.dbUtil.DaoHelper;
  10 +
  11 +import java.util.Collections;
  12 +import java.util.List;
  13 +
  14 +public class DBFriendCircleMessageAPI {
  15 +
  16 + /**
  17 + * ๆทปๅŠ ๆ–ฐๆถˆๆฏ่‡ณๆ•ฐๆฎๅบ“
  18 + *
  19 + * @return
  20 + */
  21 + public static void insertData(Context context, List<DBFriendCircleMessage> items) {
  22 + if (items == null || items.size() == 0) return;
  23 + DBFriendCircleMessageDao dao = DaoHelper.getInstance(context).getFriendCircleMessageDao();
  24 + dao.insertOrReplaceInTx(items);
  25 + }
  26 +
  27 + /**
  28 + * ่ฏปๅ–ๅކๅฒๆ–ฐๆถˆๆฏ
  29 + *
  30 + * @return
  31 + */
  32 + public static List<DBFriendCircleMessage> loadData(Context context) {
  33 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  34 + String sid = service.getUid(context);
  35 + DBFriendCircleMessageDao dao = DaoHelper.getInstance(context).getFriendCircleMessageDao();
  36 + List<DBFriendCircleMessage> list = dao.queryBuilder().where(DBFriendCircleMessageDao.Properties.Sid.eq(sid)).list();
  37 + Collections.reverse(list);
  38 + return list;
  39 + }
  40 +
  41 + /**
  42 + * ๆธ…็ฉบๆ–ฐๆถˆๆฏๆ•ฐๆฎ
  43 + *
  44 + * @return
  45 + */
  46 + public static void cleanData(Context context) {
  47 + DBFriendCircleMessageDao dao = DaoHelper.getInstance(context).getFriendCircleMessageDao();
  48 + dao.deleteAll();
  49 + }
  50 +
  51 +}
core/database/src/main/java/com/cnlive/database/api/DBWitnessDetailAPI.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +
  5 +import com.cnlive.database.bean.Witness;
  6 +import com.cnlive.database.dao.WitnessDao;
  7 +import com.cnlive.database.dbUtil.DaoHelper;
  8 +
  9 +import org.greenrobot.greendao.query.WhereCondition;
  10 +
  11 +import java.util.Collections;
  12 +import java.util.List;
  13 +
  14 +
  15 +public class DBWitnessDetailAPI {
  16 +
  17 +
  18 + public static long insertData(Context context, Witness momentDetail) {
  19 + if (momentDetail == null) return -1;
  20 + long insert = DaoHelper.getInstance(context).getWitnessDao().insert(momentDetail);
  21 + return insert;
  22 +
  23 + }
  24 +
  25 + public static void removeData(Context context, String id) {
  26 + WhereCondition mediasWC = WitnessDao.Properties.Id.eq(id);
  27 +
  28 + WitnessDao itemDao = DaoHelper.getInstance(context).getWitnessDao();
  29 +
  30 + Witness oldData = itemDao.queryBuilder().where(mediasWC).unique();
  31 + if (oldData != null)
  32 + itemDao.deleteInTx(oldData);
  33 + }
  34 +
  35 + public static List<Witness> loadData(Context context) {
  36 + WitnessDao dao = DaoHelper.getInstance(context).getWitnessDao();
  37 + List<Witness> list = dao.queryBuilder().list();
  38 + Collections.reverse(list);
  39 + return list;
  40 + }
  41 +
  42 +
  43 + public static void deleteWitnessItem(Context context, String time) {
  44 + WitnessDao dao = DaoHelper.getInstance(context).getWitnessDao();
  45 + dao.deleteInTx(dao.queryBuilder().where(WitnessDao.Properties.TimeStamp.eq(time)).unique());
  46 + }
  47 +
  48 +
  49 + public static void update(Context context, String time, Witness up) {
  50 + WitnessDao dao = DaoHelper.getInstance(context).getWitnessDao();
  51 + Witness load = dao.load(time);
  52 + load.setId(up.getId());
  53 + load.setSid(up.getSid());
  54 + load.setMedias(up.getMedias());
  55 + load.setTitle(up.getTitle());
  56 + load.setWit(up.getWit());
  57 + load.setType(up.getType());
  58 + load.setVideotype(up.getVideotype());
  59 + load.setGopath(up.getGopath());
  60 + load.setMultiplecategory(up.getMultiplecategory());
  61 + load.setTag(up.getTag());
  62 + load.setTimeStamp(time);
  63 + load.setDutation(up.getDutation());
  64 + load.setSrc(up.getSrc());
  65 + dao.updateInTx(load);
  66 + }
  67 +
  68 +}
core/database/src/main/java/com/cnlive/database/api/DarenDetailAPI.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +import android.util.Log;
  5 +
  6 +import com.cnlive.database.bean.DarenDetailMsg;
  7 +import com.cnlive.database.dao.DarenDetailMsgDao;
  8 +import com.cnlive.database.dbUtil.DaoHelper;
  9 +
  10 +/**
  11 + * Created by Lynn on 2018/7/21.
  12 + */
  13 +
  14 +public class DarenDetailAPI {
  15 + /**
  16 + * ๆ’ๅ…ฅ่พพไบบ่ฏฆๆƒ…
  17 + */
  18 + public static long insertData(Context context, DarenDetailMsg data) {
  19 + if (data == null) return -1;
  20 + DarenDetailMsgDao dao = DaoHelper.getInstance(context).getDarenDetailDao();
  21 + removeItem(context, data.getSid(), data.getDarenId());
  22 + Log.e("LynnTest", "end : " + System.currentTimeMillis());
  23 + return dao.insertOrReplace(data);
  24 + }
  25 +
  26 + /**
  27 + * @param context
  28 + * @param sid
  29 + * @param darenId
  30 + * @return
  31 + */
  32 + public static DarenDetailMsg loadData(Context context, String sid, String darenId) {
  33 + DarenDetailMsgDao dao = DaoHelper.getInstance(context).getDarenDetailDao();
  34 + return dao.queryBuilder()
  35 + .where(DarenDetailMsgDao.Properties.DarenId.eq(darenId), DarenDetailMsgDao.Properties.Sid.eq(sid)).unique();
  36 + }
  37 +
  38 + public static void clean(Context context) {
  39 + DarenDetailMsgDao darenDetailMsgDao = DaoHelper.getInstance(context).getDarenDetailDao();
  40 + darenDetailMsgDao.deleteAll();
  41 + }
  42 +
  43 + public static void removeItem(Context context, String sid, String darenId) {
  44 + DarenDetailMsgDao darenDetailMsgDao = DaoHelper.getInstance(context).getDarenDetailDao();
  45 + DarenDetailMsg darenDetailMsg = loadData(context, sid, darenId);
  46 + if (darenDetailMsg != null) darenDetailMsgDao.delete(darenDetailMsg);
  47 + }
  48 +
  49 + /**
  50 + * ๆ›ดๆ–ฐ่พพไบบๆ˜ฏๅฆ่ขซๅ…ณๆณจ
  51 + *
  52 + * @param context
  53 + * @param sid
  54 + * @param darenId
  55 + * @param fans
  56 + */
  57 + public static void updateDarenState(Context context, String sid, String darenId, boolean fans) {
  58 + Log.e("LynnTest", "start : " + System.currentTimeMillis());
  59 + DarenDetailMsg detailMsg = loadData(context, sid, darenId);
  60 + if (detailMsg == null)
  61 + return;
  62 + detailMsg.setFan(fans);
  63 + insertData(context, detailMsg);
  64 + }
  65 +}
core/database/src/main/java/com/cnlive/database/api/ExceptionInfoAPI.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +
  5 +import com.cnlive.database.bean.ExceptionInfo;
  6 +import com.cnlive.database.dao.ExceptionInfoDao;
  7 +import com.cnlive.database.dbUtil.DaoHelper;
  8 +
  9 +import java.util.List;
  10 +
  11 +/**
  12 + * Created by xiansong on 2017/12/22.
  13 + */
  14 +
  15 +public class ExceptionInfoAPI {
  16 +
  17 + /**
  18 + * ่Žทๅ–ๅผ‚ๅธธๆ—ฅๅฟ—ๅˆ—่กจ
  19 + *
  20 + * @param context
  21 + * @return
  22 + */
  23 + public static List<ExceptionInfo> getList(Context context, String userId) {
  24 + ExceptionInfoDao dao = DaoHelper.getInstance(context).getExceptionInfoDao();
  25 + return dao.loadAll();
  26 + }
  27 +
  28 + /**
  29 + * ๆ’ๅ…ฅๅผ‚ๅธธๆ—ฅๅฟ—
  30 + *
  31 + * @param context
  32 + * @param info
  33 + */
  34 + public static void insertItem(Context context, ExceptionInfo info) {
  35 + ExceptionInfoDao dao = DaoHelper.getInstance(context).getExceptionInfoDao();
  36 + dao.insert(info);
  37 + }
  38 +
  39 +}
core/database/src/main/java/com/cnlive/database/api/NewNumberApi.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +
  5 +import com.cnlive.database.bean.NewsNumber;
  6 +import com.cnlive.database.dao.NewsNumberDao;
  7 +import com.cnlive.database.dbUtil.DaoHelper;
  8 +
  9 +import java.util.List;
  10 +
  11 +/**
  12 + * Created by Lynn on 2019/8/9.
  13 + */
  14 +public class NewNumberApi {
  15 + public static long insertData(Context context, NewsNumber newsNumber) {
  16 + if (newsNumber == null) {
  17 + return -1;
  18 + }
  19 +
  20 + NewsNumberDao dao = DaoHelper.getInstance(context).getNewsNumberDao();
  21 + if (loadData(context, newsNumber.getTs()) != null) {
  22 + return -1;
  23 + }
  24 + return dao.insertOrReplace(newsNumber);
  25 +
  26 + }
  27 +
  28 + public static List<NewsNumber> loadDatas(Context context, long ts, int limit, int pageNo) {
  29 + NewsNumberDao dao = DaoHelper.getInstance(context).getNewsNumberDao();
  30 + if (ts == -1) {
  31 + return dao.queryBuilder().orderDesc(NewsNumberDao.Properties.Ts).limit(limit).offset(pageNo * limit).list();
  32 + } else {
  33 + return dao.queryBuilder().orderDesc(NewsNumberDao.Properties.Ts).where(NewsNumberDao.Properties.Ts.lt(ts)).limit(limit).offset(pageNo * limit).list();
  34 + }
  35 + }
  36 +
  37 + public static long loadCount(Context context, long ts) {
  38 + NewsNumberDao dao = DaoHelper.getInstance(context).getNewsNumberDao();
  39 + if (ts == -1) {
  40 + return dao.queryBuilder().count();
  41 + }
  42 + return dao.queryBuilder().where(NewsNumberDao.Properties.Ts.le(ts)).count();
  43 + }
  44 +
  45 + public static NewsNumber loadData(Context context, String ts) {
  46 + NewsNumberDao dao = DaoHelper.getInstance(context).getNewsNumberDao();
  47 + return dao.queryBuilder().where(NewsNumberDao.Properties.Ts.eq(ts)).unique();
  48 + }
  49 +
  50 + /**
  51 + * ่Žทๅ–ๆœ€ๆ–ฐไธ€ๆกๆ•ฐๆฎ็š„ๆ—ถ้—ดๆˆณ
  52 + *
  53 + * @param userId
  54 + * @return
  55 + */
  56 + public static String loadNewestData(Context context, String userId) {
  57 + NewsNumberDao dao = DaoHelper.getInstance(context).getNewsNumberDao();
  58 + return dao.queryBuilder().orderDesc(NewsNumberDao.Properties.Ts).list().get(0).getTs();
  59 + }
  60 +}
core/database/src/main/java/com/cnlive/database/api/SearchContentAPI.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +
  5 +import com.alibaba.android.arouter.launcher.ARouter;
  6 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
  7 +import com.cnlive.database.bean.SearchContent;
  8 +import com.cnlive.database.dao.SearchContentDao;
  9 +import com.cnlive.database.dbUtil.DaoHelper;
  10 +
  11 +import java.util.ArrayList;
  12 +import java.util.Collections;
  13 +import java.util.List;
  14 +
  15 +
  16 +public class SearchContentAPI {
  17 +
  18 + public static boolean insertData(Context context, String history) {
  19 + SearchContentDao dao = DaoHelper.getInstance(context).getSearchContentDao();
  20 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  21 + String sid = service.getUid(context);
  22 + List<String> searchStrings = new ArrayList<>();
  23 + for (SearchContent item : loadData(context)) {
  24 + searchStrings.add(item.getContent());
  25 + }
  26 + SearchContent searchHistory = new SearchContent();
  27 + searchHistory.setContent(history);
  28 + searchHistory.setSid(sid);
  29 + if (!searchStrings.contains(history)) {
  30 + dao.insert(searchHistory);
  31 + return true;
  32 + } else {
  33 + dao.delete(dao.queryBuilder().where(SearchContentDao.Properties.Content.eq(history)).unique());
  34 + dao.insert(searchHistory);
  35 + }
  36 + return false;
  37 + }
  38 +
  39 +
  40 + public static List<SearchContent> loadData(Context context) {
  41 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  42 + String sid = service.getUid(context);
  43 + SearchContentDao dao = DaoHelper.getInstance(context).getSearchContentDao();
  44 + List<SearchContent> list = dao.queryBuilder().where(SearchContentDao.Properties.Sid.eq(sid)).list();
  45 + Collections.reverse(list);
  46 + return list;
  47 + }
  48 +
  49 +
  50 + public static void cleanData(Context context) {
  51 + SearchContentDao dao = DaoHelper.getInstance(context).getSearchContentDao();
  52 + dao.deleteAll();
  53 + }
  54 +}
core/database/src/main/java/com/cnlive/database/api/SearchHistoryAPI.java 0 โ†’ 100644
  1 +package com.cnlive.database.api;
  2 +
  3 +import android.content.Context;
  4 +
  5 +import com.alibaba.android.arouter.launcher.ARouter;
  6 +import com.cnlive.core.libs.base.arouter.user.CNLiveUserService;
  7 +import com.cnlive.database.bean.SearchHistory;
  8 +import com.cnlive.database.dao.SearchHistoryDao;
  9 +import com.cnlive.database.dbUtil.DaoHelper;
  10 +
  11 +import java.util.ArrayList;
  12 +import java.util.Collections;
  13 +import java.util.List;
  14 +
  15 +/**
  16 + * Created by cnlive201803 on 2018/5/30.
  17 + */
  18 +
  19 +public class SearchHistoryAPI {
  20 + /**
  21 + * ๆ’ๅ…ฅๆœ็ดขๅކๅฒ
  22 + *
  23 + * @param context
  24 + * @param history
  25 + */
  26 + public static boolean insertData(Context context, String history) {
  27 + SearchHistoryDao dao = DaoHelper.getInstance(context).getSearchHistoryDao();
  28 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  29 + String sid = service.getUid(context);
  30 + List<String> searchStrings = new ArrayList<>();
  31 + for (SearchHistory item : loadData(context)) {
  32 + searchStrings.add(item.getHistory());
  33 + }
  34 + SearchHistory searchHistory = new SearchHistory();
  35 + searchHistory.setHistory(history);
  36 + searchHistory.setSid(sid);
  37 + if (!searchStrings.contains(history)) {
  38 + dao.insert(searchHistory);
  39 + return true;
  40 + } else {
  41 + dao.delete(dao.queryBuilder().where(SearchHistoryDao.Properties.History.eq(history)).unique());
  42 + dao.insert(searchHistory);
  43 + }
  44 + return false;
  45 + }
  46 +
  47 + /**
  48 + * ่ฏปๅ–ๆœ็ดขๅކๅฒ
  49 + *
  50 + * @param context
  51 + * @return
  52 + */
  53 + public static List<SearchHistory> loadData(Context context) {
  54 + CNLiveUserService service = (CNLiveUserService) ARouter.getInstance().navigation(CNLiveUserService.class);
  55 + String sid = service.getUid(context);
  56 + SearchHistoryDao dao = DaoHelper.getInstance(context).getSearchHistoryDao();
  57 + List<SearchHistory> list = dao.queryBuilder().where(SearchHistoryDao.Properties.Sid.eq(sid)).list();
  58 + Collections.reverse(list);
  59 + return list;
  60 + }
  61 +
  62 + /**
  63 + * ๆƒ…ๅ†ตๆœ็ดขๅކๅฒ
  64 + *
  65 + * @param context
  66 + */
  67 + public static void cleanData(Context context) {
  68 + SearchHistoryDao dao = DaoHelper.getInstance(context).getSearchHistoryDao();
  69 + dao.deleteAll();
  70 + }
  71 +}
core/database/src/main/java/com/cnlive/database/bean/AudioPlayHistoricalRecord.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +
  7 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  8 +
  9 +// KEEP INCLUDES - put your custom includes here
  10 +// KEEP INCLUDES END
  11 +
  12 +/**
  13 + * Entity mapped to table "AUDIO_PLAY_HISTORICAL_RECORD".
  14 + */
  15 +@Entity
  16 +public class AudioPlayHistoricalRecord {
  17 +
  18 + @Id
  19 + private long contentId;
  20 + private String activeId;
  21 + private String aid;
  22 + private Long time;
  23 +
  24 + // KEEP FIELDS - put your custom fields here
  25 + // KEEP FIELDS END
  26 +
  27 + @Generated(hash = 40652824)
  28 + public AudioPlayHistoricalRecord() {
  29 + }
  30 +
  31 + public AudioPlayHistoricalRecord(long contentId) {
  32 + this.contentId = contentId;
  33 + }
  34 +
  35 + @Generated(hash = 2071813412)
  36 + public AudioPlayHistoricalRecord(long contentId, String activeId, String aid, Long time) {
  37 + this.contentId = contentId;
  38 + this.activeId = activeId;
  39 + this.aid = aid;
  40 + this.time = time;
  41 + }
  42 +
  43 + public long getContentId() {
  44 + return contentId;
  45 + }
  46 +
  47 + public void setContentId(long contentId) {
  48 + this.contentId = contentId;
  49 + }
  50 +
  51 + public String getActiveId() {
  52 + return activeId;
  53 + }
  54 +
  55 + public void setActiveId(String activeId) {
  56 + this.activeId = activeId;
  57 + }
  58 +
  59 + public String getAid() {
  60 + return aid;
  61 + }
  62 +
  63 + public void setAid(String aid) {
  64 + this.aid = aid;
  65 + }
  66 +
  67 + public Long getTime() {
  68 + return time;
  69 + }
  70 +
  71 + public void setTime(Long time) {
  72 + this.time = time;
  73 + }
  74 +
  75 + // KEEP METHODS - put your custom methods here
  76 + // KEEP METHODS END
  77 +
  78 +}
core/database/src/main/java/com/cnlive/database/bean/AudioPlayLastInfo.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "AUDIO_PLAY_LAST_INFO".
  15 + */
  16 +@Entity
  17 +public class AudioPlayLastInfo {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String sid;
  22 + private String activityId;
  23 + private String cmccId;
  24 + private String aid;
  25 + private String poster;
  26 + private String shareUrl;
  27 + private String contentId;
  28 + private String actor;
  29 + private String title;
  30 + private String channelName;
  31 + private String albumName;
  32 + private Double schedule;
  33 + private Integer counts;
  34 + private Boolean playState;
  35 + private String productId;
  36 + private String productType;
  37 + private String aProductId;
  38 + private String aProductType;
  39 + private Boolean isPayAlbum;
  40 + private Boolean isPayItem;
  41 + private String siteId;
  42 +
  43 + // KEEP FIELDS - put your custom fields here
  44 + // KEEP FIELDS END
  45 +
  46 + @Generated(hash = 1438086698)
  47 + public AudioPlayLastInfo() {
  48 + }
  49 +
  50 + public AudioPlayLastInfo(String sid) {
  51 + this.sid = sid;
  52 + }
  53 +
  54 + @Generated(hash = 927843729)
  55 + public AudioPlayLastInfo(@NotNull String sid, String activityId, String cmccId, String aid, String poster, String shareUrl, String contentId, String actor, String title, String channelName, String albumName, Double schedule, Integer counts, Boolean playState, String productId, String productType, String aProductId, String aProductType, Boolean isPayAlbum, Boolean isPayItem,
  56 + String siteId) {
  57 + this.sid = sid;
  58 + this.activityId = activityId;
  59 + this.cmccId = cmccId;
  60 + this.aid = aid;
  61 + this.poster = poster;
  62 + this.shareUrl = shareUrl;
  63 + this.contentId = contentId;
  64 + this.actor = actor;
  65 + this.title = title;
  66 + this.channelName = channelName;
  67 + this.albumName = albumName;
  68 + this.schedule = schedule;
  69 + this.counts = counts;
  70 + this.playState = playState;
  71 + this.productId = productId;
  72 + this.productType = productType;
  73 + this.aProductId = aProductId;
  74 + this.aProductType = aProductType;
  75 + this.isPayAlbum = isPayAlbum;
  76 + this.isPayItem = isPayItem;
  77 + this.siteId = siteId;
  78 + }
  79 +
  80 + @NotNull
  81 + public String getSid() {
  82 + return sid;
  83 + }
  84 +
  85 + /** Not-null value; ensure this value is available before it is saved to the database. */
  86 + public void setSid(@NotNull String sid) {
  87 + this.sid = sid;
  88 + }
  89 +
  90 + public String getActivityId() {
  91 + return activityId;
  92 + }
  93 +
  94 + public void setActivityId(String activityId) {
  95 + this.activityId = activityId;
  96 + }
  97 +
  98 + public String getCmccId() {
  99 + return cmccId;
  100 + }
  101 +
  102 + public void setCmccId(String cmccId) {
  103 + this.cmccId = cmccId;
  104 + }
  105 +
  106 + public String getAid() {
  107 + return aid;
  108 + }
  109 +
  110 + public void setAid(String aid) {
  111 + this.aid = aid;
  112 + }
  113 +
  114 + public String getPoster() {
  115 + return poster;
  116 + }
  117 +
  118 + public void setPoster(String poster) {
  119 + this.poster = poster;
  120 + }
  121 +
  122 + public String getShareUrl() {
  123 + return shareUrl;
  124 + }
  125 +
  126 + public void setShareUrl(String shareUrl) {
  127 + this.shareUrl = shareUrl;
  128 + }
  129 +
  130 + public String getContentId() {
  131 + return contentId;
  132 + }
  133 +
  134 + public void setContentId(String contentId) {
  135 + this.contentId = contentId;
  136 + }
  137 +
  138 + public String getActor() {
  139 + return actor;
  140 + }
  141 +
  142 + public void setActor(String actor) {
  143 + this.actor = actor;
  144 + }
  145 +
  146 + public String getTitle() {
  147 + return title;
  148 + }
  149 +
  150 + public void setTitle(String title) {
  151 + this.title = title;
  152 + }
  153 +
  154 + public String getChannelName() {
  155 + return channelName;
  156 + }
  157 +
  158 + public void setChannelName(String channelName) {
  159 + this.channelName = channelName;
  160 + }
  161 +
  162 + public String getAlbumName() {
  163 + return albumName;
  164 + }
  165 +
  166 + public void setAlbumName(String albumName) {
  167 + this.albumName = albumName;
  168 + }
  169 +
  170 + public Double getSchedule() {
  171 + return schedule;
  172 + }
  173 +
  174 + public void setSchedule(Double schedule) {
  175 + this.schedule = schedule;
  176 + }
  177 +
  178 + public Integer getCounts() {
  179 + return counts;
  180 + }
  181 +
  182 + public void setCounts(Integer counts) {
  183 + this.counts = counts;
  184 + }
  185 +
  186 + public Boolean getPlayState() {
  187 + return playState;
  188 + }
  189 +
  190 + public void setPlayState(Boolean playState) {
  191 + this.playState = playState;
  192 + }
  193 +
  194 + public String getProductId() {
  195 + return productId;
  196 + }
  197 +
  198 + public void setProductId(String productId) {
  199 + this.productId = productId;
  200 + }
  201 +
  202 + public String getProductType() {
  203 + return productType;
  204 + }
  205 +
  206 + public void setProductType(String productType) {
  207 + this.productType = productType;
  208 + }
  209 +
  210 + public String getAProductId() {
  211 + return aProductId;
  212 + }
  213 +
  214 + public void setAProductId(String aProductId) {
  215 + this.aProductId = aProductId;
  216 + }
  217 +
  218 + public String getAProductType() {
  219 + return aProductType;
  220 + }
  221 +
  222 + public void setAProductType(String aProductType) {
  223 + this.aProductType = aProductType;
  224 + }
  225 +
  226 + public Boolean getIsPayAlbum() {
  227 + return isPayAlbum;
  228 + }
  229 +
  230 + public void setIsPayAlbum(Boolean isPayAlbum) {
  231 + this.isPayAlbum = isPayAlbum;
  232 + }
  233 +
  234 + public Boolean getIsPayItem() {
  235 + return isPayItem;
  236 + }
  237 +
  238 + public void setIsPayItem(Boolean isPayItem) {
  239 + this.isPayItem = isPayItem;
  240 + }
  241 +
  242 + public String getSiteId() {
  243 + return siteId;
  244 + }
  245 +
  246 + public void setSiteId(String siteId) {
  247 + this.siteId = siteId;
  248 + }
  249 +
  250 + // KEEP METHODS - put your custom methods here
  251 + // KEEP METHODS END
  252 +
  253 +}
core/database/src/main/java/com/cnlive/database/bean/ChatFileMsg.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +
  7 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  8 +
  9 +// KEEP INCLUDES - put your custom includes here
  10 +// KEEP INCLUDES END
  11 +
  12 +/**
  13 + * Entity mapped to table "CHAT_FILE_MSG".
  14 + */
  15 +@Entity
  16 +public class ChatFileMsg {
  17 +
  18 + @Id
  19 + private long msgUniqueId;
  20 + private String fromUserId;
  21 + private String fromUserNick;
  22 + private String filePath;
  23 + private String fileName;
  24 + private Long fileSize;
  25 + private Long msgTime;
  26 +
  27 + // KEEP FIELDS - put your custom fields here
  28 + // KEEP FIELDS END
  29 +
  30 + @Generated(hash = 948317961)
  31 + public ChatFileMsg() {
  32 + }
  33 +
  34 + public ChatFileMsg(long msgUniqueId) {
  35 + this.msgUniqueId = msgUniqueId;
  36 + }
  37 +
  38 + @Generated(hash = 623510594)
  39 + public ChatFileMsg(long msgUniqueId, String fromUserId, String fromUserNick, String filePath, String fileName, Long fileSize, Long msgTime) {
  40 + this.msgUniqueId = msgUniqueId;
  41 + this.fromUserId = fromUserId;
  42 + this.fromUserNick = fromUserNick;
  43 + this.filePath = filePath;
  44 + this.fileName = fileName;
  45 + this.fileSize = fileSize;
  46 + this.msgTime = msgTime;
  47 + }
  48 +
  49 + public long getMsgUniqueId() {
  50 + return msgUniqueId;
  51 + }
  52 +
  53 + public void setMsgUniqueId(long msgUniqueId) {
  54 + this.msgUniqueId = msgUniqueId;
  55 + }
  56 +
  57 + public String getFromUserId() {
  58 + return fromUserId;
  59 + }
  60 +
  61 + public void setFromUserId(String fromUserId) {
  62 + this.fromUserId = fromUserId;
  63 + }
  64 +
  65 + public String getFromUserNick() {
  66 + return fromUserNick;
  67 + }
  68 +
  69 + public void setFromUserNick(String fromUserNick) {
  70 + this.fromUserNick = fromUserNick;
  71 + }
  72 +
  73 + public String getFilePath() {
  74 + return filePath;
  75 + }
  76 +
  77 + public void setFilePath(String filePath) {
  78 + this.filePath = filePath;
  79 + }
  80 +
  81 + public String getFileName() {
  82 + return fileName;
  83 + }
  84 +
  85 + public void setFileName(String fileName) {
  86 + this.fileName = fileName;
  87 + }
  88 +
  89 + public Long getFileSize() {
  90 + return fileSize;
  91 + }
  92 +
  93 + public void setFileSize(Long fileSize) {
  94 + this.fileSize = fileSize;
  95 + }
  96 +
  97 + public Long getMsgTime() {
  98 + return msgTime;
  99 + }
  100 +
  101 + public void setMsgTime(Long msgTime) {
  102 + this.msgTime = msgTime;
  103 + }
  104 +
  105 + // KEEP METHODS - put your custom methods here
  106 + // KEEP METHODS END
  107 +
  108 +}
core/database/src/main/java/com/cnlive/database/bean/ChatImageAndVideoMsg.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "CHAT_IMAGE_AND_VIDEO_MSG".
  15 + */
  16 +@Entity
  17 +public class ChatImageAndVideoMsg {
  18 +
  19 + @NotNull
  20 + private String sid;
  21 + private String conversationType;
  22 +
  23 + @NotNull
  24 + private String targetId;
  25 + private String sendState;
  26 + private Long sendTime;
  27 +
  28 + @Id
  29 + @NotNull
  30 + private String msgUniqueId;
  31 + private String messageLocator;
  32 + private String msgType;
  33 + private Long serverTime;
  34 + private Boolean isNewMessage;
  35 +
  36 + // KEEP FIELDS - put your custom fields here
  37 + // KEEP FIELDS END
  38 +
  39 + @Generated(hash = 1744419488)
  40 + public ChatImageAndVideoMsg() {
  41 + }
  42 +
  43 + public ChatImageAndVideoMsg(String msgUniqueId) {
  44 + this.msgUniqueId = msgUniqueId;
  45 + }
  46 +
  47 + @Generated(hash = 1571121271)
  48 + public ChatImageAndVideoMsg(@NotNull String sid, String conversationType, @NotNull String targetId, String sendState, Long sendTime, @NotNull String msgUniqueId, String messageLocator, String msgType, Long serverTime,
  49 + Boolean isNewMessage) {
  50 + this.sid = sid;
  51 + this.conversationType = conversationType;
  52 + this.targetId = targetId;
  53 + this.sendState = sendState;
  54 + this.sendTime = sendTime;
  55 + this.msgUniqueId = msgUniqueId;
  56 + this.messageLocator = messageLocator;
  57 + this.msgType = msgType;
  58 + this.serverTime = serverTime;
  59 + this.isNewMessage = isNewMessage;
  60 + }
  61 +
  62 + @NotNull
  63 + public String getSid() {
  64 + return sid;
  65 + }
  66 +
  67 + /** Not-null value; ensure this value is available before it is saved to the database. */
  68 + public void setSid(@NotNull String sid) {
  69 + this.sid = sid;
  70 + }
  71 +
  72 + public String getConversationType() {
  73 + return conversationType;
  74 + }
  75 +
  76 + public void setConversationType(String conversationType) {
  77 + this.conversationType = conversationType;
  78 + }
  79 +
  80 + @NotNull
  81 + public String getTargetId() {
  82 + return targetId;
  83 + }
  84 +
  85 + /** Not-null value; ensure this value is available before it is saved to the database. */
  86 + public void setTargetId(@NotNull String targetId) {
  87 + this.targetId = targetId;
  88 + }
  89 +
  90 + public String getSendState() {
  91 + return sendState;
  92 + }
  93 +
  94 + public void setSendState(String sendState) {
  95 + this.sendState = sendState;
  96 + }
  97 +
  98 + public Long getSendTime() {
  99 + return sendTime;
  100 + }
  101 +
  102 + public void setSendTime(Long sendTime) {
  103 + this.sendTime = sendTime;
  104 + }
  105 +
  106 + @NotNull
  107 + public String getMsgUniqueId() {
  108 + return msgUniqueId;
  109 + }
  110 +
  111 + /** Not-null value; ensure this value is available before it is saved to the database. */
  112 + public void setMsgUniqueId(@NotNull String msgUniqueId) {
  113 + this.msgUniqueId = msgUniqueId;
  114 + }
  115 +
  116 + public String getMessageLocator() {
  117 + return messageLocator;
  118 + }
  119 +
  120 + public void setMessageLocator(String messageLocator) {
  121 + this.messageLocator = messageLocator;
  122 + }
  123 +
  124 + public String getMsgType() {
  125 + return msgType;
  126 + }
  127 +
  128 + public void setMsgType(String msgType) {
  129 + this.msgType = msgType;
  130 + }
  131 +
  132 + public Long getServerTime() {
  133 + return serverTime;
  134 + }
  135 +
  136 + public void setServerTime(Long serverTime) {
  137 + this.serverTime = serverTime;
  138 + }
  139 +
  140 + public Boolean getIsNewMessage() {
  141 + return isNewMessage;
  142 + }
  143 +
  144 + public void setIsNewMessage(Boolean isNewMessage) {
  145 + this.isNewMessage = isNewMessage;
  146 + }
  147 +
  148 + // KEEP METHODS - put your custom methods here
  149 + // KEEP METHODS END
  150 +
  151 +}
core/database/src/main/java/com/cnlive/database/bean/ChatMedia.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "CHAT_MEDIA".
  15 + */
  16 +@Entity
  17 +public class ChatMedia {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String cachePath;
  22 + private String conversationId;
  23 + private String mediaType;
  24 + private String thumbPath;
  25 + private String videoDur;
  26 + private Long cacheTime;
  27 +
  28 + // KEEP FIELDS - put your custom fields here
  29 + // KEEP FIELDS END
  30 +
  31 + @Generated(hash = 1634186503)
  32 + public ChatMedia() {
  33 + }
  34 +
  35 + public ChatMedia(String cachePath) {
  36 + this.cachePath = cachePath;
  37 + }
  38 +
  39 + @Generated(hash = 868735363)
  40 + public ChatMedia(@NotNull String cachePath, String conversationId, String mediaType, String thumbPath, String videoDur,
  41 + Long cacheTime) {
  42 + this.cachePath = cachePath;
  43 + this.conversationId = conversationId;
  44 + this.mediaType = mediaType;
  45 + this.thumbPath = thumbPath;
  46 + this.videoDur = videoDur;
  47 + this.cacheTime = cacheTime;
  48 + }
  49 +
  50 + @NotNull
  51 + public String getCachePath() {
  52 + return cachePath;
  53 + }
  54 +
  55 + /** Not-null value; ensure this value is available before it is saved to the database. */
  56 + public void setCachePath(@NotNull String cachePath) {
  57 + this.cachePath = cachePath;
  58 + }
  59 +
  60 + public String getConversationId() {
  61 + return conversationId;
  62 + }
  63 +
  64 + public void setConversationId(String conversationId) {
  65 + this.conversationId = conversationId;
  66 + }
  67 +
  68 + public String getMediaType() {
  69 + return mediaType;
  70 + }
  71 +
  72 + public void setMediaType(String mediaType) {
  73 + this.mediaType = mediaType;
  74 + }
  75 +
  76 + public String getThumbPath() {
  77 + return thumbPath;
  78 + }
  79 +
  80 + public void setThumbPath(String thumbPath) {
  81 + this.thumbPath = thumbPath;
  82 + }
  83 +
  84 + public String getVideoDur() {
  85 + return videoDur;
  86 + }
  87 +
  88 + public void setVideoDur(String videoDur) {
  89 + this.videoDur = videoDur;
  90 + }
  91 +
  92 + public Long getCacheTime() {
  93 + return cacheTime;
  94 + }
  95 +
  96 + public void setCacheTime(Long cacheTime) {
  97 + this.cacheTime = cacheTime;
  98 + }
  99 +
  100 + // KEEP METHODS - put your custom methods here
  101 + // KEEP METHODS END
  102 +
  103 +}
core/database/src/main/java/com/cnlive/database/bean/ContactList.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "CONTACT_LIST".
  15 + */
  16 +@Entity
  17 +public class ContactList {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String friendId;
  22 + private String friendFaceUrl;
  23 + private String friendNickName;
  24 + private String friendRemark;
  25 + private String friendCustomInfoJson;
  26 +
  27 + // KEEP FIELDS - put your custom fields here
  28 + // KEEP FIELDS END
  29 +
  30 + @Generated(hash = 218058078)
  31 + public ContactList() {
  32 + }
  33 +
  34 + public ContactList(String friendId) {
  35 + this.friendId = friendId;
  36 + }
  37 +
  38 + @Generated(hash = 998692329)
  39 + public ContactList(@NotNull String friendId, String friendFaceUrl, String friendNickName, String friendRemark,
  40 + String friendCustomInfoJson) {
  41 + this.friendId = friendId;
  42 + this.friendFaceUrl = friendFaceUrl;
  43 + this.friendNickName = friendNickName;
  44 + this.friendRemark = friendRemark;
  45 + this.friendCustomInfoJson = friendCustomInfoJson;
  46 + }
  47 +
  48 + @NotNull
  49 + public String getFriendId() {
  50 + return friendId;
  51 + }
  52 +
  53 + /** Not-null value; ensure this value is available before it is saved to the database. */
  54 + public void setFriendId(@NotNull String friendId) {
  55 + this.friendId = friendId;
  56 + }
  57 +
  58 + public String getFriendFaceUrl() {
  59 + return friendFaceUrl;
  60 + }
  61 +
  62 + public void setFriendFaceUrl(String friendFaceUrl) {
  63 + this.friendFaceUrl = friendFaceUrl;
  64 + }
  65 +
  66 + public String getFriendNickName() {
  67 + return friendNickName;
  68 + }
  69 +
  70 + public void setFriendNickName(String friendNickName) {
  71 + this.friendNickName = friendNickName;
  72 + }
  73 +
  74 + public String getFriendRemark() {
  75 + return friendRemark;
  76 + }
  77 +
  78 + public void setFriendRemark(String friendRemark) {
  79 + this.friendRemark = friendRemark;
  80 + }
  81 +
  82 + public String getFriendCustomInfoJson() {
  83 + return friendCustomInfoJson;
  84 + }
  85 +
  86 + public void setFriendCustomInfoJson(String friendCustomInfoJson) {
  87 + this.friendCustomInfoJson = friendCustomInfoJson;
  88 + }
  89 +
  90 + // KEEP METHODS - put your custom methods here
  91 + // KEEP METHODS END
  92 +
  93 +}
core/database/src/main/java/com/cnlive/database/bean/ContanctDaRenEntity.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +
  7 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  8 +
  9 +// KEEP INCLUDES - put your custom includes here
  10 +// KEEP INCLUDES END
  11 +
  12 +/**
  13 + * Entity mapped to table "CONTANCT_DA_REN_ENTITY".
  14 + */
  15 +@Entity
  16 +public class ContanctDaRenEntity {
  17 +
  18 + @Id
  19 + private String uid;
  20 + private String cacheData;
  21 +
  22 + // KEEP FIELDS - put your custom fields here
  23 + // KEEP FIELDS END
  24 +
  25 + @Generated(hash = 1669209659)
  26 + public ContanctDaRenEntity() {
  27 + }
  28 +
  29 + public ContanctDaRenEntity(String uid) {
  30 + this.uid = uid;
  31 + }
  32 +
  33 + @Generated(hash = 2054202587)
  34 + public ContanctDaRenEntity(String uid, String cacheData) {
  35 + this.uid = uid;
  36 + this.cacheData = cacheData;
  37 + }
  38 +
  39 + public String getUid() {
  40 + return uid;
  41 + }
  42 +
  43 + public void setUid(String uid) {
  44 + this.uid = uid;
  45 + }
  46 +
  47 + public String getCacheData() {
  48 + return cacheData;
  49 + }
  50 +
  51 + public void setCacheData(String cacheData) {
  52 + this.cacheData = cacheData;
  53 + }
  54 +
  55 + // KEEP METHODS - put your custom methods here
  56 + // KEEP METHODS END
  57 +
  58 +}
core/database/src/main/java/com/cnlive/database/bean/ContanctGroupChatEntity.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +
  7 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  8 +
  9 +// KEEP INCLUDES - put your custom includes here
  10 +// KEEP INCLUDES END
  11 +
  12 +/**
  13 + * Entity mapped to table "CONTANCT_GROUP_CHAT_ENTITY".
  14 + */
  15 +@Entity
  16 +public class ContanctGroupChatEntity {
  17 +
  18 + @Id
  19 + private String uid;
  20 + private String cacheGroupListData;
  21 + private String cacheRequestNetData;
  22 +
  23 + // KEEP FIELDS - put your custom fields here
  24 + // KEEP FIELDS END
  25 +
  26 + @Generated(hash = 1958547765)
  27 + public ContanctGroupChatEntity() {
  28 + }
  29 +
  30 + public ContanctGroupChatEntity(String uid) {
  31 + this.uid = uid;
  32 + }
  33 +
  34 + @Generated(hash = 823251597)
  35 + public ContanctGroupChatEntity(String uid, String cacheGroupListData, String cacheRequestNetData) {
  36 + this.uid = uid;
  37 + this.cacheGroupListData = cacheGroupListData;
  38 + this.cacheRequestNetData = cacheRequestNetData;
  39 + }
  40 +
  41 + public String getUid() {
  42 + return uid;
  43 + }
  44 +
  45 + public void setUid(String uid) {
  46 + this.uid = uid;
  47 + }
  48 +
  49 + public String getCacheGroupListData() {
  50 + return cacheGroupListData;
  51 + }
  52 +
  53 + public void setCacheGroupListData(String cacheGroupListData) {
  54 + this.cacheGroupListData = cacheGroupListData;
  55 + }
  56 +
  57 + public String getCacheRequestNetData() {
  58 + return cacheRequestNetData;
  59 + }
  60 +
  61 + public void setCacheRequestNetData(String cacheRequestNetData) {
  62 + this.cacheRequestNetData = cacheRequestNetData;
  63 + }
  64 +
  65 + // KEEP METHODS - put your custom methods here
  66 + // KEEP METHODS END
  67 +
  68 +}
core/database/src/main/java/com/cnlive/database/bean/DBFriendCircleMessage.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "DBFRIEND_CIRCLE_MESSAGE".
  15 + */
  16 +@Entity
  17 +public class DBFriendCircleMessage {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String time;
  22 + private String sid;
  23 + private String momentId;
  24 + private String userIcon;
  25 + private String userName;
  26 + private String message;
  27 + private String contentImage;
  28 + private String contentType;
  29 + private String contentTitle;
  30 +
  31 + // KEEP FIELDS - put your custom fields here
  32 + // KEEP FIELDS END
  33 +
  34 + @Generated(hash = 1504929696)
  35 + public DBFriendCircleMessage() {
  36 + }
  37 +
  38 + public DBFriendCircleMessage(String time) {
  39 + this.time = time;
  40 + }
  41 +
  42 + @Generated(hash = 64828352)
  43 + public DBFriendCircleMessage(@NotNull String time, String sid, String momentId, String userIcon, String userName, String message, String contentImage, String contentType,
  44 + String contentTitle) {
  45 + this.time = time;
  46 + this.sid = sid;
  47 + this.momentId = momentId;
  48 + this.userIcon = userIcon;
  49 + this.userName = userName;
  50 + this.message = message;
  51 + this.contentImage = contentImage;
  52 + this.contentType = contentType;
  53 + this.contentTitle = contentTitle;
  54 + }
  55 +
  56 + @NotNull
  57 + public String getTime() {
  58 + return time;
  59 + }
  60 +
  61 + /** Not-null value; ensure this value is available before it is saved to the database. */
  62 + public void setTime(@NotNull String time) {
  63 + this.time = time;
  64 + }
  65 +
  66 + public String getSid() {
  67 + return sid;
  68 + }
  69 +
  70 + public void setSid(String sid) {
  71 + this.sid = sid;
  72 + }
  73 +
  74 + public String getMomentId() {
  75 + return momentId;
  76 + }
  77 +
  78 + public void setMomentId(String momentId) {
  79 + this.momentId = momentId;
  80 + }
  81 +
  82 + public String getUserIcon() {
  83 + return userIcon;
  84 + }
  85 +
  86 + public void setUserIcon(String userIcon) {
  87 + this.userIcon = userIcon;
  88 + }
  89 +
  90 + public String getUserName() {
  91 + return userName;
  92 + }
  93 +
  94 + public void setUserName(String userName) {
  95 + this.userName = userName;
  96 + }
  97 +
  98 + public String getMessage() {
  99 + return message;
  100 + }
  101 +
  102 + public void setMessage(String message) {
  103 + this.message = message;
  104 + }
  105 +
  106 + public String getContentImage() {
  107 + return contentImage;
  108 + }
  109 +
  110 + public void setContentImage(String contentImage) {
  111 + this.contentImage = contentImage;
  112 + }
  113 +
  114 + public String getContentType() {
  115 + return contentType;
  116 + }
  117 +
  118 + public void setContentType(String contentType) {
  119 + this.contentType = contentType;
  120 + }
  121 +
  122 + public String getContentTitle() {
  123 + return contentTitle;
  124 + }
  125 +
  126 + public void setContentTitle(String contentTitle) {
  127 + this.contentTitle = contentTitle;
  128 + }
  129 +
  130 + // KEEP METHODS - put your custom methods here
  131 + // KEEP METHODS END
  132 +
  133 +}
core/database/src/main/java/com/cnlive/database/bean/DBMomentDetail.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +
  4 +import com.cnlive.database.dao.DaoSession;
  5 +
  6 +import org.greenrobot.greendao.DaoException;
  7 +import org.greenrobot.greendao.annotation.Entity;
  8 +import org.greenrobot.greendao.annotation.Generated;
  9 +import org.greenrobot.greendao.annotation.Id;
  10 +import org.greenrobot.greendao.annotation.JoinProperty;
  11 +import org.greenrobot.greendao.annotation.NotNull;
  12 +import org.greenrobot.greendao.annotation.ToMany;
  13 +
  14 +import java.util.List;
  15 +import com.cnlive.database.dao.DBMomentItemDao;
  16 +import com.cnlive.database.dao.DBMomentDetailDao;
  17 +
  18 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  19 +
  20 +// KEEP INCLUDES - put your custom includes here
  21 +// KEEP INCLUDES END
  22 +
  23 +/**
  24 + * Entity mapped to table "DBMOMENT_DETAIL".
  25 + */
  26 +@Entity(active = true)
  27 +public class DBMomentDetail {
  28 +
  29 + @Id
  30 + private String sid;
  31 + private int type;
  32 +
  33 + @NotNull
  34 + private String userIcon;
  35 +
  36 + @NotNull
  37 + private String userName;
  38 +
  39 + @NotNull
  40 + private String signature;
  41 +
  42 + /** Used to resolve relations */
  43 + @Generated(hash = 2040040024)
  44 + private transient DaoSession daoSession;
  45 + /** Used for active entity operations. */
  46 + @Generated(hash = 1017905756)
  47 + private transient DBMomentDetailDao myDao;
  48 + @ToMany(joinProperties = {
  49 + @JoinProperty(name = "sid", referencedName = "sid")
  50 + })
  51 + private List<DBMomentItem> momentItems;
  52 +
  53 + // KEEP FIELDS - put your custom fields here
  54 + // KEEP FIELDS END
  55 +
  56 + @Generated(hash = 1385898938)
  57 + public DBMomentDetail() {
  58 + }
  59 +
  60 + public DBMomentDetail(String sid) {
  61 + this.sid = sid;
  62 + }
  63 +
  64 + @Generated(hash = 1620964741)
  65 + public DBMomentDetail(String sid, int type, @NotNull String userIcon, @NotNull String userName, @NotNull String signature) {
  66 + this.sid = sid;
  67 + this.type = type;
  68 + this.userIcon = userIcon;
  69 + this.userName = userName;
  70 + this.signature = signature;
  71 + }
  72 +
  73 + /** called by internal mechanisms, do not call yourself. */
  74 + @Generated(hash = 1813724927)
  75 + public void __setDaoSession(DaoSession daoSession) {
  76 + this.daoSession = daoSession;
  77 + myDao = daoSession != null ? daoSession.getDBMomentDetailDao() : null;
  78 + }
  79 +
  80 + public String getSid() {
  81 + return sid;
  82 + }
  83 +
  84 + public void setSid(String sid) {
  85 + this.sid = sid;
  86 + }
  87 +
  88 + public int getType() {
  89 + return type;
  90 + }
  91 +
  92 + public void setType(int type) {
  93 + this.type = type;
  94 + }
  95 +
  96 + @NotNull
  97 + public String getUserIcon() {
  98 + return userIcon;
  99 + }
  100 +
  101 + /** Not-null value; ensure this value is available before it is saved to the database. */
  102 + public void setUserIcon(@NotNull String userIcon) {
  103 + this.userIcon = userIcon;
  104 + }
  105 +
  106 + @NotNull
  107 + public String getUserName() {
  108 + return userName;
  109 + }
  110 +
  111 + /** Not-null value; ensure this value is available before it is saved to the database. */
  112 + public void setUserName(@NotNull String userName) {
  113 + this.userName = userName;
  114 + }
  115 +
  116 + @NotNull
  117 + public String getSignature() {
  118 + return signature;
  119 + }
  120 +
  121 + /** Not-null value; ensure this value is available before it is saved to the database. */
  122 + public void setSignature(@NotNull String signature) {
  123 + this.signature = signature;
  124 + }
  125 +
  126 + /**
  127 + * To-many relationship, resolved on first access (and after reset).
  128 + * Changes to to-many relations are not persisted, make changes to the target entity.
  129 + */
  130 + @Generated(hash = 842034949)
  131 + public List<DBMomentItem> getMomentItems() {
  132 + if (momentItems == null) {
  133 + final DaoSession daoSession = this.daoSession;
  134 + if (daoSession == null) {
  135 + throw new DaoException("Entity is detached from DAO context");
  136 + }
  137 + DBMomentItemDao targetDao = daoSession.getDBMomentItemDao();
  138 + List<DBMomentItem> momentItemsNew = targetDao._queryDBMomentDetail_MomentItems(sid);
  139 + synchronized (this) {
  140 + if (momentItems == null) {
  141 + momentItems = momentItemsNew;
  142 + }
  143 + }
  144 + }
  145 + return momentItems;
  146 + }
  147 +
  148 + /** Resets a to-many relationship, making the next get call to query for a fresh result. */
  149 + @Generated(hash = 2004767669)
  150 + public synchronized void resetMomentItems() {
  151 + momentItems = null;
  152 + }
  153 +
  154 + /**
  155 + * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
  156 + * Entity must attached to an entity context.
  157 + */
  158 + @Generated(hash = 128553479)
  159 + public void delete() {
  160 + if (myDao == null) {
  161 + throw new DaoException("Entity is detached from DAO context");
  162 + }
  163 + myDao.delete(this);
  164 + }
  165 +
  166 + /**
  167 + * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
  168 + * Entity must attached to an entity context.
  169 + */
  170 + @Generated(hash = 713229351)
  171 + public void update() {
  172 + if (myDao == null) {
  173 + throw new DaoException("Entity is detached from DAO context");
  174 + }
  175 + myDao.update(this);
  176 + }
  177 +
  178 + /**
  179 + * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
  180 + * Entity must attached to an entity context.
  181 + */
  182 + @Generated(hash = 1942392019)
  183 + public void refresh() {
  184 + if (myDao == null) {
  185 + throw new DaoException("Entity is detached from DAO context");
  186 + }
  187 + myDao.refresh(this);
  188 + }
  189 +
  190 + // KEEP METHODS - put your custom methods here
  191 + // KEEP METHODS END
  192 +
  193 +}
core/database/src/main/java/com/cnlive/database/bean/DBMomentItem.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +
  4 +import com.cnlive.database.dao.DaoSession;
  5 +
  6 +import org.greenrobot.greendao.DaoException;
  7 +import org.greenrobot.greendao.annotation.Entity;
  8 +import org.greenrobot.greendao.annotation.Generated;
  9 +import org.greenrobot.greendao.annotation.Id;
  10 +import org.greenrobot.greendao.annotation.NotNull;
  11 +import org.greenrobot.greendao.annotation.ToOne;
  12 +import com.cnlive.database.dao.DBMomentDetailDao;
  13 +import com.cnlive.database.dao.DBMomentItemDao;
  14 +
  15 +// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit.
  16 +
  17 +/**
  18 + * Entity mapped to table "DBMOMENT_ITEM".
  19 + */
  20 +@Entity(active = true)
  21 +public class DBMomentItem {
  22 +
  23 + @Id
  24 + private String id;
  25 + private String itemId;
  26 +
  27 + @NotNull
  28 + private String momentItemDetail;
  29 + private String sid;
  30 +
  31 + /** Used to resolve relations */
  32 + @Generated(hash = 2040040024)
  33 + private transient DaoSession daoSession;
  34 + /** Used for active entity operations. */
  35 + @Generated(hash = 1682324949)
  36 + private transient DBMomentItemDao myDao;
  37 + @ToOne(joinProperty = "sid")
  38 + private DBMomentDetail dBMomentDetail;
  39 +
  40 + @Generated(hash = 1023063607)
  41 + private transient String dBMomentDetail__resolvedKey;
  42 +
  43 + @Generated(hash = 1283454445)
  44 + public DBMomentItem() {
  45 + }
  46 +
  47 + public DBMomentItem(String id) {
  48 + this.id = id;
  49 + }
  50 +
  51 + @Generated(hash = 821818299)
  52 + public DBMomentItem(String id, String itemId, @NotNull String momentItemDetail, String sid) {
  53 + this.id = id;
  54 + this.itemId = itemId;
  55 + this.momentItemDetail = momentItemDetail;
  56 + this.sid = sid;
  57 + }
  58 +
  59 + /** called by internal mechanisms, do not call yourself. */
  60 + @Generated(hash = 1118667076)
  61 + public void __setDaoSession(DaoSession daoSession) {
  62 + this.daoSession = daoSession;
  63 + myDao = daoSession != null ? daoSession.getDBMomentItemDao() : null;
  64 + }
  65 +
  66 + public String getId() {
  67 + return id;
  68 + }
  69 +
  70 + public void setId(String id) {
  71 + this.id = id;
  72 + }
  73 +
  74 + public String getItemId() {
  75 + return itemId;
  76 + }
  77 +
  78 + public void setItemId(String itemId) {
  79 + this.itemId = itemId;
  80 + }
  81 +
  82 + @NotNull
  83 + public String getMomentItemDetail() {
  84 + return momentItemDetail;
  85 + }
  86 +
  87 + /** Not-null value; ensure this value is available before it is saved to the database. */
  88 + public void setMomentItemDetail(@NotNull String momentItemDetail) {
  89 + this.momentItemDetail = momentItemDetail;
  90 + }
  91 +
  92 + public String getSid() {
  93 + return sid;
  94 + }
  95 +
  96 + public void setSid(String sid) {
  97 + this.sid = sid;
  98 + }
  99 +
  100 + /** To-one relationship, resolved on first access. */
  101 + @Generated(hash = 159643884)
  102 + public DBMomentDetail getDBMomentDetail() {
  103 + String __key = this.sid;
  104 + if (dBMomentDetail__resolvedKey == null || dBMomentDetail__resolvedKey != __key) {
  105 + final DaoSession daoSession = this.daoSession;
  106 + if (daoSession == null) {
  107 + throw new DaoException("Entity is detached from DAO context");
  108 + }
  109 + DBMomentDetailDao targetDao = daoSession.getDBMomentDetailDao();
  110 + DBMomentDetail dBMomentDetailNew = targetDao.load(__key);
  111 + synchronized (this) {
  112 + dBMomentDetail = dBMomentDetailNew;
  113 + dBMomentDetail__resolvedKey = __key;
  114 + }
  115 + }
  116 + return dBMomentDetail;
  117 + }
  118 +
  119 + /** called by internal mechanisms, do not call yourself. */
  120 + @Generated(hash = 495632760)
  121 + public void setDBMomentDetail(DBMomentDetail dBMomentDetail) {
  122 + synchronized (this) {
  123 + this.dBMomentDetail = dBMomentDetail;
  124 + sid = dBMomentDetail == null ? null : dBMomentDetail.getSid();
  125 + dBMomentDetail__resolvedKey = sid;
  126 + }
  127 + }
  128 +
  129 + /**
  130 + * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
  131 + * Entity must attached to an entity context.
  132 + */
  133 + @Generated(hash = 128553479)
  134 + public void delete() {
  135 + if (myDao == null) {
  136 + throw new DaoException("Entity is detached from DAO context");
  137 + }
  138 + myDao.delete(this);
  139 + }
  140 +
  141 + /**
  142 + * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
  143 + * Entity must attached to an entity context.
  144 + */
  145 + @Generated(hash = 713229351)
  146 + public void update() {
  147 + if (myDao == null) {
  148 + throw new DaoException("Entity is detached from DAO context");
  149 + }
  150 + myDao.update(this);
  151 + }
  152 +
  153 + /**
  154 + * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
  155 + * Entity must attached to an entity context.
  156 + */
  157 + @Generated(hash = 1942392019)
  158 + public void refresh() {
  159 + if (myDao == null) {
  160 + throw new DaoException("Entity is detached from DAO context");
  161 + }
  162 + myDao.refresh(this);
  163 + }
  164 +
  165 +}
core/database/src/main/java/com/cnlive/database/bean/DarenDetailMsg.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +
  7 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  8 +
  9 +// KEEP INCLUDES - put your custom includes here
  10 +// KEEP INCLUDES END
  11 +
  12 +/**
  13 + * Entity mapped to table "DAREN_DETAIL_MSG".
  14 + */
  15 +@Entity
  16 +public class DarenDetailMsg {
  17 +
  18 + @Id
  19 + private String darenId;
  20 + private String image;
  21 + private String custSign;
  22 + private String fansNum;
  23 + private Boolean fan;
  24 + private String sid;
  25 + private String address;
  26 + private String shopName;
  27 + private Float grade;
  28 + private Boolean online;
  29 + private String orderCount;
  30 + private String commentCount;
  31 + private String propagandas;
  32 + private String content;
  33 + private String category;
  34 +
  35 + // KEEP FIELDS - put your custom fields here
  36 + // KEEP FIELDS END
  37 +
  38 + @Generated(hash = 1523727014)
  39 + public DarenDetailMsg() {
  40 + }
  41 +
  42 + public DarenDetailMsg(String darenId) {
  43 + this.darenId = darenId;
  44 + }
  45 +
  46 + @Generated(hash = 708127880)
  47 + public DarenDetailMsg(String darenId, String image, String custSign, String fansNum, Boolean fan, String sid, String address, String shopName, Float grade, Boolean online, String orderCount, String commentCount, String propagandas, String content, String category) {
  48 + this.darenId = darenId;
  49 + this.image = image;
  50 + this.custSign = custSign;
  51 + this.fansNum = fansNum;
  52 + this.fan = fan;
  53 + this.sid = sid;
  54 + this.address = address;
  55 + this.shopName = shopName;
  56 + this.grade = grade;
  57 + this.online = online;
  58 + this.orderCount = orderCount;
  59 + this.commentCount = commentCount;
  60 + this.propagandas = propagandas;
  61 + this.content = content;
  62 + this.category = category;
  63 + }
  64 +
  65 + public String getDarenId() {
  66 + return darenId;
  67 + }
  68 +
  69 + public void setDarenId(String darenId) {
  70 + this.darenId = darenId;
  71 + }
  72 +
  73 + public String getImage() {
  74 + return image;
  75 + }
  76 +
  77 + public void setImage(String image) {
  78 + this.image = image;
  79 + }
  80 +
  81 + public String getCustSign() {
  82 + return custSign;
  83 + }
  84 +
  85 + public void setCustSign(String custSign) {
  86 + this.custSign = custSign;
  87 + }
  88 +
  89 + public String getFansNum() {
  90 + return fansNum;
  91 + }
  92 +
  93 + public void setFansNum(String fansNum) {
  94 + this.fansNum = fansNum;
  95 + }
  96 +
  97 + public Boolean getFan() {
  98 + return fan;
  99 + }
  100 +
  101 + public void setFan(Boolean fan) {
  102 + this.fan = fan;
  103 + }
  104 +
  105 + public String getSid() {
  106 + return sid;
  107 + }
  108 +
  109 + public void setSid(String sid) {
  110 + this.sid = sid;
  111 + }
  112 +
  113 + public String getAddress() {
  114 + return address;
  115 + }
  116 +
  117 + public void setAddress(String address) {
  118 + this.address = address;
  119 + }
  120 +
  121 + public String getShopName() {
  122 + return shopName;
  123 + }
  124 +
  125 + public void setShopName(String shopName) {
  126 + this.shopName = shopName;
  127 + }
  128 +
  129 + public Float getGrade() {
  130 + return grade;
  131 + }
  132 +
  133 + public void setGrade(Float grade) {
  134 + this.grade = grade;
  135 + }
  136 +
  137 + public Boolean getOnline() {
  138 + return online;
  139 + }
  140 +
  141 + public void setOnline(Boolean online) {
  142 + this.online = online;
  143 + }
  144 +
  145 + public String getOrderCount() {
  146 + return orderCount;
  147 + }
  148 +
  149 + public void setOrderCount(String orderCount) {
  150 + this.orderCount = orderCount;
  151 + }
  152 +
  153 + public String getCommentCount() {
  154 + return commentCount;
  155 + }
  156 +
  157 + public void setCommentCount(String commentCount) {
  158 + this.commentCount = commentCount;
  159 + }
  160 +
  161 + public String getPropagandas() {
  162 + return propagandas;
  163 + }
  164 +
  165 + public void setPropagandas(String propagandas) {
  166 + this.propagandas = propagandas;
  167 + }
  168 +
  169 + public String getContent() {
  170 + return content;
  171 + }
  172 +
  173 + public void setContent(String content) {
  174 + this.content = content;
  175 + }
  176 +
  177 + public String getCategory() {
  178 + return category;
  179 + }
  180 +
  181 + public void setCategory(String category) {
  182 + this.category = category;
  183 + }
  184 +
  185 + // KEEP METHODS - put your custom methods here
  186 + // KEEP METHODS END
  187 +
  188 +}
core/database/src/main/java/com/cnlive/database/bean/DarenListMsg.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "DAREN_LIST_MSG".
  15 + */
  16 +@Entity
  17 +public class DarenListMsg {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String sid;
  22 + private String darenList;
  23 +
  24 + // KEEP FIELDS - put your custom fields here
  25 + // KEEP FIELDS END
  26 +
  27 + @Generated(hash = 1764232799)
  28 + public DarenListMsg() {
  29 + }
  30 +
  31 + public DarenListMsg(String sid) {
  32 + this.sid = sid;
  33 + }
  34 +
  35 + @Generated(hash = 619713886)
  36 + public DarenListMsg(@NotNull String sid, String darenList) {
  37 + this.sid = sid;
  38 + this.darenList = darenList;
  39 + }
  40 +
  41 + @NotNull
  42 + public String getSid() {
  43 + return sid;
  44 + }
  45 +
  46 + /** Not-null value; ensure this value is available before it is saved to the database. */
  47 + public void setSid(@NotNull String sid) {
  48 + this.sid = sid;
  49 + }
  50 +
  51 + public String getDarenList() {
  52 + return darenList;
  53 + }
  54 +
  55 + public void setDarenList(String darenList) {
  56 + this.darenList = darenList;
  57 + }
  58 +
  59 + // KEEP METHODS - put your custom methods here
  60 + // KEEP METHODS END
  61 +
  62 +}
core/database/src/main/java/com/cnlive/database/bean/DownloadInfo.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +
  9 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  10 +
  11 +// KEEP INCLUDES - put your custom includes here
  12 +// KEEP INCLUDES END
  13 +
  14 +/**
  15 + * Entity mapped to table "DOWNLOAD_INFO".
  16 + */
  17 +@Entity
  18 +public class DownloadInfo{
  19 +
  20 + @Id
  21 + @NotNull
  22 + private String urlId;
  23 + private String url;
  24 + private String downloadStatus;
  25 + private String fileName;
  26 + private Long total;
  27 + private Long progress;
  28 + private String albumId;
  29 + private String contentId;
  30 + private String cmccId;
  31 + private String shareUrl;
  32 + private String albumImg;
  33 + private String actor;
  34 + private String albumName;
  35 + private Double schedule;
  36 + private String channelName;
  37 + private String fileSize;
  38 + private Integer counts;
  39 +
  40 + // KEEP FIELDS - put your custom fields here
  41 + // KEEP FIELDS END
  42 +
  43 + @Generated(hash = 327086747)
  44 + public DownloadInfo() {
  45 + }
  46 +
  47 + public DownloadInfo(String urlId) {
  48 + this.urlId = urlId;
  49 + }
  50 +
  51 + @Generated(hash = 986395589)
  52 + public DownloadInfo(@NotNull String urlId, String url, String downloadStatus, String fileName, Long total, Long progress, String albumId, String contentId, String cmccId, String shareUrl, String albumImg, String actor, String albumName, Double schedule, String channelName, String fileSize,
  53 + Integer counts) {
  54 + this.urlId = urlId;
  55 + this.url = url;
  56 + this.downloadStatus = downloadStatus;
  57 + this.fileName = fileName;
  58 + this.total = total;
  59 + this.progress = progress;
  60 + this.albumId = albumId;
  61 + this.contentId = contentId;
  62 + this.cmccId = cmccId;
  63 + this.shareUrl = shareUrl;
  64 + this.albumImg = albumImg;
  65 + this.actor = actor;
  66 + this.albumName = albumName;
  67 + this.schedule = schedule;
  68 + this.channelName = channelName;
  69 + this.fileSize = fileSize;
  70 + this.counts = counts;
  71 + }
  72 +
  73 + @NotNull
  74 + public String getUrlId() {
  75 + return urlId;
  76 + }
  77 +
  78 + /** Not-null value; ensure this value is available before it is saved to the database. */
  79 + public void setUrlId(@NotNull String urlId) {
  80 + this.urlId = urlId;
  81 + }
  82 +
  83 + public String getUrl() {
  84 + return url;
  85 + }
  86 +
  87 + public void setUrl(String url) {
  88 + this.url = url;
  89 + }
  90 +
  91 + public String getDownloadStatus() {
  92 + return downloadStatus;
  93 + }
  94 +
  95 + public void setDownloadStatus(String downloadStatus) {
  96 + this.downloadStatus = downloadStatus;
  97 + }
  98 +
  99 + public String getFileName() {
  100 + return fileName;
  101 + }
  102 +
  103 + public void setFileName(String fileName) {
  104 + this.fileName = fileName;
  105 + }
  106 +
  107 + public Long getTotal() {
  108 + return total;
  109 + }
  110 +
  111 + public void setTotal(Long total) {
  112 + this.total = total;
  113 + }
  114 +
  115 + public Long getProgress() {
  116 + return progress;
  117 + }
  118 +
  119 + public void setProgress(Long progress) {
  120 + this.progress = progress;
  121 + }
  122 +
  123 + public String getAlbumId() {
  124 + return albumId;
  125 + }
  126 +
  127 + public void setAlbumId(String albumId) {
  128 + this.albumId = albumId;
  129 + }
  130 +
  131 + public String getContentId() {
  132 + return contentId;
  133 + }
  134 +
  135 + public void setContentId(String contentId) {
  136 + this.contentId = contentId;
  137 + }
  138 +
  139 + public String getCmccId() {
  140 + return cmccId;
  141 + }
  142 +
  143 + public void setCmccId(String cmccId) {
  144 + this.cmccId = cmccId;
  145 + }
  146 +
  147 + public String getShareUrl() {
  148 + return shareUrl;
  149 + }
  150 +
  151 + public void setShareUrl(String shareUrl) {
  152 + this.shareUrl = shareUrl;
  153 + }
  154 +
  155 + public String getAlbumImg() {
  156 + return albumImg;
  157 + }
  158 +
  159 + public void setAlbumImg(String albumImg) {
  160 + this.albumImg = albumImg;
  161 + }
  162 +
  163 + public String getActor() {
  164 + return actor;
  165 + }
  166 +
  167 + public void setActor(String actor) {
  168 + this.actor = actor;
  169 + }
  170 +
  171 + public String getAlbumName() {
  172 + return albumName;
  173 + }
  174 +
  175 + public void setAlbumName(String albumName) {
  176 + this.albumName = albumName;
  177 + }
  178 +
  179 + public Double getSchedule() {
  180 + return schedule;
  181 + }
  182 +
  183 + public void setSchedule(Double schedule) {
  184 + this.schedule = schedule;
  185 + }
  186 +
  187 + public String getChannelName() {
  188 + return channelName;
  189 + }
  190 +
  191 + public void setChannelName(String channelName) {
  192 + this.channelName = channelName;
  193 + }
  194 +
  195 + public String getFileSize() {
  196 + return fileSize;
  197 + }
  198 +
  199 + public void setFileSize(String fileSize) {
  200 + this.fileSize = fileSize;
  201 + }
  202 +
  203 + public Integer getCounts() {
  204 + return counts;
  205 + }
  206 +
  207 + public void setCounts(Integer counts) {
  208 + this.counts = counts;
  209 + }
  210 +
  211 + // KEEP METHODS - put your custom methods here
  212 + // KEEP METHODS END
  213 +
  214 +}
core/database/src/main/java/com/cnlive/database/bean/DownloadNewInfo.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import java.io.Serializable;
  4 +
  5 +/**
  6 + * created by hanyayun
  7 + * on 2020/1/2
  8 + */
  9 +public class DownloadNewInfo implements Serializable {
  10 +
  11 + private String urlId;
  12 + private String url;
  13 + private String downloadStatus;
  14 + private String fileName;
  15 + private Long total;
  16 + private Long progress;
  17 + private String albumId;
  18 + private String contentId;
  19 + private String cmccId;
  20 + private String shareUrl;
  21 + private String albumImg;
  22 + private String actor;
  23 + private String albumName;
  24 + private Double schedule;
  25 + private String channelName;
  26 + private String fileSize;
  27 + private Integer counts;
  28 +
  29 +
  30 + public DownloadNewInfo(String urlId, String url, String downloadStatus, String fileName, Long total, Long progress, String albumId, String contentId, String cmccId, String shareUrl, String albumImg, String actor, String albumName, Double schedule, String channelName, String fileSize, Integer counts) {
  31 + this.urlId = urlId;
  32 + this.url = url;
  33 + this.downloadStatus = downloadStatus;
  34 + this.fileName = fileName;
  35 + this.total = total;
  36 + this.progress = progress;
  37 + this.albumId = albumId;
  38 + this.contentId = contentId;
  39 + this.cmccId = cmccId;
  40 + this.shareUrl = shareUrl;
  41 + this.albumImg = albumImg;
  42 + this.actor = actor;
  43 + this.albumName = albumName;
  44 + this.schedule = schedule;
  45 + this.channelName = channelName;
  46 + this.fileSize = fileSize;
  47 + this.counts = counts;
  48 + }
  49 +
  50 + public String getUrlId() {
  51 + return urlId;
  52 + }
  53 +
  54 + /** Not-null value; ensure this value is available before it is saved to the database. */
  55 + public void setUrlId(String urlId) {
  56 + this.urlId = urlId;
  57 + }
  58 +
  59 + public String getUrl() {
  60 + return url;
  61 + }
  62 +
  63 + public void setUrl(String url) {
  64 + this.url = url;
  65 + }
  66 +
  67 + public String getDownloadStatus() {
  68 + return downloadStatus;
  69 + }
  70 +
  71 + public void setDownloadStatus(String downloadStatus) {
  72 + this.downloadStatus = downloadStatus;
  73 + }
  74 +
  75 + public String getFileName() {
  76 + return fileName;
  77 + }
  78 +
  79 + public void setFileName(String fileName) {
  80 + this.fileName = fileName;
  81 + }
  82 +
  83 + public Long getTotal() {
  84 + return total;
  85 + }
  86 +
  87 + public void setTotal(Long total) {
  88 + this.total = total;
  89 + }
  90 +
  91 + public Long getProgress() {
  92 + return progress;
  93 + }
  94 +
  95 + public void setProgress(Long progress) {
  96 + this.progress = progress;
  97 + }
  98 +
  99 + public String getAlbumId() {
  100 + return albumId;
  101 + }
  102 +
  103 + public void setAlbumId(String albumId) {
  104 + this.albumId = albumId;
  105 + }
  106 +
  107 + public String getContentId() {
  108 + return contentId;
  109 + }
  110 +
  111 + public void setContentId(String contentId) {
  112 + this.contentId = contentId;
  113 + }
  114 +
  115 + public String getCmccId() {
  116 + return cmccId;
  117 + }
  118 +
  119 + public void setCmccId(String cmccId) {
  120 + this.cmccId = cmccId;
  121 + }
  122 +
  123 + public String getShareUrl() {
  124 + return shareUrl;
  125 + }
  126 +
  127 + public void setShareUrl(String shareUrl) {
  128 + this.shareUrl = shareUrl;
  129 + }
  130 +
  131 + public String getAlbumImg() {
  132 + return albumImg;
  133 + }
  134 +
  135 + public void setAlbumImg(String albumImg) {
  136 + this.albumImg = albumImg;
  137 + }
  138 +
  139 + public String getActor() {
  140 + return actor;
  141 + }
  142 +
  143 + public void setActor(String actor) {
  144 + this.actor = actor;
  145 + }
  146 +
  147 + public String getAlbumName() {
  148 + return albumName;
  149 + }
  150 +
  151 + public void setAlbumName(String albumName) {
  152 + this.albumName = albumName;
  153 + }
  154 +
  155 + public Double getSchedule() {
  156 + return schedule;
  157 + }
  158 +
  159 + public void setSchedule(Double schedule) {
  160 + this.schedule = schedule;
  161 + }
  162 +
  163 + public String getChannelName() {
  164 + return channelName;
  165 + }
  166 +
  167 + public void setChannelName(String channelName) {
  168 + this.channelName = channelName;
  169 + }
  170 +
  171 + public String getFileSize() {
  172 + return fileSize;
  173 + }
  174 +
  175 + public void setFileSize(String fileSize) {
  176 + this.fileSize = fileSize;
  177 + }
  178 +
  179 + public Integer getCounts() {
  180 + return counts;
  181 + }
  182 +
  183 + public void setCounts(Integer counts) {
  184 + this.counts = counts;
  185 + }
  186 +
  187 + // KEEP METHODS - put your custom methods here
  188 + // KEEP METHODS END
  189 +
  190 +}
core/database/src/main/java/com/cnlive/database/bean/ExceptionInfo.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "EXCEPTION_INFO".
  15 + */
  16 +@Entity
  17 +public class ExceptionInfo {
  18 +
  19 + @Id(autoincrement = true)
  20 + private Long id;
  21 +
  22 + @NotNull
  23 + private String ErrorTag;
  24 +
  25 + @NotNull
  26 + private String ErrorMessage;
  27 +
  28 + // KEEP FIELDS - put your custom fields here
  29 + // KEEP FIELDS END
  30 +
  31 + @Generated(hash = 841014831)
  32 + public ExceptionInfo() {
  33 + }
  34 +
  35 + public ExceptionInfo(Long id) {
  36 + this.id = id;
  37 + }
  38 +
  39 + @Generated(hash = 1539241816)
  40 + public ExceptionInfo(Long id, @NotNull String ErrorTag, @NotNull String ErrorMessage) {
  41 + this.id = id;
  42 + this.ErrorTag = ErrorTag;
  43 + this.ErrorMessage = ErrorMessage;
  44 + }
  45 +
  46 + public Long getId() {
  47 + return id;
  48 + }
  49 +
  50 + public void setId(Long id) {
  51 + this.id = id;
  52 + }
  53 +
  54 + @NotNull
  55 + public String getErrorTag() {
  56 + return ErrorTag;
  57 + }
  58 +
  59 + /** Not-null value; ensure this value is available before it is saved to the database. */
  60 + public void setErrorTag(@NotNull String ErrorTag) {
  61 + this.ErrorTag = ErrorTag;
  62 + }
  63 +
  64 + @NotNull
  65 + public String getErrorMessage() {
  66 + return ErrorMessage;
  67 + }
  68 +
  69 + /** Not-null value; ensure this value is available before it is saved to the database. */
  70 + public void setErrorMessage(@NotNull String ErrorMessage) {
  71 + this.ErrorMessage = ErrorMessage;
  72 + }
  73 +
  74 + // KEEP METHODS - put your custom methods here
  75 + // KEEP METHODS END
  76 +
  77 +}
core/database/src/main/java/com/cnlive/database/bean/HolidayThemeInfo.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "HOLIDAY_THEME_INFO".
  15 + */
  16 +@Entity
  17 +public class HolidayThemeInfo {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String appid;
  22 + private String clickAfter;
  23 + private String clickBefore;
  24 + private String holidayThemeId;
  25 + private String imagePackage;
  26 + private String showSource;
  27 + private String isShow;
  28 + private Integer updateType;
  29 + private Boolean isDonwLoadSucess;
  30 + private String skinType;
  31 +
  32 + // KEEP FIELDS - put your custom fields here
  33 + // KEEP FIELDS END
  34 +
  35 + @Generated(hash = 646770330)
  36 + public HolidayThemeInfo() {
  37 + }
  38 +
  39 + public HolidayThemeInfo(String appid) {
  40 + this.appid = appid;
  41 + }
  42 +
  43 + @Generated(hash = 754843222)
  44 + public HolidayThemeInfo(@NotNull String appid, String clickAfter, String clickBefore, String holidayThemeId, String imagePackage, String showSource, String isShow, Integer updateType, Boolean isDonwLoadSucess,
  45 + String skinType) {
  46 + this.appid = appid;
  47 + this.clickAfter = clickAfter;
  48 + this.clickBefore = clickBefore;
  49 + this.holidayThemeId = holidayThemeId;
  50 + this.imagePackage = imagePackage;
  51 + this.showSource = showSource;
  52 + this.isShow = isShow;
  53 + this.updateType = updateType;
  54 + this.isDonwLoadSucess = isDonwLoadSucess;
  55 + this.skinType = skinType;
  56 + }
  57 +
  58 + @NotNull
  59 + public String getAppid() {
  60 + return appid;
  61 + }
  62 +
  63 + /** Not-null value; ensure this value is available before it is saved to the database. */
  64 + public void setAppid(@NotNull String appid) {
  65 + this.appid = appid;
  66 + }
  67 +
  68 + public String getClickAfter() {
  69 + return clickAfter;
  70 + }
  71 +
  72 + public void setClickAfter(String clickAfter) {
  73 + this.clickAfter = clickAfter;
  74 + }
  75 +
  76 + public String getClickBefore() {
  77 + return clickBefore;
  78 + }
  79 +
  80 + public void setClickBefore(String clickBefore) {
  81 + this.clickBefore = clickBefore;
  82 + }
  83 +
  84 + public String getHolidayThemeId() {
  85 + return holidayThemeId;
  86 + }
  87 +
  88 + public void setHolidayThemeId(String holidayThemeId) {
  89 + this.holidayThemeId = holidayThemeId;
  90 + }
  91 +
  92 + public String getImagePackage() {
  93 + return imagePackage;
  94 + }
  95 +
  96 + public void setImagePackage(String imagePackage) {
  97 + this.imagePackage = imagePackage;
  98 + }
  99 +
  100 + public String getShowSource() {
  101 + return showSource;
  102 + }
  103 +
  104 + public void setShowSource(String showSource) {
  105 + this.showSource = showSource;
  106 + }
  107 +
  108 + public String getIsShow() {
  109 + return isShow;
  110 + }
  111 +
  112 + public void setIsShow(String isShow) {
  113 + this.isShow = isShow;
  114 + }
  115 +
  116 + public Integer getUpdateType() {
  117 + return updateType;
  118 + }
  119 +
  120 + public void setUpdateType(Integer updateType) {
  121 + this.updateType = updateType;
  122 + }
  123 +
  124 + public Boolean getIsDonwLoadSucess() {
  125 + return isDonwLoadSucess;
  126 + }
  127 +
  128 + public void setIsDonwLoadSucess(Boolean isDonwLoadSucess) {
  129 + this.isDonwLoadSucess = isDonwLoadSucess;
  130 + }
  131 +
  132 + public String getSkinType() {
  133 + return skinType;
  134 + }
  135 +
  136 + public void setSkinType(String skinType) {
  137 + this.skinType = skinType;
  138 + }
  139 +
  140 + // KEEP METHODS - put your custom methods here
  141 + // KEEP METHODS END
  142 +
  143 +}
core/database/src/main/java/com/cnlive/database/bean/IMConversationInfo.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "IMCONVERSATION_INFO".
  15 + */
  16 +@Entity
  17 +public class IMConversationInfo {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String conversationId;
  22 + private String conversationType;
  23 + private String title;
  24 + private String des;
  25 + private String faceUrl;
  26 + private String conversationFaceUrl;
  27 + private Long timeStep;
  28 + private Long unreadCount;
  29 +
  30 + // KEEP FIELDS - put your custom fields here
  31 + // KEEP FIELDS END
  32 +
  33 + @Generated(hash = 1584740420)
  34 + public IMConversationInfo() {
  35 + }
  36 +
  37 + public IMConversationInfo(String conversationId) {
  38 + this.conversationId = conversationId;
  39 + }
  40 +
  41 + @Generated(hash = 972213813)
  42 + public IMConversationInfo(@NotNull String conversationId, String conversationType, String title, String des, String faceUrl, String conversationFaceUrl, Long timeStep,
  43 + Long unreadCount) {
  44 + this.conversationId = conversationId;
  45 + this.conversationType = conversationType;
  46 + this.title = title;
  47 + this.des = des;
  48 + this.faceUrl = faceUrl;
  49 + this.conversationFaceUrl = conversationFaceUrl;
  50 + this.timeStep = timeStep;
  51 + this.unreadCount = unreadCount;
  52 + }
  53 +
  54 + @NotNull
  55 + public String getConversationId() {
  56 + return conversationId;
  57 + }
  58 +
  59 + /** Not-null value; ensure this value is available before it is saved to the database. */
  60 + public void setConversationId(@NotNull String conversationId) {
  61 + this.conversationId = conversationId;
  62 + }
  63 +
  64 + public String getConversationType() {
  65 + return conversationType;
  66 + }
  67 +
  68 + public void setConversationType(String conversationType) {
  69 + this.conversationType = conversationType;
  70 + }
  71 +
  72 + public String getTitle() {
  73 + return title;
  74 + }
  75 +
  76 + public void setTitle(String title) {
  77 + this.title = title;
  78 + }
  79 +
  80 + public String getDes() {
  81 + return des;
  82 + }
  83 +
  84 + public void setDes(String des) {
  85 + this.des = des;
  86 + }
  87 +
  88 + public String getFaceUrl() {
  89 + return faceUrl;
  90 + }
  91 +
  92 + public void setFaceUrl(String faceUrl) {
  93 + this.faceUrl = faceUrl;
  94 + }
  95 +
  96 + public String getConversationFaceUrl() {
  97 + return conversationFaceUrl;
  98 + }
  99 +
  100 + public void setConversationFaceUrl(String conversationFaceUrl) {
  101 + this.conversationFaceUrl = conversationFaceUrl;
  102 + }
  103 +
  104 + public Long getTimeStep() {
  105 + return timeStep;
  106 + }
  107 +
  108 + public void setTimeStep(Long timeStep) {
  109 + this.timeStep = timeStep;
  110 + }
  111 +
  112 + public Long getUnreadCount() {
  113 + return unreadCount;
  114 + }
  115 +
  116 + public void setUnreadCount(Long unreadCount) {
  117 + this.unreadCount = unreadCount;
  118 + }
  119 +
  120 + // KEEP METHODS - put your custom methods here
  121 + // KEEP METHODS END
  122 +
  123 +}
core/database/src/main/java/com/cnlive/database/bean/IMGroupFaceMemberIds.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "IMGROUP_FACE_MEMBER_IDS".
  15 + */
  16 +@Entity
  17 +public class IMGroupFaceMemberIds {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String GroupId;
  22 + private String GroupFaceUrlIds;
  23 +
  24 + // KEEP FIELDS - put your custom fields here
  25 + // KEEP FIELDS END
  26 +
  27 + @Generated(hash = 193259065)
  28 + public IMGroupFaceMemberIds() {
  29 + }
  30 +
  31 + public IMGroupFaceMemberIds(String GroupId) {
  32 + this.GroupId = GroupId;
  33 + }
  34 +
  35 + @Generated(hash = 1656457009)
  36 + public IMGroupFaceMemberIds(@NotNull String GroupId, String GroupFaceUrlIds) {
  37 + this.GroupId = GroupId;
  38 + this.GroupFaceUrlIds = GroupFaceUrlIds;
  39 + }
  40 +
  41 + @NotNull
  42 + public String getGroupId() {
  43 + return GroupId;
  44 + }
  45 +
  46 + /** Not-null value; ensure this value is available before it is saved to the database. */
  47 + public void setGroupId(@NotNull String GroupId) {
  48 + this.GroupId = GroupId;
  49 + }
  50 +
  51 + public String getGroupFaceUrlIds() {
  52 + return GroupFaceUrlIds;
  53 + }
  54 +
  55 + public void setGroupFaceUrlIds(String GroupFaceUrlIds) {
  56 + this.GroupFaceUrlIds = GroupFaceUrlIds;
  57 + }
  58 +
  59 + // KEEP METHODS - put your custom methods here
  60 + // KEEP METHODS END
  61 +
  62 +}
core/database/src/main/java/com/cnlive/database/bean/IMGroupMembers.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "IMGROUP_MEMBERS".
  15 + */
  16 +@Entity
  17 +public class IMGroupMembers {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String GroupId;
  22 + private String GroupName;
  23 + private String GroupFaceUrl;
  24 + private String CombineGroupFaceUrl;
  25 +
  26 + // KEEP FIELDS - put your custom fields here
  27 + // KEEP FIELDS END
  28 +
  29 + @Generated(hash = 183870571)
  30 + public IMGroupMembers() {
  31 + }
  32 +
  33 + public IMGroupMembers(String GroupId) {
  34 + this.GroupId = GroupId;
  35 + }
  36 +
  37 + @Generated(hash = 275046691)
  38 + public IMGroupMembers(@NotNull String GroupId, String GroupName, String GroupFaceUrl,
  39 + String CombineGroupFaceUrl) {
  40 + this.GroupId = GroupId;
  41 + this.GroupName = GroupName;
  42 + this.GroupFaceUrl = GroupFaceUrl;
  43 + this.CombineGroupFaceUrl = CombineGroupFaceUrl;
  44 + }
  45 +
  46 + @NotNull
  47 + public String getGroupId() {
  48 + return GroupId;
  49 + }
  50 +
  51 + /** Not-null value; ensure this value is available before it is saved to the database. */
  52 + public void setGroupId(@NotNull String GroupId) {
  53 + this.GroupId = GroupId;
  54 + }
  55 +
  56 + public String getGroupName() {
  57 + return GroupName;
  58 + }
  59 +
  60 + public void setGroupName(String GroupName) {
  61 + this.GroupName = GroupName;
  62 + }
  63 +
  64 + public String getGroupFaceUrl() {
  65 + return GroupFaceUrl;
  66 + }
  67 +
  68 + public void setGroupFaceUrl(String GroupFaceUrl) {
  69 + this.GroupFaceUrl = GroupFaceUrl;
  70 + }
  71 +
  72 + public String getCombineGroupFaceUrl() {
  73 + return CombineGroupFaceUrl;
  74 + }
  75 +
  76 + public void setCombineGroupFaceUrl(String CombineGroupFaceUrl) {
  77 + this.CombineGroupFaceUrl = CombineGroupFaceUrl;
  78 + }
  79 +
  80 + // KEEP METHODS - put your custom methods here
  81 + // KEEP METHODS END
  82 +
  83 +}
core/database/src/main/java/com/cnlive/database/bean/IMGroupMembersList.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +
  7 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  8 +
  9 +// KEEP INCLUDES - put your custom includes here
  10 +// KEEP INCLUDES END
  11 +
  12 +/**
  13 + * Entity mapped to table "IMGROUP_MEMBERS_LIST".
  14 + */
  15 +@Entity
  16 +public class IMGroupMembersList {
  17 +
  18 + @Id(autoincrement = true)
  19 + private Long id;
  20 + private String GroupId;
  21 + private String memberId;
  22 + private String memberRemark;
  23 + private String memberFaceUrl;
  24 + private String memberNick;
  25 + private String memberRoleType;
  26 + private String memberNameCard;
  27 +
  28 + // KEEP FIELDS - put your custom fields here
  29 + // KEEP FIELDS END
  30 +
  31 + @Generated(hash = 167732717)
  32 + public IMGroupMembersList() {
  33 + }
  34 +
  35 + public IMGroupMembersList(Long id) {
  36 + this.id = id;
  37 + }
  38 +
  39 + @Generated(hash = 404302734)
  40 + public IMGroupMembersList(Long id, String GroupId, String memberId, String memberRemark, String memberFaceUrl, String memberNick, String memberRoleType, String memberNameCard) {
  41 + this.id = id;
  42 + this.GroupId = GroupId;
  43 + this.memberId = memberId;
  44 + this.memberRemark = memberRemark;
  45 + this.memberFaceUrl = memberFaceUrl;
  46 + this.memberNick = memberNick;
  47 + this.memberRoleType = memberRoleType;
  48 + this.memberNameCard = memberNameCard;
  49 + }
  50 +
  51 + public Long getId() {
  52 + return id;
  53 + }
  54 +
  55 + public void setId(Long id) {
  56 + this.id = id;
  57 + }
  58 +
  59 + public String getGroupId() {
  60 + return GroupId;
  61 + }
  62 +
  63 + public void setGroupId(String GroupId) {
  64 + this.GroupId = GroupId;
  65 + }
  66 +
  67 + public String getMemberId() {
  68 + return memberId;
  69 + }
  70 +
  71 + public void setMemberId(String memberId) {
  72 + this.memberId = memberId;
  73 + }
  74 +
  75 + public String getMemberRemark() {
  76 + return memberRemark;
  77 + }
  78 +
  79 + public void setMemberRemark(String memberRemark) {
  80 + this.memberRemark = memberRemark;
  81 + }
  82 +
  83 + public String getMemberFaceUrl() {
  84 + return memberFaceUrl;
  85 + }
  86 +
  87 + public void setMemberFaceUrl(String memberFaceUrl) {
  88 + this.memberFaceUrl = memberFaceUrl;
  89 + }
  90 +
  91 + public String getMemberNick() {
  92 + return memberNick;
  93 + }
  94 +
  95 + public void setMemberNick(String memberNick) {
  96 + this.memberNick = memberNick;
  97 + }
  98 +
  99 + public String getMemberRoleType() {
  100 + return memberRoleType;
  101 + }
  102 +
  103 + public void setMemberRoleType(String memberRoleType) {
  104 + this.memberRoleType = memberRoleType;
  105 + }
  106 +
  107 + public String getMemberNameCard() {
  108 + return memberNameCard;
  109 + }
  110 +
  111 + public void setMemberNameCard(String memberNameCard) {
  112 + this.memberNameCard = memberNameCard;
  113 + }
  114 +
  115 + // KEEP METHODS - put your custom methods here
  116 + // KEEP METHODS END
  117 +
  118 +}
core/database/src/main/java/com/cnlive/database/bean/IMGroupMembersManagerList.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +
  7 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  8 +
  9 +// KEEP INCLUDES - put your custom includes here
  10 +// KEEP INCLUDES END
  11 +
  12 +/**
  13 + * Entity mapped to table "IMGROUP_MEMBERS_MANAGER_LIST".
  14 + */
  15 +@Entity
  16 +public class IMGroupMembersManagerList {
  17 +
  18 + @Id(autoincrement = true)
  19 + private Long id;
  20 + private String GroupId;
  21 + private String memberId;
  22 +
  23 + // KEEP FIELDS - put your custom fields here
  24 + // KEEP FIELDS END
  25 +
  26 + @Generated(hash = 1327955001)
  27 + public IMGroupMembersManagerList() {
  28 + }
  29 +
  30 + public IMGroupMembersManagerList(Long id) {
  31 + this.id = id;
  32 + }
  33 +
  34 + @Generated(hash = 1013490095)
  35 + public IMGroupMembersManagerList(Long id, String GroupId, String memberId) {
  36 + this.id = id;
  37 + this.GroupId = GroupId;
  38 + this.memberId = memberId;
  39 + }
  40 +
  41 + public Long getId() {
  42 + return id;
  43 + }
  44 +
  45 + public void setId(Long id) {
  46 + this.id = id;
  47 + }
  48 +
  49 + public String getGroupId() {
  50 + return GroupId;
  51 + }
  52 +
  53 + public void setGroupId(String GroupId) {
  54 + this.GroupId = GroupId;
  55 + }
  56 +
  57 + public String getMemberId() {
  58 + return memberId;
  59 + }
  60 +
  61 + public void setMemberId(String memberId) {
  62 + this.memberId = memberId;
  63 + }
  64 +
  65 + // KEEP METHODS - put your custom methods here
  66 + // KEEP METHODS END
  67 +
  68 +}
core/database/src/main/java/com/cnlive/database/bean/IMUserInfo.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "IMUSER_INFO".
  15 + */
  16 +@Entity
  17 +public class IMUserInfo {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String UserId;
  22 + private String NickName;
  23 + private String Remark;
  24 + private String FaceUrl;
  25 +
  26 + // KEEP FIELDS - put your custom fields here
  27 + // KEEP FIELDS END
  28 +
  29 + @Generated(hash = 699328686)
  30 + public IMUserInfo() {
  31 + }
  32 +
  33 + public IMUserInfo(String UserId) {
  34 + this.UserId = UserId;
  35 + }
  36 +
  37 + @Generated(hash = 1445813298)
  38 + public IMUserInfo(@NotNull String UserId, String NickName, String Remark,
  39 + String FaceUrl) {
  40 + this.UserId = UserId;
  41 + this.NickName = NickName;
  42 + this.Remark = Remark;
  43 + this.FaceUrl = FaceUrl;
  44 + }
  45 +
  46 + @NotNull
  47 + public String getUserId() {
  48 + return UserId;
  49 + }
  50 +
  51 + /** Not-null value; ensure this value is available before it is saved to the database. */
  52 + public void setUserId(@NotNull String UserId) {
  53 + this.UserId = UserId;
  54 + }
  55 +
  56 + public String getNickName() {
  57 + return NickName;
  58 + }
  59 +
  60 + public void setNickName(String NickName) {
  61 + this.NickName = NickName;
  62 + }
  63 +
  64 + public String getRemark() {
  65 + return Remark;
  66 + }
  67 +
  68 + public void setRemark(String Remark) {
  69 + this.Remark = Remark;
  70 + }
  71 +
  72 + public String getFaceUrl() {
  73 + return FaceUrl;
  74 + }
  75 +
  76 + public void setFaceUrl(String FaceUrl) {
  77 + this.FaceUrl = FaceUrl;
  78 + }
  79 +
  80 + // KEEP METHODS - put your custom methods here
  81 + // KEEP METHODS END
  82 +
  83 +}
core/database/src/main/java/com/cnlive/database/bean/LaunchAdInfo.java 0 โ†’ 100644
  1 +package com.cnlive.database.bean;
  2 +
  3 +import org.greenrobot.greendao.annotation.Entity;
  4 +import org.greenrobot.greendao.annotation.Generated;
  5 +import org.greenrobot.greendao.annotation.Id;
  6 +import org.greenrobot.greendao.annotation.NotNull;
  7 +
  8 +// THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS
  9 +
  10 +// KEEP INCLUDES - put your custom includes here
  11 +// KEEP INCLUDES END
  12 +
  13 +/**
  14 + * Entity mapped to table "LAUNCH_AD_INFO".
  15 + */
  16 +@Entity
  17 +public class LaunchAdInfo {
  18 +
  19 + @Id
  20 + @NotNull
  21 + private String appid;
  22 + private String id;
  23 + private String wjjAdUrl;
  24 + private String wjjAdImgUrl;
  25 + private Boolean wjjAdv;
  26 + private String wjjAdImgPath;
  27 + private Integer duration;
  28 + private Integer modifyStatus;
  29 +
  30 + // KEEP FIELDS - put your custom fields here
  31 + // KEEP FIELDS END
  32 +
  33 + @Generated(hash = 727472882)
  34 + public LaunchAdInfo() {
  35 + }
  36 +
  37 + public LaunchAdInfo(String appid) {
  38 + this.appid = appid;
  39 + }
  40 +
  41 + @Generated(hash = 1914070053)
  42 + public LaunchAdInfo(@NotNull String appid, String id, String wjjAdUrl, String wjjAdImgUrl, Boolean wjjAdv, String wjjAdImgPath, Integer duration,
  43 + Integer modifyStatus) {
  44 + this.appid = appid;
  45 + this.id = id;
  46 + this.wjjAdUrl = wjjAdUrl;
  47 + this.wjjAdImgUrl = wjjAdImgUrl;
  48 + this.wjjAdv = wjjAdv;
  49 + this.wjjAdImgPath = wjjAdImgPath;
  50 + this.duration = duration;
  51 + this.modifyStatus = modifyStatus;
  52 + }
  53 +
  54 + @NotNull
  55 + public String getAppid() {
  56 + return appid;
  57 + }
  58 +
  59 + /** Not-null value; ensure this value is available before it is saved to the database. */
  60 + public void setAppid(@NotNull String appid) {
  61 + this.appid = appid;
  62 + }
  63 +
  64 + public String getId() {
  65 + return id;
  66 + }
  67 +
  68 + public void setId(String id) {
  69 + this.id = id;
  70 + }
  71 +
  72 + public String getWjjAdUrl() {
  73 + return wjjAdUrl;
  74 + }
  75 +
  76 + public void setWjjAdUrl(String wjjAdUrl) {
  77 + this.wjjAdUrl = wjjAdUrl;
  78 + }
  79 +
  80 + public String getWjjAdImgUrl() {
  81 + return wjjAdImgUrl;
  82 + }
  83 +
  84 + public void setWjjAdImgUrl(String wjjAdImgUrl) {
  85 + this.wjjAdImgUrl = wjjAdImgUrl;
  86 + }
  87 +
  88 + public Boolean getWjjAdv() {
  89 + return wjjAdv;
  90 + }
  91 +
  92 + public void setWjjAdv(Boolean wjjAdv) {
  93 + this.wjjAdv = wjjAdv;
  94 + }
  95 +
  96 + public String getWjjAdImgPath() {
  97 + return wjjAdImgPath;
  98 + }
  99 +
  100 + public void setWjjAdImgPath(String wjjAdImgPath) {
  101 + this.wjjAdImgPath = wjjAdImgPath;
  102 + }
  103 +
  104 + public Integer getDuration() {
  105 + return duration;
  106 + }
  107 +
  108 + public void setDuration(Integer duration) {
  109 + this.duration = duration;
  110 + }
  111 +
  112 + public Integer getModifyStatus() {
  113 + return modifyStatus;
  114 + }
  115 +
  116 + public void setModifyStatus(Integer modifyStatus) {
  117 + this.modifyStatus = modifyStatus;
  118 + }
  119 +
  120 + // KEEP METHODS - put your custom methods here
  121 + // KEEP METHODS END
  122 +
  123 +}