Commit 7373ddeec12686db33f9d10499cc17db45bed8e9

Authored by 韩亚云
1 parent 850305f8

包整理

Showing 63 changed files with 4 additions and 4732 deletions

Too many changes to show.

To preserve performance only 63 of 380 files are displayed.

.idea/gradle.xml
@@ -3,6 +3,9 @@ @@ -3,6 +3,9 @@
3 <component name="GradleSettings"> 3 <component name="GradleSettings">
4 <option name="linkedExternalProjectsSettings"> 4 <option name="linkedExternalProjectsSettings">
5 <GradleProjectSettings> 5 <GradleProjectSettings>
  6 + <compositeConfiguration>
  7 + <compositeBuild compositeDefinitionSource="SCRIPT" />
  8 + </compositeConfiguration>
6 <option name="distributionType" value="DEFAULT_WRAPPED" /> 9 <option name="distributionType" value="DEFAULT_WRAPPED" />
7 <option name="externalProjectPath" value="$PROJECT_DIR$" /> 10 <option name="externalProjectPath" value="$PROJECT_DIR$" />
8 <option name="modules"> 11 <option name="modules">
app_user/.gitignore deleted 100644 → 0
1 -/build  
app_user/build.gradle deleted 100644 → 0
1 -apply plugin: 'com.android.library'  
2 -  
3 -android {  
4 - compileSdkVersion rootProject.ext.compileSdkVersion  
5 - buildToolsVersion rootProject.ext.buildToolsVersion  
6 -  
7 - defaultConfig {  
8 - minSdkVersion rootProject.ext.minSdkVersion  
9 - targetSdkVersion rootProject.ext.targetSdkVersion  
10 - versionCode rootProject.ext.versionCode  
11 - versionName rootProject.ext.versionName  
12 - }  
13 -  
14 - buildTypes {  
15 - debug{  
16 - resValue("string", "ACCOUNT_LABEL", "网家家 内测")  
17 - resValue("string", "ACCOUNT_TYPE", "com.cnlive.strike.debug.AccountType")  
18 - resValue("string", "ACCOUNT_PROVIDE", "com.cnlive.strike.debug.AccountProvide")  
19 - }  
20 - release {  
21 - resValue("string", "ACCOUNT_LABEL", "网家家")  
22 - resValue("string", "ACCOUNT_TYPE", "com.cnlive.strike.AccountType")  
23 - resValue("string", "ACCOUNT_PROVIDE", "com.cnlive.strike.AccountProvide")  
24 - }  
25 - }  
26 -  
27 - compileOptions {  
28 - sourceCompatibility JavaVersion.VERSION_1_8  
29 - targetCompatibility JavaVersion.VERSION_1_8  
30 - }  
31 -  
32 -}  
33 -  
34 -dependencies {  
35 - implementation fileTree(dir: 'libs', include: ['*.jar'])  
36 - implementation "com.android.support:appcompat-v7:$rootProject.appcompatV7"  
37 - //视讯云SDK  
38 - implementation "com.cnlive:lib_cnutil:$rootProject.libCnUtil"  
39 -  
40 - implementation "com.cnlive.libs:base:$rootProject.libBase"  
41 - implementation project(':lib_network')  
42 -}  
app_user/proguard-rules.pro deleted 100644 → 0
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  
app_user/src/debug/res/mipmap-hdpi/icon_account.png deleted 100644 → 0

4.41 KB

app_user/src/debug/res/mipmap-ldpi/icon_account.png deleted 100644 → 0

2.17 KB

app_user/src/debug/res/mipmap-xhdpi/icon_account.png deleted 100644 → 0

5.93 KB

app_user/src/debug/res/mipmap-xxhdpi/icon_account.png deleted 100644 → 0

9.25 KB

app_user/src/debug/res/mipmap-xxxhdpi/icon_account.png deleted 100644 → 0

13.2 KB

app_user/src/main/AndroidManifest.xml deleted 100644 → 0
1 -<manifest xmlns:android="http://schemas.android.com/apk/res/android"  
2 - xmlns:tools="http://schemas.android.com/tools"  
3 - package="com.cnlive.strike.user.auth">  
4 -  
5 - <!--账户自动更新 App保活相关-->  
6 - <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />  
7 - <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />  
8 - <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />  
9 - <uses-permission android:name="android.permission.ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED" />  
10 - <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />  
11 - <!--账户权限相关-->  
12 - <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />  
13 - <uses-permission android:name="android.permission.GET_ACCOUNTS" />  
14 - <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />  
15 - <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />  
16 - <uses-permission  
17 - android:name="android.permission.ACCOUNT_MANAGER"  
18 - tools:ignore="ProtectedPermissions" />  
19 -  
20 - <application>  
21 - <activity android:name=".AccountAuthenticatorActivity"/>  
22 -  
23 - <service  
24 - android:name=".UserAccountService"  
25 - tools:ignore="ExportedService">  
26 - <intent-filter>  
27 - <action android:name="android.accounts.AccountAuthenticator" />  
28 - </intent-filter>  
29 -  
30 - <meta-data  
31 - android:name="android.accounts.AccountAuthenticator"  
32 - android:resource="@xml/authenticator" />  
33 - </service>  
34 -  
35 - <service  
36 - android:name=".UserSyncService"  
37 - android:exported="true">  
38 - <intent-filter>  
39 - <action android:name="android.content.SyncAdapter" />  
40 - </intent-filter>  
41 -  
42 - <meta-data  
43 - android:name="android.content.SyncAdapter"  
44 - android:resource="@xml/account_sync_adapter" />  
45 - </service>  
46 -  
47 - <provider  
48 - android:name=".UserAccountProvider"  
49 - android:authorities="@string/ACCOUNT_PROVIDE"  
50 - android:exported="false"  
51 - android:syncable="true" />  
52 - </application>  
53 -</manifest>  
app_user/src/main/java/com/cnlive/strike/user/UserUtilAction.java deleted 100644 → 0
1 -package com.cnlive.strike.user;  
2 -  
3 -import android.content.Context;  
4 -import android.os.Environment;  
5 -import android.text.TextUtils;  
6 -  
7 -import com.cnlive.libs.base.application.AppConfig;  
8 -import com.cnlive.libs.base.logic.Logic;  
9 -import com.cnlive.libs.base.logic.callback.DataCallback;  
10 -import com.cnlive.libs.data.network.Subscriber;  
11 -import com.cnlive.strike.data.network.api.ApiRequest;  
12 -import com.cnlive.strike.data.network.api.ApiServiceOpen;  
13 -import com.cnlive.strike.data.network.api.ApiSubscriber;  
14 -import com.cnlive.strike.data.network.model.BaseInfo;  
15 -import com.cnlive.strike.data.network.model.FaceData;  
16 -import com.cnlive.strike.data.network.model.TokenData;  
17 -import com.cnlive.strike.data.network.model.UserData;  
18 -  
19 -import java.io.File;  
20 -import java.util.ArrayList;  
21 -import java.util.HashMap;  
22 -import java.util.List;  
23 -import java.util.Map;  
24 -  
25 -import io.reactivex.Flowable;  
26 -import io.reactivex.android.schedulers.AndroidSchedulers;  
27 -import io.reactivex.disposables.Disposable;  
28 -import io.reactivex.schedulers.Schedulers;  
29 -import okhttp3.MediaType;  
30 -import okhttp3.MultipartBody;  
31 -import okhttp3.RequestBody;  
32 -import top.zibin.luban.Luban;  
33 -  
34 -import static com.cnlive.libs.base.logic.Config.SUCCESS;  
35 -  
36 -  
37 -/**  
38 - * Created by Lynn on 2018/10/15.  
39 - */  
40 -  
41 -public class UserUtilAction {  
42 - public static int TOKEN_ERROR_CODE = -900001;  
43 - public static String TOKEN_ERROR_MSG = "用户token为空";  
44 -  
45 - /**  
46 - * 快捷登录前发送手机验证码  
47 - *  
48 - * @param context  
49 - * @param mobile 手机号  
50 - * @return  
51 - */  
52 - public static Logic.Action<Object, BaseInfo> sendMsgBefQuickLoginAction(final Context context, final String mobile, String countryCode) {  
53 - return (data, callback) -> {  
54 - Map<String, String> requestMap = new HashMap<>();  
55 - requestMap.put("appId", AppConfig.getAppId());  
56 - requestMap.put("mobile", mobile);  
57 - requestMap.put("countryCode", countryCode);  
58 - requestMap.put("clientPlat", "a");  
59 - return ApiRequest.service(ApiServiceOpen.class, service -> service.sendVerifyCodeBefQuickLogin(requestMap)).subscribe(context, callback);  
60 - };  
61 -  
62 - }  
63 -  
64 - /**  
65 - * 快捷登录  
66 - *  
67 - * @param context  
68 - * @param userPhone 手机号  
69 - * @param userCode 验证码  
70 - * @return  
71 - */  
72 - public static Logic.Action<Object, BaseInfo<UserData>> quickLoginAction(Context context, String userPhone, String userCode, String countryCode) {  
73 - return (data, callback) -> {  
74 - Map<String, String> requestMap = new HashMap<>();  
75 - requestMap.put("appId", AppConfig.getAppId());  
76 - requestMap.put("userName", userPhone);  
77 - requestMap.put("verificationCode", userCode);  
78 - requestMap.put("uuid", AppConfig.getAppUUID());  
79 - requestMap.put("frmId", AppConfig.getAppChannel());  
80 - requestMap.put("countryCode", countryCode);  
81 - requestMap.put("clientPlat", "a");  
82 - return ApiRequest.service(ApiServiceOpen.class, service -> service.quickLogin(requestMap)).subscribe(context, callback);  
83 - };  
84 - }  
85 -  
86 - /**  
87 - * 登录  
88 - *  
89 - * @param context  
90 - * @param userName 用户名  
91 - * @param pwd 密码  
92 - * @return  
93 - */  
94 - public static Logic.Action<Object, BaseInfo<UserData>> loginAction(Context context, String userName, String pwd) {  
95 - return (data, callback) -> {  
96 - Map<String, String> map = new HashMap<>();  
97 - map.put("appId", AppConfig.getAppId());  
98 - map.put("userName", userName);  
99 - map.put("pwd", pwd);  
100 - map.put("uuid", AppConfig.getAppUUID());  
101 - map.put("frmId", "");  
102 - map.put("clientPlat", "a");  
103 - return ApiRequest.service(ApiServiceOpen.class, service -> service.login(map)).subscribe(context, callback);  
104 - };  
105 - }  
106 -  
107 - /**  
108 - * 查询用户信息  
109 - *  
110 - * @param context  
111 - * @param userId 用户ID  
112 - * @param srcUid 被查询用户ID  
113 - * @param token 查询者平台TOKEN  
114 - * @return  
115 - */  
116 - public static Logic.Action<Object, BaseInfo<UserData>> queryUserInfo(Context context, String userId, String srcUid, String token) {  
117 - return (data, callback) -> {  
118 - Map<String, String> map = new HashMap<>();  
119 - map.put("appId", AppConfig.getAppId());  
120 - map.put("uid", userId);  
121 - map.put("srcUid", srcUid);  
122 - map.put("clientPlat", "a");  
123 - map.put("token", token);  
124 - if (TextUtils.isEmpty(token)) {  
125 - callback.callback(TOKEN_ERROR_CODE, TOKEN_ERROR_MSG, null);  
126 - }  
127 - return ApiRequest.service(ApiServiceOpen.class, service -> service.queryUserInfo(map)).subscribe(context, callback);  
128 - };  
129 - }  
130 -  
131 - /**  
132 - * 修改用户附加信息  
133 - *  
134 - * @param context  
135 - * @param userId 用户id  
136 - * @param extInfo 扩展信息  
137 - * @param token 平台token  
138 - * @return  
139 - */  
140 - public static Logic.Action<Object, BaseInfo> updateUserExtInfo(Context context, String userId, String extInfo, String token) {  
141 - return (data, callback) -> {  
142 - Map<String, String> map = new HashMap<>();  
143 - map.put("appId", AppConfig.getAppId());  
144 - map.put("uid", userId);  
145 - map.put("extInfo", extInfo);  
146 - map.put("token", token);  
147 - map.put("clientPlat", "a");  
148 - if (TextUtils.isEmpty(token)) {  
149 - callback.callback(TOKEN_ERROR_CODE, TOKEN_ERROR_MSG, null);  
150 - }  
151 - return ApiRequest.service(ApiServiceOpen.class, service -> service.updateUserExtInfo(map)).subscribe(context, callback);  
152 - };  
153 - }  
154 -  
155 - /**  
156 - * 修改用户单项信息  
157 - *  
158 - * @param context  
159 - * @param uid 用户Id  
160 - * @param type nickName-昵称,gender-性别,email-邮箱, location-联系方式  
161 - * @param value 对应的信息,性别,m:男、f:女、n:未知  
162 - * @param token 平台TOKEN  
163 - * @return  
164 - */  
165 - public static Logic.Action<Object, BaseInfo> modifyUserInfo(Context context, String uid, String type, String value, String token) {  
166 - return (data, callback) -> {  
167 - Map<String, String> map = new HashMap<>();  
168 - map.put("appId", AppConfig.getAppId());  
169 - map.put("uid", uid);  
170 - map.put("type", type);  
171 - map.put("value", value);  
172 - map.put("clientPlat", "a");  
173 - map.put("token", token);  
174 - if (TextUtils.isEmpty(token)) {  
175 - callback.callback(TOKEN_ERROR_CODE, TOKEN_ERROR_MSG, null);  
176 - }  
177 - return ApiRequest.service(ApiServiceOpen.class, service -> service.modifyUserInfo(map)).subscribe(context, callback);  
178 - };  
179 - }  
180 -  
181 - /**  
182 - * 注册或修改手机号前发手机验证码  
183 - *  
184 - * @param context  
185 - * @param mobile 手机号  
186 - * @return  
187 - */  
188 - public static Logic.Action<Object, BaseInfo> sendVerifyCodeForUnRegistered(Context context, String mobile, String countryCode) {  
189 - return (data, callback) -> {  
190 - Map<String, String> map = new HashMap<>();  
191 - map.put("appId", AppConfig.getAppId());  
192 - map.put("mobile", mobile);  
193 - map.put("clientPlat", "a");  
194 - map.put("countryCode", countryCode);  
195 - return ApiRequest.service(ApiServiceOpen.class, service -> service.sendVerifyCodeForUnRegistered(map)).subscribe(context, callback);  
196 - };  
197 - }  
198 -  
199 - /**  
200 - * 更新手机号  
201 - *  
202 - * @param context  
203 - * @param uid 用户ID  
204 - * @param mobile 手机号  
205 - * @param verificationCode 手机验证码  
206 - * @param token 平台TOKEN  
207 - * @return  
208 - */  
209 - public static Logic.Action<Object, BaseInfo> updateMobile(Context context, String uid, String mobile, String verificationCode, String token, String countryCode) {  
210 - return (data, callback) -> {  
211 - Map<String, String> map = new HashMap<>();  
212 - map.put("appId", AppConfig.getAppId());  
213 - map.put("uid", uid);  
214 - map.put("mobile", mobile);  
215 - map.put("verificationCode", verificationCode);  
216 - map.put("clientPlat", "a");  
217 - map.put("countryCode", countryCode);  
218 - map.put("token", token);  
219 - if (TextUtils.isEmpty(token)) {  
220 - callback.callback(TOKEN_ERROR_CODE, TOKEN_ERROR_MSG, null);  
221 - }  
222 - return ApiRequest.service(ApiServiceOpen.class, service -> service.updateMobile(map)).subscribe(context, callback);  
223 - };  
224 - }  
225 -  
226 - /**  
227 - * 注册  
228 - *  
229 - * @param context  
230 - * @param userName 邮箱或手机  
231 - * @param pwd 密码  
232 - * @param verificationCode 手机验证码(手机号注册时必填)  
233 - * @return  
234 - */  
235 - public static Logic.Action<Object, BaseInfo<UserData>> register(Context context, String userName, String pwd, String verificationCode) {  
236 - return (data, callback) -> {  
237 - Map<String, String> map = new HashMap<>();  
238 - map.put("appId", AppConfig.getAppId());  
239 - map.put("userName", userName);  
240 - map.put("pwd", pwd);  
241 - map.put("verificationCode", verificationCode);  
242 - map.put("invitationCode", "");  
243 - map.put("uuid", AppConfig.getAppUUID());  
244 - map.put("frmId", "");  
245 - map.put("clientPlat", "a");  
246 - return ApiRequest.service(ApiServiceOpen.class, service -> service.register(map)).subscribe(context, callback);  
247 - };  
248 - }  
249 -  
250 -  
251 - /**  
252 - * 获取access_token  
253 - *  
254 - * @param context  
255 - * @return  
256 - */  
257 - public static Logic.Action<Object, BaseInfo<TokenData>> accessToken(Context context) {  
258 - return (data, callback) -> {  
259 - Map<String, String> map = new HashMap<>();  
260 - map.put("appId", AppConfig.getAppId());  
261 - map.put("secret", AppConfig.getAppSceret());  
262 - return ApiRequest.service(ApiServiceOpen.class, service -> service.accessToken(map)).subscribe(context, callback);  
263 - };  
264 - }  
265 -  
266 - /**  
267 - * 上传头像  
268 - *  
269 - * @param context  
270 - * @param uid 用户ID  
271 - * @param face 头像文件  
272 - * @param token 平台TOKEN  
273 - * @param access_token  
274 - * @return  
275 - */  
276 - public static Disposable updateUserFace(Context context, String uid, File face, String token, String access_token, DataCallback<BaseInfo<FaceData>> callback) {  
277 - Map<String, RequestBody> params = new HashMap<>();  
278 -  
279 - if (TextUtils.isEmpty(token)) {  
280 - callback.callback(TOKEN_ERROR_CODE, TOKEN_ERROR_MSG, null);  
281 - }  
282 -  
283 - params.put("uid", getRequestString(uid));  
284 - params.put("clientPlat", getRequestString("a"));  
285 - params.put("token", getRequestString(token));  
286 - params.put("access_token", getRequestString(access_token));  
287 -  
288 - RequestBody requestFace = RequestBody.create(MediaType.parse("multipart/form-data"), face);  
289 - MultipartBody.Part faceBody = MultipartBody.Part.createFormData("face", face.getName(), requestFace);  
290 -  
291 - List<MultipartBody.Part> parts = new ArrayList<>();  
292 - parts.add(faceBody);  
293 -  
294 -  
295 - Subscriber<BaseInfo<FaceData>> subscriber = new Subscriber<BaseInfo<FaceData>>(context, ApiSubscriber.subscriberBuild) {  
296 - @Override  
297 - public void onCompleted(String s, String s1, BaseInfo<FaceData> faceDataBaseInfo) {  
298 - if (callback == null) return;  
299 - callback.callback(SUCCESS, "", faceDataBaseInfo);  
300 - }  
301 -  
302 - @Override  
303 - public void onError(String s, String s1) {  
304 - if (callback == null) return;  
305 - int errorCode = -1;  
306 - try {  
307 - errorCode = Integer.valueOf(s);  
308 - } catch (Exception ignored) {  
309 - } finally {  
310 - callback.callback(errorCode, s1, null);  
311 - }  
312 - }  
313 - };  
314 -  
315 - return ApiRequest.subscribe(ApiRequest.service(ApiServiceOpen.class).updateUserFace(params, parts), subscriber);  
316 -// return ApiRequest.service(ApiServiceOpen.class, service -> service.updateUserFace(params, parts)).subscribe(context, callback);  
317 - }  
318 -  
319 - private static RequestBody getRequestString(String value) {  
320 - RequestBody requestString = RequestBody.create(MediaType.parse("text/plain"), value);  
321 - return requestString;  
322 - }  
323 -  
324 - public static Disposable zipFiles(Context context, List<String> imageFiles, DataCallback<List<String>> callback) {  
325 - if (imageFiles == null || imageFiles.size() == 0) {  
326 - callback.callback(0, "", imageFiles);  
327 - } else {  
328 - return Flowable.just(imageFiles)  
329 - .observeOn(Schedulers.io())  
330 - .map(list -> Luban.with(context)  
331 - .ignoreBy(500)  
332 - .setTargetDir(getPath())  
333 - .load(list)  
334 - .get())  
335 - .observeOn(AndroidSchedulers.mainThread())  
336 - .doOnError(throwable -> callback.callback(0, "", imageFiles))  
337 - .onErrorResumeNext(Flowable.empty())  
338 - .subscribe(  
339 - list -> {  
340 - List<String> files = new ArrayList<>();  
341 - for (File file : list) files.add(file.getPath());  
342 - callback.callback(0, "", files);  
343 - });  
344 - }  
345 - return null;  
346 - }  
347 -  
348 - private static String getPath() {  
349 - String path = Environment.getExternalStorageDirectory() + "/strike/image/";  
350 - File file = new File(path);  
351 - if (file.mkdirs()) {  
352 - return path;  
353 - }  
354 - return path;  
355 - }  
356 -}  
app_user/src/main/java/com/cnlive/strike/user/auth/AccountAuthenticatorActivity.java deleted 100644 → 0
1 -/*  
2 - * Copyright (C) 2009 The Android Open Source Project  
3 - *  
4 - * Licensed under the Apache License, Version 2.0 (the "License");  
5 - * you may not use this file except in compliance with the License.  
6 - * You may obtain a copy of the License at  
7 - *  
8 - * http://www.apache.org/licenses/LICENSE-2.0  
9 - *  
10 - * Unless required by applicable law or agreed to in writing, software  
11 - * distributed under the License is distributed on an "AS IS" BASIS,  
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
13 - * See the License for the specific language governing permissions and  
14 - * limitations under the License.  
15 - */  
16 -  
17 -package com.cnlive.strike.user.auth;  
18 -  
19 -import android.accounts.AccountAuthenticatorResponse;  
20 -import android.accounts.AccountManager;  
21 -import android.os.Bundle;  
22 -import android.support.v7.app.AppCompatActivity;  
23 -  
24 -/**  
25 - * Base class for implementing an Activity that is used to help implement an  
26 - * AbstractAccountAuthenticator. If the AbstractAccountAuthenticator needs to use an activity  
27 - * to handle the request then it can have the activity extend AccountAuthenticatorActivity.  
28 - * The AbstractAccountAuthenticator passes in the response to the intent using the following:  
29 - * <pre>  
30 - * intent.putExtra({@link AccountManager#KEY_ACCOUNT_AUTHENTICATOR_RESPONSE}, response);  
31 - * </pre>  
32 - * The activity then sets the result that is to be handed to the response via  
33 - * {@link #setAccountAuthenticatorResult(Bundle)}.  
34 - * This result will be sent as the result of the request when the activity finishes. If this  
35 - * is never set or if it is set to null then error {@link AccountManager#ERROR_CODE_CANCELED}  
36 - * will be called on the response.  
37 - */  
38 -public class AccountAuthenticatorActivity extends AppCompatActivity {  
39 - private AccountAuthenticatorResponse mAccountAuthenticatorResponse = null;  
40 - private Bundle mResultBundle = null;  
41 -  
42 - /**  
43 - * Set the result that is to be sent as the result of the request that caused this  
44 - * Activity to be launched. If result is null or this method is never called then  
45 - * the request will be canceled.  
46 - *  
47 - * @param result this is returned as the result of the AbstractAccountAuthenticator request  
48 - */  
49 - public final void setAccountAuthenticatorResult(Bundle result) {  
50 - mResultBundle = result;  
51 - }  
52 -  
53 - /**  
54 - * Retreives the AccountAuthenticatorResponse from either the intent of the icicle, if the  
55 - * icicle is non-zero.  
56 - *  
57 - * @param icicle the save instance data of this Activity, may be null  
58 - */  
59 - protected void onCreate(Bundle icicle) {  
60 - super.onCreate(icicle);  
61 -  
62 - mAccountAuthenticatorResponse =  
63 - getIntent().getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE);  
64 -  
65 - if (mAccountAuthenticatorResponse != null) {  
66 - mAccountAuthenticatorResponse.onRequestContinued();  
67 - }  
68 - }  
69 -  
70 - /**  
71 - * Sends the result or a Constants.ERROR_CODE_CANCELED error if a result isn't present.  
72 - */  
73 - public void finish() {  
74 - if (mAccountAuthenticatorResponse != null) {  
75 - // send the result bundle back if set, otherwise send an error.  
76 - if (mResultBundle != null) {  
77 - mAccountAuthenticatorResponse.onResult(mResultBundle);  
78 - } else {  
79 - mAccountAuthenticatorResponse.onError(AccountManager.ERROR_CODE_CANCELED,  
80 - "canceled");  
81 - }  
82 - mAccountAuthenticatorResponse = null;  
83 - }  
84 - super.finish();  
85 - }  
86 -}  
app_user/src/main/java/com/cnlive/strike/user/auth/UserAccountAuthenticator.java deleted 100644 → 0
1 -package com.cnlive.strike.user.auth;  
2 -  
3 -import android.accounts.AbstractAccountAuthenticator;  
4 -import android.accounts.Account;  
5 -import android.accounts.AccountAuthenticatorResponse;  
6 -import android.accounts.AccountManager;  
7 -import android.accounts.NetworkErrorException;  
8 -import android.content.Context;  
9 -import android.content.Intent;  
10 -import android.os.Bundle;  
11 -  
12 -import com.cnlive.libs.base.util.LogUtil;  
13 -  
14 -public class UserAccountAuthenticator extends AbstractAccountAuthenticator {  
15 - private String _tag = "UserAccountAuthenticator";  
16 - private Context _context;  
17 -  
18 - public UserAccountAuthenticator(Context context) {  
19 - super(context);  
20 - _context = context;  
21 - }  
22 -  
23 - public Bundle addAccount(AccountAuthenticatorResponse response, String accountType, String authTokenType, String[] requiredFeatures, Bundle options) {  
24 - LogUtil.d(_tag, accountType + " - " + authTokenType);  
25 - Bundle ret = new Bundle();  
26 - try {  
27 - Class<?> clazz = Class.forName("com.cnlive.strike.moudle.user.ui.activity.LoginActivity");  
28 - Intent intent = new Intent(_context, clazz);  
29 - intent.putExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);  
30 - ret.putParcelable(AccountManager.KEY_INTENT, intent);  
31 - } catch (ClassNotFoundException e) {  
32 - e.printStackTrace();  
33 - }  
34 - return ret;  
35 - }  
36 -  
37 -  
38 - @Override  
39 - public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account, Bundle options) {  
40 - LogUtil.d(_tag, ".confirmCredentials");  
41 - return null;  
42 - }  
43 -  
44 -  
45 - @Override  
46 - public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) {  
47 - LogUtil.d(_tag, ".editProperties");  
48 - return null;  
49 - }  
50 -  
51 -  
52 - @Override  
53 - public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle loginOptions) throws NetworkErrorException {  
54 - LogUtil.d(_tag, ".getAuthToken");  
55 - return null;  
56 - }  
57 -  
58 -  
59 - @Override  
60 - public String getAuthTokenLabel(String authTokenType) {  
61 - LogUtil.d(_tag, ".getAuthTokenLabel");  
62 - return null;  
63 - }  
64 -  
65 -  
66 - @Override  
67 - public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account, String[] features) throws NetworkErrorException {  
68 - LogUtil.d(_tag, ".hasFeatures");  
69 - return null;  
70 - }  
71 -  
72 -  
73 - @Override  
74 - public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account, String authTokenType, Bundle loginOptions) {  
75 - LogUtil.d(_tag, ".updateCredentials");  
76 - return null;  
77 - }  
78 -  
79 -}  
app_user/src/main/java/com/cnlive/strike/user/auth/UserAccountProvider.java deleted 100644 → 0
1 -package com.cnlive.strike.user.auth;  
2 -  
3 -import android.content.ContentProvider;  
4 -import android.content.ContentValues;  
5 -import android.database.Cursor;  
6 -import android.net.Uri;  
7 -import android.support.annotation.Nullable;  
8 -  
9 -public class UserAccountProvider extends ContentProvider {  
10 -  
11 - @Override  
12 - public boolean onCreate() {  
13 - return false;  
14 - }  
15 -  
16 - @Nullable  
17 - @Override  
18 - public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {  
19 - return null;  
20 - }  
21 -  
22 - @Nullable  
23 - @Override  
24 - public String getType(Uri uri) {  
25 - return null;  
26 - }  
27 -  
28 - @Nullable  
29 - @Override  
30 - public Uri insert(Uri uri, ContentValues values) {  
31 - return null;  
32 - }  
33 -  
34 - @Override  
35 - public int delete(Uri uri, String selection, String[] selectionArgs) {  
36 - return 0;  
37 - }  
38 -  
39 - @Override  
40 - public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {  
41 - return 0;  
42 - }  
43 -}  
app_user/src/main/java/com/cnlive/strike/user/auth/UserAccountService.java deleted 100644 → 0
1 -package com.cnlive.strike.user.auth;  
2 -  
3 -import android.app.Service;  
4 -import android.content.Intent;  
5 -import android.os.IBinder;  
6 -  
7 -public class UserAccountService extends Service {  
8 - private UserAccountAuthenticator _saa;  
9 -  
10 - @Override  
11 - public IBinder onBind(Intent intent) {  
12 - IBinder ret = null;  
13 - if (intent.getAction().equals(android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT))  
14 - ret = getMovieAuthenticator().getIBinder();  
15 - return ret;  
16 - }  
17 -  
18 - private UserAccountAuthenticator getMovieAuthenticator() {  
19 - if (_saa == null)  
20 - _saa = new UserAccountAuthenticator(this);  
21 - return _saa;  
22 - }  
23 -}  
app_user/src/main/java/com/cnlive/strike/user/auth/UserService.java deleted 100644 → 0
1 -package com.cnlive.strike.user.auth;  
2 -  
3 -import android.accounts.Account;  
4 -import android.accounts.AccountManager;  
5 -import android.accounts.AccountManagerCallback;  
6 -import android.content.ContentResolver;  
7 -import android.content.Context;  
8 -import android.os.Bundle;  
9 -import android.text.TextUtils;  
10 -  
11 -import com.cnlive.libs.base.application.AppConfig;  
12 -import com.cnlive.libs.util.SharedPreferencesHelper;  
13 -import com.cnlive.strike.data.network.model.UserData;  
14 -import com.cnlive.strike.user.model.CNLiveUserInfo;  
15 -import com.cnlive.strike.user.model.CNLiveUserInfoExt;  
16 -import com.google.gson.Gson;  
17 -  
18 -import java.util.HashMap;  
19 -import java.util.Map;  
20 -  
21 -/**  
22 - * 用户管理类  
23 - */  
24 -public class UserService {  
25 - private final String defaultFaceUrl = "http://wjj.ys1.cnliveimg.com/admin/test/head.png";  
26 -  
27 - private final String baseFaceUrl = "/mobile/images/mobilehead/default/";  
28 -  
29 - private boolean checkDefaultUrl(String url) {  
30 - if (!TextUtils.isEmpty(url) && url.contains(baseFaceUrl)) return true;  
31 - return false;  
32 - }  
33 -  
34 - private final String KEY_DEFAULT_ACCOUNT = "defaultaccount";//用户默认账户  
35 - private final String KEY_USER_DATA_USER_ID = "uid"; //用户uid  
36 - private final String KEY_USER_DATA_NICKNAME = "nickname"; //用户昵称  
37 - private final String KEY_USER_DATA_BIGFACEURL = "bigfaceurl"; //用户头像  
38 - private final String KEY_USER_DATA_FACEURL = "faceurl"; //用户头像  
39 - private final String KEY_USER_DATA_GENDER = "gender"; //用户性别  
40 - private final String KEY_USER_DATA_MOBILE = "mobile"; //用户手机号  
41 - private final String KEY_USER_COUNTRY_CODE = "countryCode";//手机号国家码  
42 - private final String KEY_USER_DATA_EMAIL = "email"; //用户邮箱  
43 - private final String KEY_USER_DATA_LOCATION = "location"; //用户地址  
44 - private final String KEY_USER_TOKEN = "token"; //用户token  
45 - private final String KEY_USER_FIRST_LOGIN = "firstLogin"; //用户token  
46 - private final String KEY_USER_SIGN = "sign"; //用户签名  
47 -  
48 - private static UserService mInstance;  
49 - private Account activeAccount;  
50 - private CNLiveUserInfo activeUserInfo;  
51 - private SharedPreferencesHelper sharedPrefs;  
52 - private AccountManager mAccountManager;  
53 - private String mAccountType, mAccountProvide;  
54 -  
55 - private Map<String, Account> mAccountMap = new HashMap<>();  
56 -  
57 - /**  
58 - * 获取用户管理服务实例  
59 - *  
60 - * @param context 上下文  
61 - * @return 管理对象实例  
62 - */  
63 - public static synchronized UserService getInstance(Context context) {  
64 - if (mInstance == null && context != null)  
65 - mInstance = new UserService(context.getApplicationContext());  
66 - return mInstance;  
67 - }  
68 -  
69 - /**  
70 - * 默认构造函数(单例)  
71 - *  
72 - * @param context  
73 - */  
74 - private UserService(Context context) {  
75 - sharedPrefs = SharedPreferencesHelper.getInstance(context);  
76 - mAccountManager = AccountManager.get(context);  
77 - mAccountType = context.getString(R.string.ACCOUNT_TYPE);  
78 - mAccountProvide = context.getString(R.string.ACCOUNT_PROVIDE);  
79 - //初始化用户列表  
80 - initSystemAccounts();  
81 - //初始化登录用户  
82 - initAppAccount();  
83 - }  
84 -  
85 - /**  
86 - * 初始化系统用户列表  
87 - */  
88 - private void initSystemAccounts() {  
89 - mAccountMap.clear();  
90 - Account[] accounts = mAccountManager.getAccountsByType(mAccountType);  
91 - for (Account account : accounts) {  
92 - mAccountMap.put(account.name, account);  
93 - }  
94 - }  
95 -  
96 - /**  
97 - * 初始化默认系统账号  
98 - */  
99 - private void initAppAccount() {  
100 - String accountName = sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT);  
101 -  
102 - if (mAccountMap.containsKey(accountName)) {  
103 - activeAccount = mAccountMap.get(accountName);  
104 - activeUserInfo = getAccountInfo(activeAccount);  
105 - } else {  
106 - activeAccount = null;  
107 - activeUserInfo = null;  
108 - }  
109 - }  
110 -  
111 - /**  
112 - * 判断App用户登录  
113 - *  
114 - * @return 如果登录返回 true  
115 - */  
116 - public boolean hasAppAccount() {  
117 - String accountName = sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT);  
118 - return mAccountMap.containsKey(accountName) && activeUserInfo != null;  
119 - }  
120 -  
121 - /**  
122 - * 登录App用户 ,录入系统账号信息  
123 - *  
124 - * @param username 用户名  
125 - * @param password 密码  
126 - * @param userProfile 用户数据  
127 - */  
128 - public void loginAppAccount(String username, String password, UserData userProfile) {  
129 - if (mAccountMap.containsKey(username)) {  
130 - activeAccount = mAccountMap.get(username);  
131 - mAccountManager.setPassword(activeAccount, password);  
132 - } else {  
133 - activeAccount = new Account(username, mAccountType);  
134 - mAccountManager.addAccountExplicitly(activeAccount, password, null);  
135 - }  
136 -  
137 - // 自动同步  
138 - ContentResolver.setIsSyncable(activeAccount, mAccountProvide, 1);  
139 - ContentResolver.setSyncAutomatically(activeAccount, mAccountProvide, true);  
140 - // 间隔时间为30秒  
141 - ContentResolver.addPeriodicSync(activeAccount, mAccountProvide, new Bundle(), 1);  
142 -  
143 - setSystemAccountInfo(activeAccount, userProfile);  
144 -  
145 - mAccountMap.put(username, activeAccount);  
146 -  
147 - activeUserInfo = getAccountInfo(activeAccount);  
148 -  
149 - sharedPrefs.setValue(KEY_DEFAULT_ACCOUNT, username);  
150 - }  
151 -  
152 - /**  
153 - * 登出App用户  
154 - */  
155 - public void logoutAppAccount() {  
156 - AppConfig.setSid("");  
157 - if (sharedPrefs != null) sharedPrefs.remove(KEY_DEFAULT_ACCOUNT);  
158 - if (mAccountMap != null) mAccountMap.remove(activeAccount.name);  
159 - activeAccount = null;  
160 - activeUserInfo = null;  
161 - mInstance = null;  
162 - }  
163 -  
164 - /**  
165 - * 获取已经登陆用户信息  
166 - *  
167 - * @return 用户信息  
168 - */  
169 - public CNLiveUserInfo getAppAccount() {  
170 - return activeUserInfo;  
171 - }  
172 -  
173 - public static String getUid(Context context) {  
174 - CNLiveUserInfo activeUserInfo = getInstance(context).getAppAccount();  
175 - return activeUserInfo == null ? "" : activeUserInfo.getUid();  
176 - }  
177 -  
178 - public Account getSystemAccount() {  
179 - return activeAccount;  
180 - }  
181 -  
182 - public String getPassword(Account account) {  
183 - return mAccountManager.getPassword(account);  
184 - }  
185 -  
186 - /**  
187 - * 删除系统账号信息  
188 - *  
189 - * @param username 用户名  
190 - */  
191 - public void removeUser(String username, AccountManagerCallback<Boolean> callback) {  
192 - Account account = mAccountMap.remove(username);  
193 - if (account != null) mAccountManager.removeAccount(account, callback, null);  
194 - }  
195 -  
196 - /**  
197 - * 删除系统账号信息  
198 - *  
199 - * @param account 系统账号  
200 - */  
201 - public void removeUser(Account account, AccountManagerCallback<Boolean> callback) {  
202 - if (account != null) {  
203 - mAccountManager.removeAccount(account, callback, null);  
204 - }  
205 - }  
206 -  
207 -  
208 - /**  
209 - * 更新系统账号信息  
210 - *  
211 - * @param account 系统账号数据  
212 - * @param userProfile 用户账号数据  
213 - */  
214 - private void setSystemAccountInfo(Account account, UserData userProfile) {  
215 - if (account == null) return;  
216 - if (checkDefaultUrl(userProfile.getFaceUrl())) {  
217 - userProfile.setFaceUrl(defaultFaceUrl);  
218 - userProfile.setBigFaceUrl(defaultFaceUrl);  
219 - }  
220 - mAccountManager.setUserData(account, KEY_USER_DATA_USER_ID, userProfile.getUid());  
221 - mAccountManager.setUserData(account, KEY_USER_DATA_NICKNAME, userProfile.getNickName());  
222 - mAccountManager.setUserData(account, KEY_USER_DATA_FACEURL, userProfile.getFaceUrl());  
223 - mAccountManager.setUserData(account, KEY_USER_DATA_BIGFACEURL, userProfile.getBigFaceUrl());  
224 - mAccountManager.setUserData(account, KEY_USER_DATA_GENDER, userProfile.getGender());  
225 - mAccountManager.setUserData(account, KEY_USER_DATA_MOBILE, userProfile.getMobile());  
226 - mAccountManager.setUserData(account, KEY_USER_COUNTRY_CODE, userProfile.getCountryCode());  
227 - mAccountManager.setUserData(account, KEY_USER_DATA_EMAIL, userProfile.getEmail());  
228 - mAccountManager.setUserData(account, KEY_USER_FIRST_LOGIN, userProfile.isNewUser() ? "0" : "1");  
229 - mAccountManager.setUserData(account, KEY_USER_DATA_LOCATION, userProfile.getLocation());  
230 - mAccountManager.setUserData(account, KEY_USER_TOKEN, userProfile.getToken());  
231 - setUserExt(userProfile.getExtInfo());  
232 - }  
233 -  
234 - public void setUserExt(String ext) {  
235 - try {  
236 - CNLiveUserInfoExt extData = new Gson().fromJson(ext, CNLiveUserInfoExt.class);  
237 -  
238 - mAccountManager.setUserData(activeAccount, KEY_USER_SIGN, extData.getUserSign());  
239 - } catch (Exception e) {  
240 - }  
241 - }  
242 -  
243 - public void setUserInfo(UserData userProfile) {  
244 - if (mAccountMap.containsKey(sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT))) {  
245 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_USER_ID, userProfile.getUid());  
246 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_NICKNAME, userProfile.getNickName());  
247 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_FACEURL, userProfile.getFaceUrl());  
248 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_BIGFACEURL, userProfile.getBigFaceUrl());  
249 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_GENDER, userProfile.getGender());  
250 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_MOBILE, userProfile.getMobile());  
251 - mAccountManager.setUserData(activeAccount, KEY_USER_COUNTRY_CODE, userProfile.getCountryCode());  
252 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_EMAIL, userProfile.getEmail());  
253 - mAccountManager.setUserData(activeAccount, KEY_USER_FIRST_LOGIN, userProfile.isNewUser() ? "0" : "1");  
254 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_LOCATION, userProfile.getLocation());  
255 - setUserExt(userProfile.getExtInfo());  
256 -  
257 - activeUserInfo = getAccountInfo(activeAccount);  
258 - }  
259 - }  
260 -  
261 - public void setUserSign(String userSign) {  
262 - if (mAccountMap.containsKey(sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT))) {  
263 - activeUserInfo.setUserSign(userSign);  
264 - mAccountManager.setUserData(activeAccount, KEY_USER_SIGN, userSign);  
265 - }  
266 - }  
267 -  
268 - public void setUserFaceUrl(String faceUrl, String bigFaceUrl) {  
269 - if (mAccountMap.containsKey(sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT))) {  
270 - activeUserInfo.setFaceUrl(faceUrl);  
271 - activeUserInfo.setBigFaceUrl(bigFaceUrl);  
272 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_FACEURL, faceUrl);  
273 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_BIGFACEURL, bigFaceUrl);  
274 - }  
275 - }  
276 -  
277 - public void setUserNickName(String nickName) {  
278 - if (mAccountMap.containsKey(sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT))) {  
279 - activeUserInfo.setNickName(nickName);  
280 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_NICKNAME, nickName);  
281 - }  
282 - }  
283 -  
284 - public void setPhoneNumber(String phoneNumber, String countryCode) {  
285 - if (mAccountMap.containsKey(sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT))) {  
286 - activeUserInfo.setMobile(phoneNumber);  
287 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_MOBILE, phoneNumber);  
288 - mAccountManager.setUserData(activeAccount, KEY_USER_COUNTRY_CODE, countryCode);  
289 - }  
290 - }  
291 -  
292 - /**  
293 - * 更新用户性别  
294 - *  
295 - * @param sex  
296 - */  
297 - public void setUserSex(String sex) {  
298 - if (mAccountMap.containsKey(sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT))) {  
299 - activeUserInfo.setGender(sex);  
300 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_GENDER, sex);  
301 - }  
302 - }  
303 -  
304 - /**  
305 - * 更新 用户信息的地址  
306 - *  
307 - * @param location  
308 - */  
309 - public void setUserLocation(String location) {  
310 - if (mAccountMap.containsKey(sharedPrefs.getValue(KEY_DEFAULT_ACCOUNT))) {  
311 - activeUserInfo.setLocation(location);  
312 - mAccountManager.setUserData(activeAccount, KEY_USER_DATA_LOCATION, location);  
313 - }  
314 - }  
315 -  
316 - /**  
317 - * 通过系统账号获取用户账号信息  
318 - *  
319 - * @param account 系统账号数据  
320 - * @return 用户账号信息  
321 - */  
322 - public CNLiveUserInfo getAccountInfo(Account account) {  
323 - if (account == null) return null;  
324 -  
325 - CNLiveUserInfo user = new CNLiveUserInfo();  
326 - user.setUid(mAccountManager.getUserData(account, KEY_USER_DATA_USER_ID));  
327 - user.setNickName(mAccountManager.getUserData(account, KEY_USER_DATA_NICKNAME));  
328 - user.setFaceUrl(mAccountManager.getUserData(account, KEY_USER_DATA_FACEURL));  
329 - user.setBigFaceUrl(mAccountManager.getUserData(account, KEY_USER_DATA_BIGFACEURL));  
330 - user.setGender(mAccountManager.getUserData(account, KEY_USER_DATA_GENDER));  
331 - user.setMobile(mAccountManager.getUserData(account, KEY_USER_DATA_MOBILE));  
332 - user.setCountryCode(mAccountManager.getUserData(account, KEY_USER_COUNTRY_CODE));  
333 - user.setEmail(mAccountManager.getUserData(account, KEY_USER_DATA_EMAIL));  
334 - user.setNewUser("0".equals(mAccountManager.getUserData(account, KEY_USER_FIRST_LOGIN)));  
335 - user.setLocation(mAccountManager.getUserData(account, KEY_USER_DATA_LOCATION));  
336 - user.setToken(mAccountManager.getUserData(account, KEY_USER_TOKEN));  
337 - user.setUserSign(mAccountManager.getUserData(account, KEY_USER_SIGN));  
338 -  
339 - AppConfig.setSid(user.getUid());  
340 -  
341 - return user;  
342 - }  
343 -  
344 - /**  
345 - * 获取系统账号列表  
346 - *  
347 - * @return 用户列表  
348 - */  
349 - public Account[] getUserList() {  
350 - return mAccountManager.getAccountsByType(mAccountType);  
351 - }  
352 -  
353 -  
354 - public static boolean hasAppAccount(Context context) {  
355 - return UserService.getInstance(context).getAppAccount() != null;  
356 - }  
357 -}  
app_user/src/main/java/com/cnlive/strike/user/auth/UserSyncService.java deleted 100644 → 0
1 -package com.cnlive.strike.user.auth;  
2 -  
3 -import android.accounts.Account;  
4 -import android.app.Service;  
5 -import android.content.AbstractThreadedSyncAdapter;  
6 -import android.content.ContentProviderClient;  
7 -import android.content.Context;  
8 -import android.content.Intent;  
9 -import android.content.SyncResult;  
10 -import android.os.Bundle;  
11 -import android.os.IBinder;  
12 -  
13 -public class UserSyncService extends Service {  
14 -  
15 - private static final Object syncLock = new Object();  
16 - private static SyncAdapter syncAdapter = null;  
17 -  
18 - @Override  
19 - public IBinder onBind(Intent intent) {  
20 - return syncAdapter.getSyncAdapterBinder();  
21 - }  
22 -  
23 - @Override  
24 - public void onCreate() {  
25 - super.onCreate();  
26 - synchronized (syncLock) {  
27 - if (syncAdapter == null) {  
28 - syncAdapter = new SyncAdapter(getApplicationContext(), true);  
29 - }  
30 - }  
31 - }  
32 -  
33 -  
34 - class SyncAdapter extends AbstractThreadedSyncAdapter {  
35 -  
36 - public SyncAdapter(Context context, boolean autoInitialize) {  
37 - super(context, autoInitialize);  
38 - }  
39 -  
40 - @Override  
41 - public void onPerformSync(Account account, Bundle extras, String authority, ContentProviderClient provider, SyncResult syncResult) {  
42 - }  
43 -  
44 - }  
45 -}  
46 \ No newline at end of file 0 \ No newline at end of file
app_user/src/main/java/com/cnlive/strike/user/model/CNLiveUserInfo.java deleted 100644 → 0
1 -package com.cnlive.strike.user.model;  
2 -  
3 -import android.text.TextUtils;  
4 -  
5 -import java.io.Serializable;  
6 -  
7 -/**  
8 - * 开放平台-用户信息  
9 - *  
10 - * @author Lynn  
11 - * @date 2017/12/22  
12 - */  
13 -  
14 -public class CNLiveUserInfo implements Serializable {  
15 - //用户id  
16 - private String uid;  
17 - //昵称  
18 - private String nickName;  
19 - //性别  
20 - private String gender;  
21 - //地址  
22 - private String location;  
23 - //头像  
24 - private String faceUrl;  
25 - //手机号  
26 - private String mobile;  
27 - //邮箱  
28 - private String email;  
29 - //平台TOKEN  
30 - private String token;  
31 - //新用户  
32 - private boolean isNewUser;  
33 - //个性签名  
34 - private String userSign;  
35 - //用户头像大图  
36 - private String bigFaceUrl;  
37 - //手机号国家码  
38 - private String countryCode;  
39 -  
40 - public String getUid() {  
41 - return uid;  
42 - }  
43 -  
44 - public void setUid(String uid) {  
45 - this.uid = uid;  
46 - }  
47 -  
48 - public String getNickName() {  
49 - return nickName;  
50 - }  
51 -  
52 - public void setNickName(String nickName) {  
53 - this.nickName = nickName;  
54 - }  
55 -  
56 - public String getGender() {  
57 - return gender;  
58 - }  
59 -  
60 - public void setGender(String gender) {  
61 - this.gender = gender;  
62 - }  
63 -  
64 - public String getLocation() {  
65 - return location;  
66 - }  
67 -  
68 - public void setLocation(String location) {  
69 - this.location = location;  
70 - }  
71 -  
72 - public String getFaceUrl() {  
73 - return faceUrl;  
74 - }  
75 -  
76 - public void setFaceUrl(String faceUrl) {  
77 - this.faceUrl = faceUrl;  
78 - }  
79 -  
80 - public String getBigFaceUrl() {  
81 - if (TextUtils.isEmpty(bigFaceUrl)) return faceUrl;  
82 - return bigFaceUrl;  
83 - }  
84 -  
85 - public void setBigFaceUrl(String bigFaceUrl) {  
86 - this.bigFaceUrl = bigFaceUrl;  
87 - }  
88 -  
89 - public String getMobile() {  
90 - return mobile;  
91 - }  
92 -  
93 - public void setMobile(String mobile) {  
94 - this.mobile = mobile;  
95 - }  
96 -  
97 - public String getEmail() {  
98 - return email;  
99 - }  
100 -  
101 - public void setEmail(String email) {  
102 - this.email = email;  
103 - }  
104 -  
105 - public String getToken() {  
106 - return token;  
107 - }  
108 -  
109 - public void setToken(String token) {  
110 - this.token = token;  
111 - }  
112 -  
113 - public boolean isNewUser() {  
114 - return isNewUser;  
115 - }  
116 -  
117 - public void setNewUser(boolean newUser) {  
118 - isNewUser = newUser;  
119 - }  
120 -  
121 - public String getUserSign() {  
122 - return userSign;  
123 - }  
124 -  
125 - public void setUserSign(String userSign) {  
126 - this.userSign = userSign;  
127 - }  
128 -  
129 - public String getCountryCode() {  
130 - return countryCode;  
131 - }  
132 -  
133 - public void setCountryCode(String countryCode) {  
134 - this.countryCode = countryCode;  
135 - }  
136 -}  
app_user/src/main/java/com/cnlive/strike/user/model/CNLiveUserInfoExt.java deleted 100644 → 0
1 -package com.cnlive.strike.user.model;  
2 -  
3 -/**  
4 - * Created by xiansong on 2018/4/3.  
5 - */  
6 -  
7 -public class CNLiveUserInfoExt {  
8 -  
9 -  
10 - @Override  
11 - public String toString() {  
12 - return "CNLiveUserInfoExt{" +  
13 - "userSign='" + userSign + '\'' +  
14 - '}';  
15 - }  
16 -  
17 - private String userSign ;  
18 -  
19 - public String getUserSign() {  
20 - return userSign;  
21 - }  
22 -  
23 - public void setUserSign(String userSign) {  
24 - this.userSign = userSign;  
25 - }  
26 -  
27 -  
28 -}  
app_user/src/main/res/values/strings.xml deleted 100644 → 0
1 -<resources>  
2 - <string name="app_name">app_user</string>  
3 -</resources>  
app_user/src/main/res/xml/account_preferences.xml deleted 100644 → 0
1 -<?xml version="1.0" encoding="utf-8"?>  
2 -<PreferenceScreen></PreferenceScreen>  
app_user/src/main/res/xml/account_sync_adapter.xml deleted 100644 → 0
1 -<?xml version="1.0" encoding="utf-8"?>  
2 -<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"  
3 - android:accountType="@string/ACCOUNT_TYPE"  
4 - android:allowParallelSyncs="false"  
5 - android:contentAuthority="@string/ACCOUNT_PROVIDE"  
6 - android:isAlwaysSyncable="true"  
7 - android:supportsUploading="false"  
8 - android:userVisible="true" />  
9 \ No newline at end of file 0 \ No newline at end of file
app_user/src/main/res/xml/authenticator.xml deleted 100644 → 0
1 -<?xml version="1.0" encoding="utf-8"?>  
2 -<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"  
3 - android:accountType="@string/ACCOUNT_TYPE"  
4 - android:icon="@mipmap/icon_account"  
5 - android:smallIcon="@mipmap/icon_account"  
6 - android:label="@string/ACCOUNT_LABEL"  
7 - android:accountPreferences="@xml/account_preferences" />  
8 \ No newline at end of file 0 \ No newline at end of file
app_user/src/release/res/mipmap-hdpi/icon_account.png deleted 100644 → 0

3.87 KB

app_user/src/release/res/mipmap-mdpi/icon_account.png deleted 100644 → 0

2.94 KB

app_user/src/release/res/mipmap-xhdpi/icon_account.png deleted 100644 → 0

5.19 KB

app_user/src/release/res/mipmap-xxhdpi/icon_account.png deleted 100644 → 0

7.91 KB

app_user/src/release/res/mipmap-xxxhdpi/icon_account.png deleted 100644 → 0

10.6 KB

build.gradle
@@ -98,5 +98,6 @@ ext { @@ -98,5 +98,6 @@ ext {
98 98
99 libCnUtil = '3.1.3' 99 libCnUtil = '3.1.3'
100 libAnalytics = '1.0.8' 100 libAnalytics = '1.0.8'
  101 + okhttp = '3.8.1'
101 102
102 } 103 }
lib_network/.gitignore deleted 100644 → 0
1 -/build  
lib_network/build.gradle deleted 100644 → 0
1 -apply plugin: 'com.android.library'  
2 -apply plugin: 'com.alibaba.arouter'  
3 -  
4 -android {  
5 - compileSdkVersion rootProject.ext.compileSdkVersion  
6 - buildToolsVersion rootProject.ext.buildToolsVersion  
7 -  
8 - defaultConfig {  
9 - minSdkVersion rootProject.ext.minSdkVersion  
10 - targetSdkVersion rootProject.ext.targetSdkVersion  
11 - versionCode rootProject.ext.versionCode  
12 - versionName rootProject.ext.versionName  
13 -  
14 - javaCompileOptions {  
15 - annotationProcessorOptions {  
16 - arguments = [AROUTER_MODULE_NAME: project.getName(), AROUTER_GENERATE_DOC: "enable"]  
17 - }  
18 - }  
19 - }  
20 - compileOptions {  
21 - sourceCompatibility JavaVersion.VERSION_1_8  
22 - targetCompatibility JavaVersion.VERSION_1_8  
23 - }  
24 - dataBinding {  
25 - enabled true  
26 - }  
27 -}  
28 -  
29 -dependencies {  
30 - implementation fileTree(dir: 'libs', include: ['*.jar'])  
31 - implementation "com.cnlive.libs:base:$rootProject.libBase"  
32 - api "com.cnlive.libs:network:$rootProject.libNetwork"  
33 - implementation 'com.alibaba:arouter-api:1.4.0'  
34 - annotationProcessor 'com.alibaba:arouter-compiler:1.2.1'  
35 -}  
lib_network/proguard-rules.pro deleted 100644 → 0
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  
lib_network/src/main/AndroidManifest.xml deleted 100644 → 0
1 -<manifest xmlns:android="http://schemas.android.com/apk/res/android"  
2 - package="com.cnlive.libs.data.network">  
3 -  
4 - <uses-permission android:name="android.permission.INTERNET" />  
5 - <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />  
6 -</manifest>  
lib_network/src/main/java/com/cnlive/strike/data/network/action/CoinRainAction.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.action;  
2 -  
3 -import android.annotation.SuppressLint;  
4 -import android.content.Context;  
5 -import android.content.SharedPreferences;  
6 -import android.text.TextUtils;  
7 -  
8 -import com.alibaba.android.arouter.launcher.ARouter;  
9 -import com.cnlive.libs.base.logic.Logic;  
10 -import com.cnlive.strike.data.network.api.ApiRequest;  
11 -import com.cnlive.strike.data.network.api.ApiServiceIntegra;  
12 -import com.cnlive.strike.data.network.model.AddIntegration;  
13 -import com.cnlive.strike.data.network.model.BaseInfo;  
14 -  
15 -import java.text.SimpleDateFormat;  
16 -import java.util.Calendar;  
17 -import java.util.HashMap;  
18 -import java.util.Map;  
19 -  
20 -public class CoinRainAction {  
21 -  
22 - @SuppressLint("SimpleDateFormat")  
23 - private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");  
24 - public static boolean isGo = true;  
25 -  
26 - public static void code(Context context, String uid, String taskId, String contentId, String addtype) {  
27 - if (context == null) return;  
28 -  
29 - Map<String, String> maps = new HashMap<>();  
30 - maps.put("sid", uid);  
31 - maps.put("taskId", taskId);  
32 - maps.put("contentId", contentId);  
33 - Logic.create(maps)  
34 - .action((Logic.Action<Map<String, String>, BaseInfo<AddIntegration.DataBean>>) (data, callback) -> ApiRequest.service(ApiServiceIntegra.class, api -> api.addIntegration(data)).subscribe(context, callback))  
35 - .<BaseInfo<AddIntegration.DataBean>>event()  
36 - .setSuccessCallback(data -> startCoinRain(context, uid, addtype, data))  
37 - .start();  
38 - }  
39 -  
40 - private static void startCoinRain(Context context, String uid, String addtype, BaseInfo<AddIntegration.DataBean> data) {  
41 - if (data == null) return;  
42 - if (data.getData() == null) return;  
43 - if (TextUtils.isEmpty(data.getData().getScore())) return;  
44 -  
45 - String score = data.getData().getScore();  
46 - String desc = data.getData().getDesc();  
47 - String descEnd = data.getData().getDescEnd();  
48 - String currentTime = getCurrentTime();  
49 -  
50 - SharedPreferences.Editor editor = context.getSharedPreferences(addtype, Context.MODE_PRIVATE).edit();  
51 -  
52 - editor.putBoolean(uid, data.getData().isStatus());  
53 - editor.putString(uid + "time", currentTime);  
54 - editor.apply();  
55 - isGo = false;  
56 - ARouter.getInstance().build("/add/CoinRainActivity")  
57 - .withString("type", "addintegration")  
58 - .withString("score", score)  
59 - .withString("desc",desc)  
60 - .withString("descend",descEnd)  
61 - .navigation(context);  
62 - }  
63 -  
64 - public static String getCurrentTime() {  
65 - return format.format(Calendar.getInstance().getTime());  
66 - }  
67 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiRequest.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import android.content.Context;  
4 -import android.util.Log;  
5 -  
6 -import com.cnlive.libs.base.application.AppConfig;  
7 -import com.cnlive.libs.base.logic.callback.DataCallback;  
8 -import com.cnlive.libs.data.network.ApiBuild;  
9 -import com.cnlive.libs.data.network.Subscriber;  
10 -import com.cnlive.libs.data.network.interceptor.DESEncryptInterceptor;  
11 -import com.cnlive.libs.data.network.interceptor.DefaultEncryptInterceptor;  
12 -import com.cnlive.libs.data.network.interceptor.NetPPEncryptInterceptor;  
13 -import com.cnlive.libs.data.network.interceptor.NetPPPayEncryptInterceptor;  
14 -import com.cnlive.libs.data.network.interceptor.SignEncrypt2Interceptor;  
15 -import com.cnlive.libs.data.network.interceptor.SignEncryptInterceptor;  
16 -import com.cnlive.strike.data.network.model.BaseInfo;  
17 -  
18 -import io.reactivex.android.schedulers.AndroidSchedulers;  
19 -import io.reactivex.disposables.Disposable;  
20 -import io.reactivex.schedulers.Schedulers;  
21 -import okhttp3.Interceptor;  
22 -import okhttp3.OkHttpClient;  
23 -import okhttp3.Request;  
24 -import okhttp3.Response;  
25 -import retrofit2.adapter.rxjava2.Result;  
26 -  
27 -import static com.cnlive.libs.base.logic.Config.SUCCESS;  
28 -  
29 -  
30 -/**  
31 - * Created by xiansong on 2017/9/8.  
32 - */  
33 -  
34 -public class ApiRequest<Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo> {  
35 -  
36 - private static final int OKHTTP_KEEP_ALIVE_DURATION_SECONDS = 10;  
37 -  
38 - //网家家 接口域名  
39 - public static final String BASE_URL = "https://apiwjj.cnlive.com/";  
40 - //网家家 测试环境 接口域名  
41 - public static final String DEBUG_URL = "http://apiwjjtest.cnlive.com/";  
42 - //IM 接口域名  
43 - private static final String IM_URL = "https://wjjim.cnlive.com/";  
44 - //IM 测试环境 接口域名  
45 - public static final String IM_DEBUG_URL = "http://imtest.cnlive.com/";  
46 - //OPEN API 接口域名  
47 - private static final String OPEN_URL = "https://api.cnlive.com/";  
48 - //WJJ JSON  
49 - private static final String JSON_URL = "https://wjj.ys1.cnliveimg.com/";  
50 -  
51 - private static final String DEBUG_CMS_URL = "http://cmstest.cnlive.com:8768/";  
52 - // TODO: 2018/11/27 cms正式地址  
53 - private static final String CMS_URL = "http://cms.cnlive.com:8768/";  
54 -  
55 - public static <T> String baseEndpoint() {  
56 - return AppConfig.isDebug() ? DEBUG_URL : BASE_URL;  
57 - }  
58 -  
59 - public static <T> String baseIMEndpoint() {  
60 - return AppConfig.isDebug() ? IM_DEBUG_URL : IM_URL;  
61 - }  
62 -  
63 - public static <T> String baseCMSEndpoint() {  
64 - return AppConfig.isDebug() ? DEBUG_CMS_URL : CMS_URL;  
65 - }  
66 -  
67 - private static <T> String serviceEndpoint(Class<T> clazz) {  
68 - if (clazz == ApiServiceCNLiveIm.class) return baseIMEndpoint();  
69 - else if (clazz == ApiServiceApplyRefundReason.class) return JSON_URL;  
70 - else if (clazz == ApiServiceOpen.class) return OPEN_URL;  
71 - else if (clazz == ApiServiceCms.class) return baseCMSEndpoint();  
72 - else return baseEndpoint();  
73 - }  
74 -  
75 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
76 - ApiRequest<Observable, BaseData> observable(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api) {  
77 - //添加签名校验-杨帅  
78 - return observable(clazz, false, api, new SignEncryptInterceptor());  
79 - }  
80 -  
81 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
82 - ApiRequest<Observable, BaseData> observable(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api, Interceptor interceptor) {  
83 - return observable(clazz, false, api, interceptor);  
84 - }  
85 -  
86 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
87 - ApiRequest<Observable, BaseData> observable(Class<Service> clazz, boolean decode, ApiBuild.Api<Service, Observable, BaseData> api, Interceptor interceptor) {  
88 - ApiRequest<Observable, BaseData> request = new ApiRequest<>();  
89 - ApiBuild<Service, Observable, BaseData> build = ApiBuild.service(clazz, api);  
90 - build.setEndpoint(serviceEndpoint(clazz));  
91 - if (interceptor != null) build.addInterceptor(interceptor);  
92 - request.observable = build.build(decode, OKHTTP_KEEP_ALIVE_DURATION_SECONDS);  
93 - return request;  
94 - }  
95 -  
96 - public static <Service> Service serviceNoSign(Class<Service> clazz) {  
97 - return service(clazz, (Interceptor) new DefaultEncryptInterceptor());  
98 - }  
99 -  
100 - public static <Service> Service service(Class<Service> clazz) {  
101 - return service(clazz, new SignEncryptInterceptor());  
102 - }  
103 -  
104 - public static <Service> Service service(Class<Service> clazz, boolean valueUrlencode, boolean responseUrldecode) {  
105 - return service(clazz, responseUrldecode, new SignEncryptInterceptor(valueUrlencode));  
106 - }  
107 -  
108 - public static <Service> Service serviceDES(Class<Service> clazz) {  
109 - return service(clazz, new DESEncryptInterceptor());  
110 - }  
111 -  
112 - public static <Service> Service serviceNetPP(Class<Service> clazz) {  
113 - return service(clazz, new NetPPEncryptInterceptor());  
114 - }  
115 -  
116 - public static <Service> Service serviceNetPPPay(Class<Service> clazz) {  
117 - return service(clazz, new NetPPPayEncryptInterceptor());  
118 - }  
119 -  
120 -  
121 - private static <Service> Service service(Class<Service> clazz, Interceptor... interceptor) {  
122 - return service(clazz, false, interceptor);  
123 - }  
124 -  
125 - private static <Service> Service service(Class<Service> clazz, boolean decode, Interceptor... interceptor) {  
126 - return ApiBuild.service(clazz, null)  
127 - .setEndpoint(serviceEndpoint(clazz))  
128 - .addInterceptor(interceptor)  
129 - .service(decode, OKHTTP_KEEP_ALIVE_DURATION_SECONDS);  
130 - }  
131 -  
132 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
133 - ApiRequest<Observable, BaseData> serviceNoSign(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api) {  
134 - return service(clazz, api, new DefaultEncryptInterceptor());  
135 - }  
136 -  
137 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
138 - ApiRequest<Observable, BaseData> service(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api) {  
139 - return service(clazz, api, new SignEncryptInterceptor());  
140 - }  
141 -  
142 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
143 - ApiRequest<Observable, BaseData> serviceNewVersion(Class<Service> clazz, long connectTimeout, long readTimeout, ApiBuild.Api<Service, Observable, BaseData> api) {  
144 - return serviceNewVersion(clazz, false, api, connectTimeout, readTimeout, new SignEncryptInterceptor());  
145 - }  
146 -  
147 -  
148 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
149 - ApiRequest<Observable, BaseData> service(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api, boolean valueUrlencode, boolean responseUrldecode) {  
150 - return service(clazz, responseUrldecode, api, new SignEncryptInterceptor(valueUrlencode));  
151 - }  
152 -  
153 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
154 - ApiRequest<Observable, BaseData> serviceDES(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api) {  
155 - return service(clazz, api, new DESEncryptInterceptor());  
156 - }  
157 -  
158 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
159 - ApiRequest<Observable, BaseData> service2encode(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api) {  
160 - return service(clazz, api, new SignEncrypt2Interceptor());  
161 - }  
162 -  
163 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
164 - ApiRequest<Observable, BaseData> serviceNetPP(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api) {  
165 - return service(clazz, api, new NetPPEncryptInterceptor());  
166 - }  
167 -  
168 - public static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
169 - ApiRequest<Observable, BaseData> serviceNetPPPay(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api) {  
170 - return service(clazz, api, new NetPPPayEncryptInterceptor());  
171 - }  
172 -  
173 - private static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
174 - ApiRequest<Observable, BaseData> service(Class<Service> clazz, ApiBuild.Api<Service, Observable, BaseData> api, Interceptor... interceptor) {  
175 - return service(clazz, false, api, interceptor);  
176 - }  
177 -  
178 - private static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
179 - ApiRequest<Observable, BaseData> service(Class<Service> clazz, boolean decode, ApiBuild.Api<Service, Observable, BaseData> api, Interceptor... interceptor) {  
180 -  
181 - ApiRequest<Observable, BaseData> request = new ApiRequest<>();  
182 -  
183 - request.observable = ApiBuild.service(clazz, api)  
184 - .setEndpoint(serviceEndpoint(clazz))  
185 - .addInterceptor(interceptor)  
186 - .build(decode, OKHTTP_KEEP_ALIVE_DURATION_SECONDS);  
187 -  
188 - return request;  
189 - }  
190 -  
191 -  
192 - private static <Service, Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
193 - ApiRequest<Observable, BaseData> serviceNewVersion(Class<Service> clazz, boolean decode, ApiBuild.Api<Service, Observable, BaseData> api, long connectTimeout, long readTimeout, Interceptor... interceptor) {  
194 -  
195 - ApiRequest<Observable, BaseData> request = new ApiRequest<>();  
196 -  
197 - request.observable = ApiBuild.service(clazz, api)  
198 - .setEndpoint(serviceEndpoint(clazz))  
199 - .setConnectTimeout(connectTimeout)  
200 - .setReadTimeout(readTimeout)  
201 - .addInterceptor(interceptor)  
202 - .build(decode);  
203 -  
204 - return request;  
205 - }  
206 -  
207 - private Observable observable;  
208 -  
209 - private ApiRequest() {  
210 - }  
211 -  
212 - public static <Observable extends io.reactivex.Observable<Result<BaseData>>, BaseData extends BaseInfo>  
213 - Disposable subscribe(Observable observable, Subscriber<BaseData> subscriber) {  
214 - return observable.take(1)  
215 - .subscribeOn(Schedulers.io())  
216 - .observeOn(AndroidSchedulers.mainThread())  
217 - .subscribe(subscriber.next, subscriber.error, subscriber.complete, subscriber.subscribe);  
218 - }  
219 -  
220 - public Disposable subscribe(Subscriber<BaseData> subscriber) {  
221 - return observable.take(1)  
222 - .subscribeOn(Schedulers.io())  
223 - .observeOn(AndroidSchedulers.mainThread())  
224 - .subscribe(subscriber.next, subscriber.error, subscriber.complete, subscriber.subscribe);  
225 - }  
226 -  
227 - public Disposable subscribe(Context context, DataCallback<BaseData> callback) {  
228 - Subscriber<BaseData> subscriber = new Subscriber<BaseData>(context) {  
229 - @Override  
230 - public void onCompleted(String s, String s1, BaseData data) {  
231 - if (callback == null) return;  
232 - callback.callback(SUCCESS, "", data);  
233 - }  
234 -  
235 - @Override  
236 - public void onError(String code, String message) {  
237 - if (callback == null) return;  
238 - int errorCode = -1;  
239 - try {  
240 - errorCode = Integer.valueOf(code);  
241 - } catch (Exception ignored) {  
242 - }  
243 -  
244 - Log.e("LynnTest read", code + " \n " + message);  
245 - callback.callback(errorCode, message, null);  
246 - }  
247 - };  
248 -  
249 - return observable.take(1)  
250 - .subscribeOn(Schedulers.io())  
251 - .observeOn(AndroidSchedulers.mainThread())  
252 - .subscribe(subscriber.next, subscriber.error, subscriber.complete, subscriber.subscribe);  
253 - }  
254 -  
255 - public static Disposable loadData(String url, DataCallback<String> callback) {  
256 - return io.reactivex.Observable  
257 - .just(url)  
258 - .map(s -> {  
259 - Response response = null;  
260 - String data = null;  
261 - try {  
262 - OkHttpClient client = new OkHttpClient();//创建OkHttpClient对象  
263 - Request request = new Request.Builder().url(url).build();  
264 - response = client.newCall(request).execute();//得到Response 对  
265 - if (response.isSuccessful()) data = response.body().string();  
266 - } catch (Exception e) {  
267 - Log.e("Api", "", e);  
268 - }  
269 -  
270 - if (data != null) {  
271 -// Log.e("DemoView", "response.code()==" + response.code());  
272 -// Log.e("DemoView", "response.message()==" + response.message());  
273 -// Log.e("DemoView", "res==" + data);  
274 - //此时的代码执行在子线程,修改UI的操作请使用handler跳转到UI线程。  
275 - }  
276 - return data;  
277 - })  
278 - .subscribeOn(Schedulers.io())  
279 - .observeOn(AndroidSchedulers.mainThread())  
280 - .subscribe(s -> callback.callback(0, "", s));  
281 - }  
282 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceAnnouncementCheck.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -  
6 -import java.util.Map;  
7 -  
8 -import io.reactivex.Observable;  
9 -import retrofit2.adapter.rxjava2.Result;  
10 -import retrofit2.http.POST;  
11 -import retrofit2.http.QueryMap;  
12 -  
13 -/**  
14 - * 达人有关的接口  
15 - */  
16 -public interface ApiServiceAnnouncementCheck {  
17 -  
18 - /**  
19 - * 检查敏感词  
20 - */  
21 - @POST("Daren/announcementCheck/checkFeaturedGroup.action")  
22 - Observable<Result<BaseInfo>> checkSensitiveWord(@QueryMap() Map<String, String> maps);  
23 -  
24 -}  
25 -  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceApplyRefundReason.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -import com.cnlive.strike.data.network.model.GroupLimitInfo;  
6 -import com.cnlive.strike.data.network.model.GroupMemberConfig;  
7 -import com.cnlive.strike.data.network.model.LinkAddressModel;  
8 -  
9 -import java.util.List;  
10 -  
11 -import io.reactivex.Observable;  
12 -import retrofit2.Call;  
13 -import retrofit2.adapter.rxjava2.Result;  
14 -import retrofit2.http.GET;  
15 -  
16 -/**  
17 - * Created by Lynn on 2018/2/7.  
18 - */  
19 -  
20 -public interface ApiServiceApplyRefundReason {  
21 -  
22 - @GET("json/refundReason.json")  
23 - Call<List<String>> getRefundReason();  
24 -  
25 - @GET("json/wjj_user_terms.json")  
26 - Call<List<LinkAddressModel>> getDarenJson();  
27 -  
28 - @GET("json/GroupMemberLimit.json")  
29 - Observable<Result<BaseInfo<GroupMemberConfig>>> getGroupMember();  
30 -  
31 - @GET("json/GroupMemberLimit.json")  
32 - Observable<Result<BaseInfo<GroupLimitInfo>>> getGroupLimit();  
33 -  
34 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceBlackList.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.BlackListInfo;  
5 -import com.cnlive.strike.data.network.model.LetHimNoSee;  
6 -import com.cnlive.strike.data.network.model.LetHimNoSeeFlag;  
7 -import com.cnlive.strike.data.network.model.NoSeeHim;  
8 -  
9 -import java.util.List;  
10 -import java.util.Map;  
11 -  
12 -import io.reactivex.Observable;  
13 -import retrofit2.adapter.rxjava2.Result;  
14 -import retrofit2.http.FieldMap;  
15 -import retrofit2.http.FormUrlEncoded;  
16 -import retrofit2.http.POST;  
17 -import retrofit2.http.QueryMap;  
18 -  
19 -public interface ApiServiceBlackList {  
20 -  
21 - /**  
22 - * 加入黑名单  
23 - *  
24 - * @param maps  
25 - * @return  
26 - */  
27 - @FormUrlEncoded  
28 - @POST("Daren/blackList/blackListAdd.action")  
29 - Observable<Result<BaseInfo<BlackListInfo>>> addFriendInBlackList(@FieldMap Map<String, String> maps);  
30 -  
31 - /**  
32 - * 移除黑名单  
33 - *  
34 - * @param maps  
35 - * @return  
36 - */  
37 - @POST("Daren/blackList/blackListDelete.action")  
38 - Observable<Result<BaseInfo<BlackListInfo>>> deleteFriendInBlackList(@QueryMap() Map<String, String> maps);  
39 -  
40 - /**  
41 - * 拉取黑名单列表  
42 - *  
43 - * @param maps  
44 - * @return  
45 - */  
46 - @POST("Daren/blackList/blackListGet.action")  
47 - Observable<Result<BaseInfo<BlackListInfo>>> getFriendInBlackList(@QueryMap() Map<String, String> maps);  
48 -  
49 - /**  
50 - * 生活圈和视屏-不看他的  
51 - * 杨帅 2019-4-23  
52 - * sid String true sid  
53 - * appId String true appId  
54 - * friendIds String true 好友sid, 格式:[11111,2222,3333]  
55 - *  
56 - * @param maps  
57 - * @return  
58 - */  
59 - @POST("Daren/moment/addNoLookFsids.action")  
60 - Observable<Result<BaseInfo>> addNoLookFsids(@QueryMap() Map<String, String> maps);  
61 -  
62 - /**  
63 - * 取消:生活圈和视屏-不看他的列表  
64 - * 杨帅 2019-4-23  
65 - *  
66 - * @param maps  
67 - * @return  
68 - */  
69 - @POST("Daren/moment/getNoLookFsids.action")  
70 - Observable<Result<BaseInfo<NoSeeHim>>> getNoLookFsids(@QueryMap() Map<String, String> maps);  
71 -  
72 - /**  
73 - * 取消:生活圈和视屏-不看他的  
74 - * 杨帅 2019-4-23  
75 - *  
76 - * @param maps  
77 - * @return  
78 - */  
79 - @POST("Daren/moment/delNoLookFsids.action")  
80 - Observable<Result<BaseInfo>> cancelNoLookFsids(@QueryMap() Map<String, String> maps);  
81 -  
82 - /**  
83 - * 取消:生活圈和视屏-不让他人看 按钮标志  
84 - * 杨帅 2019-4-24  
85 - * sid String true sid  
86 - * friendIds String true 好友id  
87 - *  
88 - * @param maps  
89 - * @return  
90 - */  
91 - @POST("Daren/moment/doNotletFsidsType.action")  
92 - Observable<Result<BaseInfo<LetHimNoSeeFlag>>> getLetHimNoSeeFlag(@QueryMap() Map<String, String> maps);  
93 -  
94 - /**  
95 - * 生活圈和视屏-不让他人看  
96 - * 杨帅 2019-4-23  
97 - * sid String true sid  
98 - * friendIds String true 好友id 格式:[111,222,333]  
99 - *  
100 - * @param maps  
101 - * @return  
102 - */  
103 - @POST("Daren/moment/addDoNotletFsids.action")  
104 - Observable<Result<BaseInfo>> addDoNotletFsids(@QueryMap() Map<String, String> maps);  
105 -  
106 - /**  
107 - * 取消:生活圈和视屏-不让他人看  
108 - * 杨帅 2019-4-23  
109 - * sid String true sid  
110 - * friendIds String true 好友id 格式:[111,222,333]  
111 - *  
112 - * @param maps  
113 - * @return  
114 - */  
115 - @POST("Daren/moment/delDoNotletFsids.action")  
116 - Observable<Result<BaseInfo>> cancelDoNotletFsids(@QueryMap() Map<String, String> maps);  
117 -  
118 - /**  
119 - * 生活圈和视屏-不让他人看列表  
120 - * 杨帅 2019-4-23  
121 - * sid String true sid  
122 - *  
123 - * @param maps  
124 - * @return  
125 - */  
126 - @POST("Daren/moment/getDoNotletFsids.action")  
127 - Observable<Result<BaseInfo<LetHimNoSee>>> getDoNotletFsids(@QueryMap() Map<String, String> maps);  
128 -  
129 - /**  
130 - * 取消:生活圈和视屏-不看他 按钮标志  
131 - * 杨帅 2019-4-24  
132 - * sid String true sid  
133 - * friendIds String true 好友id  
134 - *  
135 - * @param maps  
136 - * @return  
137 - */  
138 - @POST("Daren/moment/noLookFsidsType.action")  
139 - Observable<Result<BaseInfo<LetHimNoSeeFlag>>> getNoSeeHimFlag(@QueryMap() Map<String, String> maps);  
140 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceCNLiveIm.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -import com.cnlive.strike.data.network.model.CheckBlackListRelation;  
6 -import com.cnlive.strike.data.network.model.FriendListInfo;  
7 -import com.cnlive.strike.data.network.model.SearchByPhoneNumberData;  
8 -import com.cnlive.strike.data.network.model.UploadContactData;  
9 -  
10 -import java.util.List;  
11 -import java.util.Map;  
12 -  
13 -import io.reactivex.Observable;  
14 -import retrofit2.adapter.rxjava2.Result;  
15 -import retrofit2.http.FieldMap;  
16 -import retrofit2.http.FormUrlEncoded;  
17 -import retrofit2.http.POST;  
18 -import retrofit2.http.QueryMap;  
19 -  
20 -/**  
21 - * im有关的接口  
22 - */  
23 -public interface ApiServiceCNLiveIm {  
24 -  
25 - /**  
26 - * 上传通讯录接口  
27 - *  
28 - * @param maps  
29 - * @return  
30 - */  
31 - @POST("CnliveIM/notify/uploadContacts.action")  
32 - Observable<Result<BaseInfo<List<UploadContactData>>>> uploadContacts(@QueryMap Map<String, String> maps);  
33 -  
34 - /**  
35 - * 按手机号查找  
36 - *  
37 - * @param maps  
38 - * @return  
39 - */  
40 - @POST("CnliveIM/notify/searchByPhoneNumber.action")  
41 - Observable<Result<BaseInfo<SearchByPhoneNumberData>>> searchByPhoneNumber(@QueryMap() Map<String, String> maps);  
42 -  
43 - /**  
44 - * 我要催单  
45 - *  
46 - * @param maps  
47 - * @return  
48 - */  
49 - @POST("CnliveIM/notify/remind.action")  
50 - Observable<Result<BaseInfo>> remind(@QueryMap() Map<String, String> maps);  
51 -  
52 - /**  
53 - * 后台代替用户发送自定义消息  
54 - *  
55 - * @param maps  
56 - * @return  
57 - */  
58 - @FormUrlEncoded  
59 - @POST("CnliveIM/notify/custMsgPush.action")  
60 - Observable<Result<BaseInfo>> custMsgPush(@FieldMap Map<String, String> maps);  
61 -  
62 - /**  
63 - * 发送文本消息  
64 - *  
65 - * @param maps  
66 - * @return  
67 - */  
68 - @FormUrlEncoded  
69 - @POST("CnliveIM/notify/textMsgPush.action")  
70 - Observable<Result<BaseInfo>> textMsgPush(@FieldMap Map<String, String> maps);  
71 -  
72 - /**  
73 - * 同意进群  
74 - *  
75 - * @param maps  
76 - * @return  
77 - */  
78 - @POST("CnliveIM/notify/addGroup.action")  
79 - Observable<Result<BaseInfo<String>>> addGroup(@QueryMap() Map<String, String> maps);  
80 -  
81 - /**  
82 - * 发送消息撤回  
83 - *  
84 - * @param maps  
85 - * @return  
86 - */  
87 - @FormUrlEncoded  
88 - @POST("CnliveIM/notify/revokeBatchSendMsg.action")  
89 - Observable<Result<BaseInfo>> revokeBatchSendMsg(@FieldMap() Map<String, String> maps);  
90 -  
91 - /**  
92 - * 获取好友名单  
93 - */  
94 - @FormUrlEncoded  
95 - @POST("CnliveIM/notify/checkFriend.action")  
96 - Observable<Result<BaseInfo<FriendListInfo>>> getFriendsList(@FieldMap() Map<String, String> maps);  
97 -  
98 - /**  
99 - * 查询黑名单状态  
100 - */  
101 - @FormUrlEncoded  
102 - @POST("CnliveIM/notify/checkBlackList.action")  
103 - Observable<Result<BaseInfo<CheckBlackListRelation>>> checkBlackList(@FieldMap() Map<String, String> maps);  
104 -  
105 -}  
106 -  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceCenter.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.CategoryDarensData;  
5 -import com.cnlive.strike.data.network.model.CenterPageData;  
6 -import com.cnlive.strike.data.network.model.ChannelTabList;  
7 -  
8 -import java.util.Map;  
9 -  
10 -import io.reactivex.Observable;  
11 -import retrofit2.adapter.rxjava2.Result;  
12 -import retrofit2.http.Headers;  
13 -import retrofit2.http.POST;  
14 -import retrofit2.http.QueryMap;  
15 -  
16 -/**  
17 - * Created by Lynn on 2018/3/14.  
18 - */  
19 -  
20 -public interface ApiServiceCenter {  
21 -  
22 - /**  
23 - * 分类首页  
24 - *  
25 - * @return  
26 - */  
27 - @Headers("cache:5")  
28 - @POST("Daren/classify/getNewCenterPage.action")  
29 - Observable<Result<BaseInfo<CenterPageData>>> getCenterPage(@QueryMap() Map<String, String> map);  
30 -  
31 - /**  
32 - * 分类二级页面达人列表  
33 - *  
34 - * @return  
35 - */  
36 - @Headers("cache:5")  
37 - @POST("Daren/classify/getNewDarensByCategory.action")  
38 - Observable<Result<BaseInfo<CategoryDarensData>>> getDarensByCategory(@QueryMap() Map<String, String> map);  
39 -  
40 - /**  
41 - * 分类 Tab List  
42 - *  
43 - * @return  
44 - */  
45 - @Headers("cache:5")  
46 - @POST("Daren/center/getChannel.action")  
47 - Observable<Result<BaseInfo<ChannelTabList>>> getChannel(@QueryMap() Map<String, String> map);  
48 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceCms.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.AudioAlbumDetailsInfo;  
4 -import com.cnlive.strike.data.network.model.AudioChapterInfo;  
5 -import com.cnlive.strike.data.network.model.AudioHistoryInfo;  
6 -import com.cnlive.strike.data.network.model.BaseInfo;  
7 -import com.cnlive.strike.data.network.model.BaseVideoInfo;  
8 -import com.cnlive.strike.data.network.model.ClassifyChannelTabList;  
9 -import com.cnlive.strike.data.network.model.LivingPlayBackData;  
10 -import com.cnlive.strike.data.network.model.PlayAudioDetailData;  
11 -import com.cnlive.strike.data.network.model.PlayVodItemInfo;  
12 -import com.cnlive.strike.data.network.model.PlayerPgcLiveDetail;  
13 -import com.cnlive.strike.data.network.model.PlayerVodDetail;  
14 -import com.cnlive.strike.data.network.model.VideoInfo;  
15 -  
16 -import java.util.HashMap;  
17 -import java.util.List;  
18 -import java.util.Map;  
19 -  
20 -import io.reactivex.Observable;  
21 -import okhttp3.RequestBody;  
22 -import retrofit2.adapter.rxjava2.Result;  
23 -import retrofit2.http.Body;  
24 -import retrofit2.http.DELETE;  
25 -import retrofit2.http.FormUrlEncoded;  
26 -import retrofit2.http.GET;  
27 -import retrofit2.http.HTTP;  
28 -import retrofit2.http.Headers;  
29 -import retrofit2.http.POST;  
30 -import retrofit2.http.Path;  
31 -import retrofit2.http.QueryMap;  
32 -import retrofit2.http.Url;  
33 -  
34 -/**  
35 - * Created by Lynn on 2018/11/27.  
36 - */  
37 -  
38 -public interface ApiServiceCms {  
39 - /**  
40 - * 分类 Tab List  
41 - *  
42 - * @return  
43 - */  
44 - @GET("contentApi/app")  
45 - Observable<Result<BaseInfo<List<ClassifyChannelTabList>>>> getChannelTab(@QueryMap() Map<String, String> map);  
46 -  
47 - @GET("playApi/play")  
48 - Observable<Result<BaseInfo<PlayerVodDetail>>> getPlayerVodDetail(@QueryMap() Map<String, String> map);  
49 -  
50 - @GET("playApi/play")  
51 - Observable<Result<BaseInfo<PlayerPgcLiveDetail>>> getPlayerLiveDetail(@QueryMap() Map<String, String> map);  
52 -  
53 - @GET("playApi/play")  
54 - Observable<Result<BaseInfo<PlayAudioDetailData>>> getPlayAudioDetail(@QueryMap() Map<String, String> map);  
55 -  
56 - @GET("playApi/moreList")  
57 - Observable<Result<BaseInfo<PlayVodItemInfo>>> checkPlayItem(@QueryMap Map<String, String> maps);  
58 -  
59 - @GET("contentApi/{id}")  
60 - Observable<Result<BaseInfo<BaseVideoInfo>>> getVideoInfo(@Path("id") String id);  
61 -  
62 -  
63 - /**  
64 - * 获取 直播状态的视频 或者回放的视频列表  
65 - *  
66 - * @param maps liveType 1 是直播 4 是回放  
67 - * @return  
68 - */  
69 - @GET("contentApi/playList")  
70 - Observable<Result<BaseInfo<VideoInfo>>> getVideoList(@QueryMap() Map<String, String> maps);  
71 -  
72 - /**  
73 - * 预约  
74 - *  
75 - * @param maps  
76 - * @return  
77 - */  
78 - @GET("contentApi/liveAppoint")  
79 - Observable<Result<BaseInfo<Object>>> reservationLive(@QueryMap() Map<String, Object> maps);  
80 -  
81 - /**  
82 - * 获取音频专辑详情页  
83 - *  
84 - * @param maps  
85 - * @return  
86 - */  
87 - @GET("contentApi/getAlbumMsg")  
88 - Observable<Result<BaseInfo<AudioAlbumDetailsInfo>>> getAlbumMsg(@QueryMap() Map<String, String> maps);  
89 -  
90 - /**  
91 - * 获取音频列表  
92 - *  
93 - * @param maps  
94 - * @return  
95 - */  
96 - @GET("contentApi/albumAudioList")  
97 - Observable<Result<BaseInfo<List<AudioChapterInfo>>>> getAlbumMsgList(@QueryMap() Map<String, Object> maps);  
98 -  
99 - /**  
100 - * 获取音频播放的历史纪录  
101 - *  
102 - * @param maps  
103 - * @return  
104 - */  
105 - @GET("recordApi/getRecords")  
106 - Observable<Result<BaseInfo<List<AudioHistoryInfo>>>> getRecords(@QueryMap() Map<String, String> maps);  
107 -  
108 -  
109 - // @DELETE("recordApi")  
110 - @POST("recordApi/delete")  
111 - Observable<Result<BaseInfo<Object>>> deleteAudioHistory(@QueryMap Map<String, String> body);  
112 -  
113 - /**  
114 - * contentId : 内容id  
115 - * schedule : 进度 double  
116 - * sid  
117 - * model 5  
118 - *  
119 - * @return  
120 - */  
121 - @POST("recordApi/end")  
122 - Observable<Result<BaseInfo<Object>>> audioPlayEnd(@QueryMap Map<String, String> body);  
123 -  
124 - /**  
125 - * 获取直播回放,短视频的数据  
126 - *  
127 - * @param path  
128 - * @param body  
129 - * @return  
130 - */  
131 - @GET()  
132 - Observable<Result<BaseInfo<LivingPlayBackData>>> getLivingPlayBackList(@Url String path, @QueryMap Map<String, String> body);  
133 -  
134 -  
135 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceCommon.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.AppVersionInfo;  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -import com.cnlive.strike.data.network.model.CommonMsgInfo;  
6 -import com.cnlive.strike.data.network.model.ShareAppInfo;  
7 -import com.cnlive.strike.data.network.model.ShareDarenInfo;  
8 -import com.cnlive.strike.data.network.model.TRTCRoomInfo;  
9 -  
10 -import java.util.Map;  
11 -  
12 -import io.reactivex.Observable;  
13 -import retrofit2.Call;  
14 -import retrofit2.adapter.rxjava2.Result;  
15 -import retrofit2.http.POST;  
16 -import retrofit2.http.QueryMap;  
17 -  
18 -public interface ApiServiceCommon {  
19 - /**  
20 - * 版本更新  
21 - *  
22 - * @return  
23 - */  
24 - @POST("Daren/common/getNewestVersion.action")  
25 - Observable<Result<BaseInfo<AppVersionInfo>>> getVersion(@QueryMap() Map<String, String> map);  
26 -  
27 - /**  
28 - * 获取App分享地址  
29 - *  
30 - * @return  
31 - */  
32 - @POST("Daren/common/appDownLoadUrl.action")  
33 - Observable<Result<BaseInfo<ShareAppInfo>>> getAppShare();  
34 -  
35 - /**  
36 - * 获取达人主页分享地址  
37 - *  
38 - * @return  
39 - */  
40 - @POST("Daren/common/shareDarenHomePage.action")  
41 - Observable<Result<BaseInfo<ShareDarenInfo>>> getDarenShare(@QueryMap() Map<String, String> map);  
42 -  
43 - @POST("Daren/common/getCommonMsg.action")  
44 - Observable<Result<BaseInfo<CommonMsgInfo>>> getCommonMsg(@QueryMap() Map<String, String> map);  
45 -  
46 - /**  
47 - * 获取音视频通话roomId  
48 - */  
49 - @POST("Daren/common/getRoomId.action")  
50 - Observable<Result<BaseInfo<TRTCRoomInfo>>> getTRTCRoomInfo(@QueryMap() Map<String, String> map);  
51 -  
52 -  
53 - /**  
54 - * 版本更新  
55 - *  
56 - * @return  
57 - */  
58 -  
59 - @POST("Daren/common/getNewestVersion.action")  
60 - Observable<Result<BaseInfo<AppVersionInfo>>> getshotTimeVersion(@QueryMap() Map<String, String> map);  
61 -  
62 -  
63 - @POST("Daren/common/cancellationAccount.action")  
64 - Observable<Result<BaseInfo>> cancellationAccount(@QueryMap() Map<String, String> map);  
65 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceContact.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -import com.cnlive.strike.data.network.model.ContactAddressData;  
6 -  
7 -import java.util.List;  
8 -import java.util.Map;  
9 -  
10 -import io.reactivex.Observable;  
11 -import retrofit2.adapter.rxjava2.Result;  
12 -import retrofit2.http.FieldMap;  
13 -import retrofit2.http.FormUrlEncoded;  
14 -import retrofit2.http.POST;  
15 -import retrofit2.http.QueryMap;  
16 -  
17 -/**  
18 - * 用户收获地址有关的接口  
19 - */  
20 -public interface ApiServiceContact {  
21 -  
22 - /**  
23 - * 更新联系人收货地址  
24 - *  
25 - * @param maps  
26 - * @return  
27 - */  
28 - @FormUrlEncoded  
29 - @POST("Daren/contact/updateContact.action")  
30 - Observable<Result<BaseInfo<Object>>> updateContact(@FieldMap Map<String, String> maps);  
31 -  
32 - /**  
33 - * 读取联系人收获地址  
34 - *  
35 - * @param maps  
36 - * @return  
37 - */  
38 - @POST("Daren/contact/readContacts.action")  
39 - Observable<Result<BaseInfo<List<ContactAddressData>>>> readContact(@QueryMap() Map<String, String> maps);  
40 -  
41 - /**  
42 - * 添加联系人收货地址  
43 - *  
44 - * @param maps  
45 - * @return  
46 - */  
47 - @FormUrlEncoded  
48 - @POST("Daren/contact/addContact.action")  
49 - Observable<Result<BaseInfo<ContactAddressData>>> addContact(@FieldMap Map<String, String> maps);  
50 -  
51 - /**  
52 - * 删除联系人某条收货地址  
53 - *  
54 - * @param maps  
55 - * @return  
56 - */  
57 - @POST("Daren/contact/deleteContact.action")  
58 - Observable<Result<BaseInfo<Object>>> deleteContact(@QueryMap() Map<String, String> maps);  
59 -  
60 -}  
61 -  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceEyewitness.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.EyewitnessInfo;  
5 -import com.cnlive.strike.data.network.model.EyewitnessSuccessfullyInfo;  
6 -  
7 -import java.util.Map;  
8 -  
9 -import io.reactivex.Observable;  
10 -import retrofit2.adapter.rxjava2.Result;  
11 -import retrofit2.http.POST;  
12 -import retrofit2.http.QueryMap;  
13 -  
14 -/**  
15 - * 作者: 吴奎庆  
16 - * <p>  
17 - * 时间: 2018/10/12  
18 - * <p>  
19 - * 简介:  
20 - */  
21 -  
22 -public interface ApiServiceEyewitness {  
23 - //检测目击者的状态(是否是目击者)  
24 - @POST("Daren/witness/checkWitness.action")  
25 - Observable<Result<BaseInfo<EyewitnessInfo>>> checkWitness(@QueryMap Map<String, String> maps);  
26 -  
27 - //获取目击者的发布内容  
28 - @POST("Daren/witness/getWitnessPublishContent.action")  
29 - Observable<Result<BaseInfo<EyewitnessSuccessfullyInfo>>> getWitnessPublishContent(@QueryMap Map<String, String> maps);  
30 -  
31 - //删除or修改目击者发布内容  
32 - @POST("Daren/witness/deleteOrUpdateWitnessPublish.action")  
33 - Observable<Result<BaseInfo>> deleteOrUpdateWitnessPublish(@QueryMap Map<String, String> maps);  
34 -  
35 -  
36 -  
37 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceGroupManagement.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.ActivityRecordDetailsInfo;  
5 -import com.cnlive.strike.data.network.model.BaseInfo;  
6 -import com.cnlive.strike.data.network.model.CreateGroupPayMentInfo;  
7 -import com.cnlive.strike.data.network.model.GroupOwnerInfo;  
8 -import com.cnlive.strike.data.network.model.GroupPayOrderInfo;  
9 -import com.cnlive.strike.data.network.model.InitiatePaymentInfo;  
10 -import com.cnlive.strike.data.network.model.PaymentActivityRecordInfo;  
11 -import com.cnlive.strike.data.network.model.PaymentPreInfo;  
12 -import com.cnlive.strike.data.network.model.SuccessiveGroupListItem;  
13 -import com.cnlive.strike.data.network.model.TransferCheckKeyInfo;  
14 -import com.cnlive.strike.data.network.model.TransferKeyInfo;  
15 -import com.cnlive.strike.data.network.model.VoteMsgInfo;  
16 -import com.cnlive.strike.data.network.model.VotedHistoryInfo;  
17 -import com.cnlive.strike.data.network.model.VotedStopInfo;  
18 -  
19 -import java.util.List;  
20 -import java.util.Map;  
21 -  
22 -import io.reactivex.Observable;  
23 -import retrofit2.adapter.rxjava2.Result;  
24 -import retrofit2.http.FieldMap;  
25 -import retrofit2.http.FormUrlEncoded;  
26 -import retrofit2.http.POST;  
27 -import retrofit2.http.QueryMap;  
28 -  
29 -/**  
30 - * Created by gujun on 2018/5/23.  
31 - */  
32 -  
33 -public interface ApiServiceGroupManagement {  
34 -  
35 - /**  
36 - * 后台发送通知邀请用户进群  
37 - *  
38 - * @param maps  
39 - * @return  
40 - */  
41 - @FormUrlEncoded  
42 - @POST("Daren/groupManagement/invitationAddGroup.action")  
43 - Observable<Result<BaseInfo<Object>>> invitationAddGroup(@FieldMap Map<String, String> maps);  
44 -  
45 - /**  
46 - * 活动投票付款  
47 - *  
48 - * @param maps  
49 - * @return  
50 - */  
51 - @POST("Daren/vote/addVote.action")  
52 - Observable<Result<BaseInfo<InitiatePaymentInfo>>> invitationPayment(@QueryMap Map<String, String> maps);  
53 -  
54 - /**  
55 - * 创建群 发起活动的接口  
56 - *  
57 - * @return  
58 - */  
59 - @POST("Daren/groupManagement/addGroupCharge.action")  
60 - Observable<Result<BaseInfo<CreateGroupPayMentInfo>>> createGroupPayMent(@QueryMap Map<String, String> maps);  
61 -  
62 - @POST("Daren/vote/getVoteMsg.action")  
63 - Observable<Result<BaseInfo<VoteMsgInfo>>> getVoteMsg(@QueryMap Map<String, String> maps);  
64 -  
65 - /**  
66 - * 投票  
67 - *  
68 - * @param maps  
69 - * @return  
70 - */  
71 -  
72 - @POST("Daren/vote/groupVote.action")  
73 - Observable<Result<BaseInfo<VoteMsgInfo>>> vote(@QueryMap Map<String, String> maps);  
74 -  
75 - /**  
76 - * 投票列表  
77 - *  
78 - * @param maps  
79 - * @return  
80 - */  
81 - @POST("Daren/vote/getVotes.action")  
82 - Observable<Result<BaseInfo<VotedHistoryInfo>>> votedHistory(@QueryMap Map<String, String> maps);  
83 -  
84 - /**  
85 - * 转账页面查询当前密钥  
86 - *  
87 - * @param maps  
88 - * @return  
89 - */  
90 - @POST("Daren/groupManagement/getCurrentKey.action")  
91 - Observable<Result<BaseInfo<TransferKeyInfo>>> getCurrentKey(@QueryMap Map<String, String> maps);  
92 -  
93 - /**  
94 - * 转账页面发送当前密钥  
95 - *  
96 - * @param maps  
97 - * @return  
98 - */  
99 - @POST("Daren/groupManagement/sendSecretKey.action")  
100 - Observable<Result<BaseInfo<TransferKeyInfo>>> sendKey(@QueryMap Map<String, String> maps);  
101 -  
102 - /**  
103 - * 转账页面验证当前密钥  
104 - *  
105 - * @param maps  
106 - * @return  
107 - */  
108 - @POST("Daren/groupManagement/checkKey.action")  
109 - Observable<Result<BaseInfo<TransferCheckKeyInfo>>> checkKey(@QueryMap Map<String, String> maps);  
110 -  
111 - /**  
112 - * @param maps  
113 - * @return  
114 - */  
115 - @POST("Daren/groupManagement/groupFundsRecords.action")  
116 - Observable<Result<BaseInfo<List<PaymentActivityRecordInfo>>>> getPaymentRecord(@QueryMap Map<String, String> maps);  
117 -  
118 - /**  
119 - * @param maps  
120 - * @return  
121 - */  
122 - @POST("Daren/vote/stopVote.action")  
123 - Observable<Result<BaseInfo<VotedStopInfo>>> stopVoted(@QueryMap Map<String, String> maps);  
124 -  
125 - /**  
126 - * 获取活动付款详情  
127 - *  
128 - * @param maps  
129 - * @return  
130 - */  
131 - @POST("Daren/groupManagement/queryActivityFee.action")  
132 - Observable<Result<BaseInfo<ActivityRecordDetailsInfo>>> getActivityRecordDetails(@QueryMap Map<String, String> maps);  
133 - /**  
134 - * 存储历任群主  
135 - *  
136 - * @param maps  
137 - * @return  
138 - */  
139 - @POST("Daren/groupManagement/saveSuccessiveGroup.action")  
140 - Observable<Result<BaseInfo<Object>>> saveSuccessiveGroup(@QueryMap Map<String, String> maps);  
141 -  
142 -  
143 - /**  
144 - * 生成预订单  
145 - *  
146 - * @param maps  
147 - * @return  
148 - */  
149 - @POST("Daren/groupManagement/payByGroupMembers.action")  
150 - Observable<Result<BaseInfo<GroupPayOrderInfo>>> payByGroupMembers(@QueryMap Map<String, String> maps);  
151 -  
152 - /**  
153 - * 获取历任群主列表  
154 - *  
155 - * @param maps  
156 - * @return  
157 - */  
158 - @POST("Daren/groupManagement/getSuccessiveGroupList.action")  
159 - Observable<Result<BaseInfo<List<SuccessiveGroupListItem>>>> getSuccessiveGroupList(@QueryMap Map<String, String> maps);  
160 - /**  
161 - * 获取历任群主列表  
162 - *  
163 - * @param maps  
164 - * @return  
165 - */  
166 - @POST("Daren/groupManagement/voteChoiceOwner.action")  
167 - Observable<Result<BaseInfo<GroupOwnerInfo>>> getGroupOwner(@QueryMap Map<String, String> maps);  
168 -  
169 - /**  
170 - * wjj预支付订单  
171 - * @param map  
172 - * @return  
173 - */  
174 - @POST("Daren/wjjPay/unifiedOrder.action")  
175 - Observable<Result<BaseInfo<PaymentPreInfo>>> getwjjPrePay(@QueryMap() Map<String, String> map);  
176 - /**  
177 - * wjj支付订单  
178 - * @param map  
179 - * @return  
180 - */  
181 - @POST("Daren/wjjPay/unifiedPay.action")  
182 - Observable<Result<BaseInfo<Object>>> getwjjPay(@QueryMap() Map<String, String> map);  
183 -  
184 -  
185 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceH5.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.H5PGCVideoInfo;  
5 -  
6 -import java.util.Map;  
7 -  
8 -import io.reactivex.Observable;  
9 -import retrofit2.adapter.rxjava2.Result;  
10 -import retrofit2.http.FieldMap;  
11 -import retrofit2.http.FormUrlEncoded;  
12 -import retrofit2.http.POST;  
13 -import retrofit2.http.QueryMap;  
14 -  
15 -public interface ApiServiceH5 {  
16 -  
17 - /**  
18 - * 提交举报信息  
19 - *  
20 - * @param maps sid 用户ID  
21 - * liveId 节目ID  
22 - * reason 举报信息  
23 - */  
24 - @FormUrlEncoded  
25 - @POST("/Daren/h5/report.action")  
26 - Observable<Result<BaseInfo>> commentReport(@FieldMap() Map<String, String> maps);  
27 -  
28 - /**  
29 - * 提交举报信息  
30 - *  
31 - * @param maps sid 用户ID  
32 - * liveId 节目ID  
33 - * reason 举报信息  
34 - */  
35 - @POST("/Daren/h5/getLiveDetail.action")  
36 - Observable<Result<BaseInfo<H5PGCVideoInfo>>> getLiveDetail(@QueryMap() Map<String, String> maps);  
37 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceHudong.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.FriendCommentState;  
5 -import com.cnlive.strike.data.network.model.GetDarenComment;  
6 -  
7 -import java.util.List;  
8 -import java.util.Map;  
9 -  
10 -import io.reactivex.Observable;  
11 -import okhttp3.MultipartBody;  
12 -import okhttp3.RequestBody;  
13 -import retrofit2.adapter.rxjava2.Result;  
14 -import retrofit2.http.FieldMap;  
15 -import retrofit2.http.FormUrlEncoded;  
16 -import retrofit2.http.Headers;  
17 -import retrofit2.http.Multipart;  
18 -import retrofit2.http.POST;  
19 -import retrofit2.http.Part;  
20 -import retrofit2.http.PartMap;  
21 -import retrofit2.http.QueryMap;  
22 -  
23 -/**  
24 - * Created by xiansong on 2018/2/28.  
25 - */  
26 -  
27 -public interface ApiServiceHudong {  
28 -  
29 - /**  
30 - * 获取获得评论列表  
31 - *  
32 - * @param maps darenId 达人ID  
33 - * plat 客户端平台  
34 - * pageNo 页码  
35 - * @return  
36 - */  
37 - @Headers("cache:5")  
38 - @POST("Daren/hudong/getDarenComment.action")  
39 - Observable<Result<BaseInfo<GetDarenComment>>> getDarenComment(@QueryMap() Map<String, String> maps);  
40 -  
41 - /**  
42 - * 达人点评  
43 - *  
44 - * @param maps sid 用户ID  
45 - * darenId 达人ID  
46 - * orderId 订单ID  
47 - * grade 分数  
48 - * comment 评论内容  
49 - * plat 客户端平台  
50 - * @return  
51 - */  
52 - @POST("Daren/hudong/commentDaren.action")  
53 - @Multipart  
54 - Observable<Result<BaseInfo>> commentDaren(@PartMap Map<String, RequestBody> maps,  
55 - @Part List<MultipartBody.Part> params);  
56 -  
57 - /**  
58 - * 达人点评  
59 - *  
60 - * @param maps sid 用户ID  
61 - * darenId 达人ID  
62 - * orderId 订单ID  
63 - * grade 分数  
64 - * comment 评论内容  
65 - * plat 客户端平台  
66 - * @return  
67 - */  
68 - @POST("Daren/hudong/commentDaren.action")  
69 - @Multipart  
70 - Observable<Result<BaseInfo>> commentDaren(@PartMap Map<String, RequestBody> maps);  
71 - /**  
72 - * 朋友圈评论  
73 - *  
74 - * @param maps appId 应用ID  
75 - * plat i=IOS客户端,a=Android客户端  
76 - * id 主题ID  
77 - * fromSid 评论者ID(回复时是回复者ID)  
78 - * toSid 发布者ID(回复时是最后一个被回复者ID)  
79 - * comment 评论内容  
80 - * type 评论类型(comment=评论;reply=回复)  
81 - * sign 签名规则  
82 - * @return  
83 - */  
84 - @FormUrlEncoded  
85 - @POST("Daren/hudong/commentMoment.action")  
86 - Observable<Result<BaseInfo<FriendCommentState>>> commentMoment(@FieldMap() Map<String, String> maps);  
87 -  
88 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceIntegra.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.AddIntegration;  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -import com.cnlive.strike.data.network.model.CheckinData;  
6 -import com.cnlive.strike.data.network.model.IntegraContentData;  
7 -import com.cnlive.strike.data.network.model.IntegraData;  
8 -  
9 -import java.util.Map;  
10 -  
11 -import io.reactivex.Observable;  
12 -import retrofit2.adapter.rxjava2.Result;  
13 -import retrofit2.http.GET;  
14 -import retrofit2.http.POST;  
15 -import retrofit2.http.QueryMap;  
16 -  
17 -public interface ApiServiceIntegra {  
18 - /**  
19 - * 积分任务列表  
20 - */  
21 - @GET("Daren/integral/getTasks.action")  
22 - Observable<Result<BaseInfo<IntegraData>>> getIntegraList(@QueryMap() Map<String, String> map);  
23 -  
24 - /**  
25 - * 积分明细  
26 - */  
27 - @GET("Daren/integral/integralRecord.action")  
28 - Observable<Result<BaseInfo<IntegraContentData>>> getIntegraContentList(@QueryMap() Map<String, String> map);  
29 -  
30 - /**  
31 - * 签到  
32 - */  
33 - @POST("Daren/integral/checkIn.action")  
34 - Observable<Result<BaseInfo<CheckinData>>> getCheckIn(@QueryMap() Map<String, String> map);  
35 -  
36 - /**  
37 - * 增加积分  
38 - */  
39 - @POST("Daren/integral/addTask.action")  
40 - Observable<Result<BaseInfo<AddIntegration.DataBean>>> addIntegration(@QueryMap() Map<String, String> map);  
41 -  
42 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceMember.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.BalanceDetailsInfo;  
5 -import com.cnlive.strike.data.network.model.BalanceInfo;  
6 -import com.cnlive.strike.data.network.model.BaseInfo;  
7 -import com.cnlive.strike.data.network.model.DarenInfo;  
8 -import com.cnlive.strike.data.network.model.EncryptKey;  
9 -import com.cnlive.strike.data.network.model.GroupBalanceInfo;  
10 -import com.cnlive.strike.data.network.model.RecordSourceMsgData;  
11 -import com.cnlive.strike.data.network.model.ViewTransferRecordData;  
12 -  
13 -import java.util.Map;  
14 -  
15 -import io.reactivex.Observable;  
16 -import retrofit2.adapter.rxjava2.Result;  
17 -import retrofit2.http.POST;  
18 -import retrofit2.http.QueryMap;  
19 -  
20 -/**  
21 - * 作者: 吴奎庆  
22 - * <p>  
23 - * 时间: 2018/5/9  
24 - * <p>  
25 - * 简介:  
26 - */  
27 -  
28 -public interface ApiServiceMember {  
29 -  
30 - /**  
31 - * 余额  
32 - *  
33 - * @param maps  
34 - * @return  
35 - */  
36 - @POST("Daren/member/getBalance.action")  
37 - Observable<Result<BaseInfo<BalanceInfo>>> getBalance(@QueryMap() Map<String, String> maps);  
38 -  
39 - /**  
40 - * 检查达人审核状态  
41 - */  
42 - @POST("Daren/member/checkDaren.action")  
43 - Observable<Result<DarenInfo>> checkDaren(@QueryMap() Map<String, String> maps);  
44 -  
45 -  
46 - /**  
47 - * 获取余额的消费明细  
48 - */  
49 - @POST("Daren/transaction/getTransactionRecord.action")  
50 - Observable<Result<BaseInfo<BalanceDetailsInfo>>> getBalanceDetails(@QueryMap() Map<String, String> maps);  
51 -  
52 -  
53 - /**  
54 - * 设置修改支付密码  
55 - *  
56 - * @param map  
57 - * @return  
58 - */  
59 - @POST("Daren/wjjPay/setPassword.action")  
60 - Observable<Result<BaseInfo>> setPassword(@QueryMap() Map<String, String> map);  
61 -  
62 - /**  
63 - * 密码受否存在 顺带返回余额  
64 - *  
65 - * @param map  
66 - * @return  
67 - */  
68 - @POST("Daren/wjjPay/passwordIsExisting.action")  
69 - Observable<Result<BaseInfo<GroupBalanceInfo>>> passwordIsExisting(@QueryMap() Map<String, String> map);  
70 -  
71 -  
72 - /**  
73 - * 交易记录详情  
74 - *  
75 - * @param map  
76 - * @return  
77 - */  
78 - @POST("Daren/transaction/getRecordSourceDetail.action")  
79 - Observable<Result<BaseInfo<RecordSourceMsgData>>> getRecordSourceMsg(@QueryMap() Map<String, String> map);  
80 -  
81 - /**  
82 - * 查看与某一个商户的交易记录  
83 - */  
84 - @POST("Daren/groupManagement/viewTransferRecord.action")  
85 - Observable<Result<BaseInfo<ViewTransferRecordData>>> viewTransferRecord(@QueryMap() Map<String, String> map);  
86 -  
87 - /**  
88 - * 返回公钥&随机AESKey  
89 - * @return  
90 - */  
91 - @POST("Daren/wjjPay/getKey.action")  
92 - Observable<Result<BaseInfo<EncryptKey>>> returnEncryptKey(@QueryMap() Map<String, String> map);  
93 -  
94 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceMoment.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -import com.cnlive.strike.data.network.model.CircleData;  
6 -import com.cnlive.strike.data.network.model.FriendCircleNewMessage;  
7 -import com.cnlive.strike.data.network.model.LookUpMyMsgData;  
8 -import com.cnlive.strike.data.network.model.MomentData;  
9 -import com.cnlive.strike.data.network.model.SnowBannerData;  
10 -import com.cnlive.strike.data.network.model.StrangerAccessMomentInfo;  
11 -  
12 -import java.util.List;  
13 -import java.util.Map;  
14 -  
15 -import io.reactivex.Observable;  
16 -import okhttp3.MultipartBody;  
17 -import okhttp3.RequestBody;  
18 -import retrofit2.adapter.rxjava2.Result;  
19 -import retrofit2.http.FieldMap;  
20 -import retrofit2.http.FormUrlEncoded;  
21 -import retrofit2.http.Headers;  
22 -import retrofit2.http.Multipart;  
23 -import retrofit2.http.POST;  
24 -import retrofit2.http.Part;  
25 -import retrofit2.http.PartMap;  
26 -import retrofit2.http.Path;  
27 -import retrofit2.http.QueryMap;  
28 -  
29 -/**  
30 - * 达人有关的接口  
31 - */  
32 -public interface ApiServiceMoment {  
33 -  
34 - /* *//**  
35 - * 上传发布内容  
36 - *//*  
37 - @POST("Daren/moment/releaseMoment.action")  
38 - @Multipart  
39 - Observable<Result<BaseInfo>> releaseMoment(@PartMap Map<String, RequestBody> maps,  
40 - @Part List<MultipartBody.Part> params);  
41 -  
42 - *//**  
43 - * 上传发布内容(图片传七牛)  
44 - *//*  
45 - @POST("Daren/moment/releaseMoment.action")  
46 - Observable<Result<BaseInfo>> releaseMomentNew(@QueryMap Map<String, Object> maps);  
47 -*/  
48 -  
49 - /**  
50 - * 上传发布内容(图片传七牛)  
51 - */  
52 - @POST("{user}")  
53 - Observable<Result<BaseInfo>> releaseMomentNe(@Path(value = "user", encoded = true) String path, @QueryMap Map<String, Object> maps);  
54 -  
55 -  
56 -  
57 -  
58 -  
59 - /**  
60 - * 上传发布内容(不含图片)  
61 - */  
62 - @POST("{user}")  
63 - Observable<Result<BaseInfo>> releaseMomentText(@Path(value = "user", encoded = true) String path, @QueryMap() Map<String, String> maps);  
64 -  
65 - /* *//**  
66 - * 上传目击者发布内容(图片传七牛)  
67 - *//*  
68 - @POST("Daren/witness/releaseWitness.action")  
69 - Observable<Result<BaseInfo>> releaseWitness(@QueryMap Map<String, Object> maps);*/  
70 -  
71 - /**  
72 - * 上传目击者发布内容(图片传七牛)  
73 - */  
74 - @POST("Daren/witness/releaseWitness.action")  
75 - Observable<Result<BaseInfo>> releaseWitnessnew(@QueryMap Map<String, String> maps);  
76 -  
77 - /**  
78 - * 获取生活圈渠道列表  
79 - */  
80 - @POST("Daren/publishType/getPublishTypeList.action")  
81 - Observable<Result<BaseInfo<CircleData>>> releaseCirclePath(@QueryMap() Map<String, String> maps);  
82 -  
83 - /**  
84 - * 冰雪活动上传发布内容  
85 - */  
86 - @POST("Daren/snow/releaseSnow.action")  
87 - @Multipart  
88 - Observable<Result<BaseInfo>> releaseSnow(@PartMap Map<String, RequestBody> maps,  
89 - @Part List<MultipartBody.Part> params);  
90 -  
91 - /**  
92 - * 冰雪活动上传发布内容(图片新接口格式)  
93 - */  
94 - @POST("Daren/snow/releaseSnow.action")  
95 - Observable<Result<BaseInfo>> releaseSnow(@QueryMap() Map<String, Object> maps);  
96 - /**  
97 - * 冰雪活动上传发布内容(图片新接口格式)  
98 - */  
99 - @POST("Daren/snow/releaseSnow.action")  
100 - Observable<Result<BaseInfo>> releaseSnowNew(@QueryMap() Map<String, String> maps);  
101 -  
102 - /**  
103 - * 冰雪活动上传发布内容(不含图片)  
104 - */  
105 - @POST("Daren/snow/getSnowBanner.action")  
106 - Observable<Result<BaseInfo<List<SnowBannerData>>>> getSnowBanner(@QueryMap() Map<String, String> maps);  
107 -  
108 - /**  
109 - * 获取相册内容  
110 - */  
111 - @Headers("cache:5")  
112 - @POST("Daren/moment/myMoment.action")  
113 - Observable<Result<BaseInfo<MomentData>>> myMoment(@QueryMap() Map<String, String> maps);  
114 -  
115 - /**  
116 - * 获取朋友圈内容  
117 - */  
118 - @Headers("cache:5")  
119 - @POST("Daren/moment/friendMoment.action")  
120 - Observable<Result<BaseInfo<MomentData>>> friendMoment(@QueryMap() Map<String, String> maps);  
121 -  
122 - @POST("Daren/moment/deleteMyMoment.action")  
123 - Observable<Result<BaseInfo>> deleteMyMoment(@QueryMap() Map<String, String> maps);  
124 -  
125 - /**  
126 - * 获取新消息列表  
127 - *  
128 - * @param maps sid 用户ID  
129 - * @return  
130 - */  
131 - @POST("Daren/moment/getNewMsgList.action")  
132 - Observable<Result<BaseInfo<List<FriendCircleNewMessage>>>> getNewMsgList(@QueryMap() Map<String, String> maps);  
133 -  
134 -  
135 - @POST("Daren/moment/deleteNewMsg.action")  
136 - Observable<Result<BaseInfo>> deleteNewMsg(@QueryMap() Map<String, String> maps);  
137 -  
138 -  
139 - /**  
140 - * 查看个人中心  
141 - */  
142 - @POST("Daren/moment/lookUpMyMsg.action")  
143 - Observable<Result<BaseInfo<LookUpMyMsgData>>> lookUpMyMsg(@QueryMap() Map<String, String> maps);  
144 -  
145 - /**  
146 - * 点赞  
147 - */  
148 - @POST("Daren/moment/praiseMoment.action")  
149 - Observable<Result<BaseInfo>> praiseMoment(@QueryMap() Map<String, String> maps);  
150 -  
151 - /**  
152 - * 获取朋友圈内容  
153 - * momentId  
154 - */  
155 - @POST("Daren/moment/getMomentDetail.action")  
156 - Observable<Result<BaseInfo<MomentData.FriendItem>>> getMomentDetail(@QueryMap() Map<String, String> maps);  
157 -  
158 - /**  
159 - * 设置陌生人生活圈权限  
160 - */  
161 - @FormUrlEncoded  
162 - @POST("Daren/moment/strangerSwitch.action")  
163 - Observable<Result<BaseInfo>> setStrangerAccessMoment(@FieldMap() Map<String, String> maps);  
164 -  
165 - /**  
166 - * 检查陌生人生活圈权限状态  
167 - */  
168 - @FormUrlEncoded  
169 - @POST("Daren/moment/findStrangerSwitch.action")  
170 - Observable<Result<BaseInfo<StrangerAccessMomentInfo>>> getStrangerAccessMomentStatus(@FieldMap() Map<String, String> maps);  
171 -  
172 -}  
173 -  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceOpen.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.CommentListData;  
5 -import com.cnlive.strike.data.network.model.DataEntity;  
6 -import com.cnlive.strike.data.network.model.FaceData;  
7 -import com.cnlive.strike.data.network.model.FriendCommentState;  
8 -import com.cnlive.strike.data.network.model.FriendListData;  
9 -import com.cnlive.strike.data.network.model.InteractiveReadAllCommentData;  
10 -import com.cnlive.strike.data.network.model.LiveActivityPlayInfo;  
11 -import com.cnlive.strike.data.network.model.PlayerVodRates;  
12 -import com.cnlive.strike.data.network.model.StorageInfoData;  
13 -import com.cnlive.strike.data.network.model.TokenData;  
14 -import com.cnlive.strike.data.network.model.UploadAuthData;  
15 -import com.cnlive.strike.data.network.model.UserData;  
16 -import com.cnlive.strike.data.network.model.VideoUploadResult;  
17 -  
18 -import java.util.List;  
19 -import java.util.Map;  
20 -  
21 -import io.reactivex.Observable;  
22 -import okhttp3.MultipartBody;  
23 -import okhttp3.RequestBody;  
24 -import retrofit2.adapter.rxjava2.Result;  
25 -import retrofit2.http.FieldMap;  
26 -import retrofit2.http.FormUrlEncoded;  
27 -import retrofit2.http.GET;  
28 -import retrofit2.http.Multipart;  
29 -import retrofit2.http.POST;  
30 -import retrofit2.http.Part;  
31 -import retrofit2.http.PartMap;  
32 -import retrofit2.http.QueryMap;  
33 -  
34 -/**  
35 - * Created by xiansong on 2018/3/22.  
36 - */  
37 -  
38 -public interface ApiServiceOpen {  
39 -  
40 - /**  
41 - * @param maps appId 应用ID  
42 - * plat i=IOS客户端,a=Android客户端  
43 - * id 主题ID  
44 - * page 页号  
45 - * pageSize 每页显示的条数  
46 - * sign 签名  
47 - * @return  
48 - */  
49 -  
50 - @GET("open/api2/commentServices/services/commentForChat/readAll")  
51 - Observable<Result<BaseInfo<FriendListData>>> readAllComment(@QueryMap() Map<String, String> maps);  
52 -  
53 - /**  
54 - * 删除朋友圈评论  
55 - *  
56 - * @param maps appId 应用ID  
57 - * plat i=IOS客户端,a=Android客户端  
58 - * id 主题ID  
59 - * page 页号  
60 - * pageSize 每页显示的条数  
61 - * sign 签名  
62 - * @return  
63 - */  
64 -  
65 - @POST("open/api2/commentServices/services/commentForChat/delete")  
66 - Observable<Result<BaseInfo>> delete(@QueryMap() Map<String, String> maps);  
67 -  
68 - /**  
69 - * 读取点赞列表  
70 - *  
71 - * @param maps  
72 - * @return  
73 - */  
74 - @POST("open/api2/support/loadSupport")  
75 - Observable<Result<BaseInfo<FriendListData>>> loadSupport(@QueryMap() Map<String, String> maps);  
76 -  
77 -  
78 - /**  
79 - * 读取点赞列表  
80 - *  
81 - * @param maps  
82 - * @return  
83 - */  
84 - @POST("open/api2/support/readAll")  
85 - Observable<Result<BaseInfo<FriendListData>>> readAllLike(@QueryMap() Map<String, String> maps);  
86 -  
87 - /**  
88 - * 短视频入库点播云接口for app  
89 - * 创建短视频信息进行存储  
90 - *  
91 - * @param maps md5 string true MD5  
92 - * appId string true APPID  
93 - * videoKey string true 短视频相对路径(支持金山云存储)  
94 - * name string false 短视频名称  
95 - * description string false 短视频的信息描述  
96 - * isHorizontalScreen int true 屏幕方向,0:垂直即竖屏 /1:水平即横屏 ,默认为1  
97 - * userId string false 短视频的信息用户标识  
98 - * callBackUrl string false 短视频信息回调地址  
99 - * platform_id string true APP bundleID 或者是包名,平台鉴权使用  
100 - * extensions string false 扩展字段,格式  
101 - * timestamp int true 精确到秒,当前Unix时间戳,请保证请求服务器时间正确  
102 - * sign String true 签名规则  
103 - * @return  
104 - */  
105 -  
106 - @POST("open/api2/vod_epg/svInputMamForAPP")  
107 - Observable<Result<BaseInfo<VideoUploadResult>>> svInputMamForAPP(@QueryMap() Map<String, String> maps);  
108 -  
109 - /**  
110 - * 获取点播评论列表  
111 - */  
112 - @POST("open/api2/commentServices/services/commentForChat/loadComment")  
113 - Observable<Result<BaseInfo<FriendListData>>> releaseVideoPath(@QueryMap() Map<String, String> maps);  
114 -  
115 - /**  
116 - * 获取pgc评论列表,此接口不能对某人回复的  
117 - */  
118 - @GET("open/api2/commentServices/services/commentForHdBySpId/loadComment")  
119 - Observable<Result<BaseInfo<CommentListData>>> getAllComments(@QueryMap() Map<String, String> maps);  
120 -  
121 - /**  
122 - * 评论点播节目  
123 - *  
124 - * @param map  
125 - * @return  
126 - */  
127 - @POST("open/api2/commentServices/services/commentForChat/insert")  
128 - Observable<Result<BaseInfo<FriendCommentState>>> sendVideoComment(@QueryMap Map<String, String> map);  
129 -  
130 - /**  
131 - * 删除评论  
132 - *  
133 - * @param map  
134 - * @return  
135 - */  
136 - @POST("open/api2/commentServices/services/commentForChat/delete")  
137 - Observable<Result<BaseInfo>> deleteVideoComment(@QueryMap Map<String, String> map);  
138 -  
139 - /**  
140 - * 读取点赞列表  
141 - *  
142 - * @param maps  
143 - * @return  
144 - */  
145 - @POST("open/api2/user/readUserById")  
146 - Observable<Result<BaseInfo<DataEntity>>> readUserById(@QueryMap() Map<String, String> maps);  
147 -  
148 - /**  
149 - * 上传鉴权  
150 - *  
151 - * @param maps  
152 - * @return  
153 - */  
154 - @POST("open/api2/vod_epg/getUploadAuthForApp")  
155 - Observable<Result<BaseInfo<UploadAuthData>>> getUploadAuthForApp(@QueryMap Map<String, String> maps);  
156 -  
157 - /**  
158 - * 获取存储信息  
159 - *  
160 - * @param map  
161 - * @return  
162 - */  
163 - @POST("open/api2/storage/getStorageInfo")  
164 - Observable<Result<BaseInfo<List<StorageInfoData>>>> getStorageInfo(@QueryMap Map<String, String> map);  
165 -  
166 - /**  
167 - * 获取直播活动播放信息  
168 - *  
169 - * @param map activityId string true 由开发者通过API创建接口或者在直播云管理端创建,保证唯一性  
170 - */  
171 - @FormUrlEncoded  
172 - @POST("open/api2/live_epg/getLiveActivityPlayInfo4App")  
173 - Observable<Result<BaseInfo<LiveActivityPlayInfo>>> getLiveActivityPlayInfo(@FieldMap Map<String, String> map);  
174 -  
175 - /**  
176 - * 互动云获取一条节目的评论列表  
177 - *  
178 - * @param map  
179 - * @return  
180 - */  
181 - @POST("open/api2/commentServices/commentForHdBySpId/readAllComment")  
182 - Observable<Result<BaseInfo<InteractiveReadAllCommentData>>> interactiveReadAllComment(@QueryMap Map<String, String> map);  
183 -  
184 - /**  
185 - * 评论一条节目  
186 - *  
187 - * @param map  
188 - * @return  
189 - */  
190 - @POST("open/api2/commentServices/commentForHdBySpId/insertComment")  
191 - Observable<Result<BaseInfo<FriendCommentState>>> insertComment(@QueryMap Map<String, String> map);  
192 -  
193 - /**  
194 - * 顶踩一条节目 0:踩 1:顶  
195 - *  
196 - * @param map  
197 - * @return  
198 - */  
199 - @POST("open/api2/ctServices/supportForHd/support")  
200 - Observable<Result<BaseInfo>> support(@QueryMap Map<String, String> map);  
201 -  
202 -  
203 - /**  
204 - * 快捷登录前发送验证码  
205 - *  
206 - * @param map  
207 - * @return  
208 - */  
209 - @POST("open/api2/user/sendVerifyCode")  
210 - Observable<Result<BaseInfo>> sendVerifyCodeBefQuickLogin(@QueryMap Map<String, String> map);  
211 -  
212 - /**  
213 - * 快捷登录  
214 - *  
215 - * @param map  
216 - * @return  
217 - */  
218 - @POST("open/api2/user/loginInQuickly")  
219 - Observable<Result<BaseInfo<UserData>>> quickLogin(@QueryMap Map<String, String> map);  
220 -  
221 - /**  
222 - * 登录  
223 - *  
224 - * @param map  
225 - * @return  
226 - */  
227 - @POST("open/api2/user/loginIn")  
228 - Observable<Result<BaseInfo<UserData>>> login(@QueryMap Map<String, String> map);  
229 -  
230 - /**  
231 - * 查询用户信息  
232 - *  
233 - * @param map  
234 - * @return  
235 - */  
236 - @POST("open/api2/user/readUserById")  
237 - Observable<Result<BaseInfo<UserData>>> queryUserInfo(@QueryMap Map<String, String> map);  
238 -  
239 - /**  
240 - * 更新用户附加信息  
241 - *  
242 - * @param map  
243 - * @return  
244 - */  
245 - @POST("open/api2/user/updateUserExtInfo")  
246 - Observable<Result<BaseInfo>> updateUserExtInfo(@QueryMap Map<String, String> map);  
247 -  
248 - /**  
249 - * 修改用户单项信息  
250 - *  
251 - * @param map  
252 - * @return  
253 - */  
254 - @POST("open/api2/user/updateUserById")  
255 - Observable<Result<BaseInfo>> modifyUserInfo(@QueryMap Map<String, String> map);  
256 -  
257 -  
258 - /**  
259 - * 注册或修改手机号前发手机验证码  
260 - *  
261 - * @param map  
262 - * @return  
263 - */  
264 - @POST("open/api2/user/sendVerifyCodeForUnRegistered")  
265 - Observable<Result<BaseInfo>> sendVerifyCodeForUnRegistered(@QueryMap Map<String, String> map);  
266 -  
267 - /**  
268 - * 更新手机号  
269 - *  
270 - * @param map  
271 - * @return  
272 - */  
273 - @POST("open/api2/user/updateMobileById")  
274 - Observable<Result<BaseInfo>> updateMobile(@QueryMap Map<String, String> map);  
275 -  
276 - /**  
277 - * 注册  
278 - *  
279 - * @param map  
280 - * @return  
281 - */  
282 - @POST("open/api2/user/register")  
283 - Observable<Result<BaseInfo<UserData>>> register(@QueryMap Map<String, String> map);  
284 -  
285 -  
286 - /**  
287 - * 获取access_token  
288 - *  
289 - * @param map  
290 - * @return  
291 - */  
292 - @POST("open/api2/token")  
293 - Observable<Result<BaseInfo<TokenData>>> accessToken(@QueryMap Map<String, String> map);  
294 -  
295 - /**  
296 - * 上传头像  
297 - *  
298 - * @param map  
299 - * @param params  
300 - * @return  
301 - */  
302 - @Multipart  
303 - @POST("open/api2/user/updateUserFaceById")  
304 - Observable<Result<BaseInfo<FaceData>>> updateUserFace(@PartMap Map<String, RequestBody> map,  
305 - @Part List<MultipartBody.Part> params);  
306 -  
307 - /**  
308 - * 获取点播云视频的码率  
309 - *  
310 - * @param map  
311 - * @return  
312 - */  
313 - @GET("open/api2/vod_epg/getRates")  
314 - Observable<Result<BaseInfo<PlayerVodRates>>> getRates(@QueryMap Map<String, String> map);  
315 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceOrder.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.GetOrderByStatusData;  
5 -import com.cnlive.strike.data.network.model.OrderInfoData;  
6 -  
7 -import java.util.List;  
8 -import java.util.Map;  
9 -  
10 -import io.reactivex.Observable;  
11 -import okhttp3.MultipartBody;  
12 -import okhttp3.RequestBody;  
13 -import retrofit2.adapter.rxjava2.Result;  
14 -import retrofit2.http.FieldMap;  
15 -import retrofit2.http.FormUrlEncoded;  
16 -import retrofit2.http.Multipart;  
17 -import retrofit2.http.POST;  
18 -import retrofit2.http.Part;  
19 -import retrofit2.http.PartMap;  
20 -import retrofit2.http.QueryMap;  
21 -  
22 -/**  
23 - * Created by gujun on 2018/2/6.  
24 - */  
25 -  
26 -public interface ApiServiceOrder {  
27 -  
28 - /**  
29 - * 获取订单信息(更新)  
30 - *  
31 - * @param maps  
32 - * @return  
33 - */  
34 - @FormUrlEncoded  
35 - @POST("Daren/order/getOrderItem.action")  
36 - Observable<Result<BaseInfo<OrderInfoData>>> getOrderItem(@FieldMap Map<String, String> maps);  
37 -  
38 - /**  
39 - * 生成订单  
40 - *  
41 - * @param maps  
42 - * @return  
43 - */  
44 - @POST("Daren/order/createOrder.action")  
45 - Observable<Result<BaseInfo<OrderInfoData>>> createOrder(@QueryMap Map<String, String> maps);  
46 -  
47 - /**  
48 - * 修改订单  
49 - *  
50 - * @param maps  
51 - * @return  
52 - */  
53 - @POST("Daren/order/modifyOrder.action")  
54 - Observable<Result<BaseInfo<OrderInfoData>>> modifyOrder(@QueryMap Map<String, String> maps);  
55 -  
56 - /**  
57 - * 确认订单  
58 - *  
59 - * @param maps  
60 - * @return  
61 - */  
62 - @FormUrlEncoded  
63 - @POST("Daren/order/submitOrder.action")  
64 - Observable<Result<BaseInfo<OrderInfoData>>> confirmOrder(@FieldMap Map<String, String> maps);  
65 -  
66 - /**  
67 - * 取消订单  
68 - *  
69 - * @param maps  
70 - * @return  
71 - */  
72 - @FormUrlEncoded  
73 - @POST("Daren/order/cancelOrder.action")  
74 - Observable<Result<BaseInfo<OrderInfoData>>> cancelOrder(@FieldMap Map<String, String> maps);  
75 -  
76 - /**  
77 - * 订单有误操作  
78 - *  
79 - * @param maps  
80 - * @return  
81 - */  
82 - @FormUrlEncoded  
83 - @POST("Daren/order/correctOrder.action")  
84 - Observable<Result<BaseInfo<OrderInfoData>>> correctOrder(@FieldMap Map<String, String> maps);  
85 -  
86 - /**  
87 - * 根据状态查询订单列表  
88 - *  
89 - * @param maps  
90 - * @return  
91 - */  
92 - @FormUrlEncoded  
93 - @POST("Daren/order/getOrdersByStatus.action")  
94 - Observable<Result<BaseInfo<GetOrderByStatusData>>> getOrdersByStatus(@FieldMap Map<String, String> maps);  
95 -  
96 - /**  
97 - * 申请退款  
98 - */  
99 - @POST("Daren/order/applyRefund.action")  
100 - @Multipart  
101 - Observable<Result<BaseInfo>> applyRefund(@PartMap Map<String, RequestBody> maps,  
102 - @Part List<MultipartBody.Part> params);  
103 -  
104 - /**  
105 - * 申请退款(不含图片)  
106 - */  
107 - @POST("Daren/order/applyRefund.action")  
108 - @Multipart  
109 - Observable<Result<BaseInfo>> applyRefund(@PartMap() Map<String, RequestBody> maps);  
110 -  
111 - /**  
112 - * 确认收货  
113 - *  
114 - * @param maps  
115 - * @return  
116 - */  
117 - @FormUrlEncoded  
118 - @POST("Daren/order/confirmRecv.action")  
119 - Observable<Result<BaseInfo<Object>>> confirmRecv(@FieldMap Map<String, String> maps);  
120 -  
121 - /**  
122 - * 删除订单  
123 - *  
124 - * @param maps  
125 - * @return  
126 - */  
127 - @POST("Daren/order/deleteOrder.action")  
128 - Observable<Result<BaseInfo<Object>>> deleteOrder(@QueryMap() Map<String, String> maps);  
129 -  
130 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceQrcode.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.CheckQrUrlInfo;  
5 -import com.cnlive.strike.data.network.model.CottonCandyInfo;  
6 -import com.cnlive.strike.data.network.model.CreateQrInfo;  
7 -import com.cnlive.strike.data.network.model.DarenInfoModel;  
8 -import com.cnlive.strike.data.network.model.QrActivityInfo;  
9 -import com.cnlive.strike.data.network.model.QrOrderInfo;  
10 -import com.cnlive.strike.data.network.model.QrSignInfo;  
11 -  
12 -import java.util.Map;  
13 -  
14 -import io.reactivex.Observable;  
15 -import retrofit2.adapter.rxjava2.Result;  
16 -import retrofit2.http.FieldMap;  
17 -import retrofit2.http.FormUrlEncoded;  
18 -import retrofit2.http.POST;  
19 -import retrofit2.http.QueryMap;  
20 -  
21 -public interface ApiServiceQrcode {  
22 - /**  
23 - * 获取生成二维码的数据  
24 - * @param map  
25 - * @return  
26 - * appId  
27 - * sid  
28 - * type 生成或充值二维码 生成:gen 重置:reset  
29 - */  
30 - @POST("Daren/qrcode/genOrResetQrCode.action")  
31 - Observable<Result<BaseInfo<CreateQrInfo>>> getQrContent(@QueryMap() Map<String, String> map);  
32 -  
33 -  
34 - @POST("Daren/qrcode/checkQrCode.action")  
35 - Observable<Result<BaseInfo<CreateQrInfo>>> checkQr(@QueryMap() Map<String, String> map);  
36 -  
37 - /**  
38 - * 获取达人信息  
39 - *  
40 - * @param param  
41 - * @return  
42 - */  
43 - @POST("Daren/member/getDarenById.action")  
44 - Observable<Result<BaseInfo<DarenInfoModel>>> getDarenBySid(@QueryMap Map<String, String> param);  
45 -  
46 - /**  
47 - * 获取达人信息  
48 - *  
49 - * @param param  
50 - * @return  
51 - */  
52 - @FormUrlEncoded  
53 - @POST("Daren/order/addOrder.action")  
54 - Observable<Result<BaseInfo<QrOrderInfo>>> getQrOrder(@FieldMap Map<String, String> param);  
55 - /**  
56 - * 扫码签到(临时)  
57 - *  
58 - * @param param  
59 - * @return  
60 - */  
61 - @POST("Daren/sign/checkSignInfo.action")  
62 - Observable<Result<BaseInfo<QrSignInfo>>> checkSignInfo(@QueryMap Map<String, String> param);  
63 -  
64 - /**  
65 - * 扫码活动(临时)  
66 - * @param param  
67 - * @return  
68 - */  
69 - @POST("Daren/sign/checkQrActivity.action")  
70 - Observable<Result<BaseInfo<QrActivityInfo>>> checkQrActivity(@QueryMap Map<String, String> param);  
71 -  
72 - /**  
73 - * 校验二维码数据  
74 - * @param param  
75 - * @return  
76 - */  
77 - @POST("Daren/qrcode/checkQrCodeUrl.action")  
78 - Observable<Result<BaseInfo<CheckQrUrlInfo>>> checkQrUrl(@QueryMap Map<String, String> param);  
79 -  
80 -  
81 - /**  
82 - * 生成棉花糖订单信息  
83 - * @param param  
84 - * @return  
85 - */  
86 -  
87 - @POST("Daren/order/addOrderMHT.action")  
88 - Observable<Result<BaseInfo<CottonCandyInfo>>> getCottonCandy(@QueryMap Map<String, String> param);  
89 -  
90 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceReply.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -import com.cnlive.strike.data.network.model.QuickShortMessageData;  
6 -  
7 -import java.util.ArrayList;  
8 -import java.util.Map;  
9 -  
10 -import io.reactivex.Observable;  
11 -import retrofit2.adapter.rxjava2.Result;  
12 -import retrofit2.http.FieldMap;  
13 -import retrofit2.http.FormUrlEncoded;  
14 -import retrofit2.http.POST;  
15 -import retrofit2.http.QueryMap;  
16 -  
17 -/**  
18 - * 达人快捷短语有关的接口  
19 - */  
20 -public interface ApiServiceReply {  
21 -  
22 - /**  
23 - * 更新快捷短语  
24 - *  
25 - * @param maps  
26 - * @return  
27 - */  
28 - @FormUrlEncoded  
29 - @POST("Daren/reply/updateQuickReply.action")  
30 - Observable<Result<BaseInfo<Object>>> updateQuickReply(@FieldMap Map<String, String> maps);  
31 -  
32 - /**  
33 - * 读取快捷短语列表  
34 - *  
35 - * @param maps  
36 - * @return  
37 - */  
38 - @POST("Daren/reply/readQuickReply.action")  
39 - Observable<Result<BaseInfo<ArrayList<QuickShortMessageData>>>> readQuickReply(@QueryMap() Map<String, String> maps);  
40 -  
41 - /**  
42 - * 添加一条快捷短语  
43 - *  
44 - * @param maps  
45 - * @return  
46 - */  
47 - @FormUrlEncoded  
48 - @POST("Daren/reply/addQuickReply.action")  
49 - Observable<Result<BaseInfo<Object>>> addQuickReply(@FieldMap Map<String, String> maps);  
50 -  
51 - /**  
52 - * 删除某一条快捷短语  
53 - *  
54 - * @param maps  
55 - * @return  
56 - */  
57 - @POST("Daren/reply/deleteQuickReply.action")  
58 - Observable<Result<BaseInfo<Object>>> deleteQuickReply(@QueryMap() Map<String, String> maps);  
59 -  
60 -}  
61 -  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceSms.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -  
5 -import java.util.Map;  
6 -  
7 -import io.reactivex.Observable;  
8 -import retrofit2.adapter.rxjava2.Result;  
9 -import retrofit2.http.POST;  
10 -import retrofit2.http.QueryMap;  
11 -  
12 -/**  
13 - * Created by Lynn on 2018/6/7.  
14 - */  
15 -  
16 -public interface ApiServiceSms {  
17 -  
18 -  
19 - /**  
20 - * 发送验证码(修改支付密码)  
21 - */  
22 - @POST("Daren/sms/sendSMS.action")  
23 - Observable<Result<BaseInfo>> sendSms(@QueryMap Map<String, String> map);  
24 -  
25 - /**  
26 - * 验证验证码(修改支付密码)  
27 - *  
28 - * @param map  
29 - * @return  
30 - */  
31 - @POST("Daren/sms/checkVerifyCode.action")  
32 - Observable<Result<BaseInfo>> checkVerifyCode(@QueryMap Map<String, String> map);  
33 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceStock.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -import com.cnlive.strike.data.network.model.BaseInfo;  
4 -import com.cnlive.strike.data.network.model.CollectionData;  
5 -  
6 -import java.util.Map;  
7 -  
8 -import io.reactivex.Observable;  
9 -import retrofit2.adapter.rxjava2.Result;  
10 -import retrofit2.http.POST;  
11 -import retrofit2.http.QueryMap;  
12 -  
13 -public interface ApiServiceStock {  
14 -  
15 - /**  
16 - * 收藏接口  
17 - *  
18 - * @return  
19 - */  
20 - @POST("Daren/stock/collection.action")  
21 - Observable<Result<BaseInfo>> collection(@QueryMap() Map<String, String> map);  
22 -  
23 -  
24 - /**  
25 - * 获取收藏的 列表  
26 - *  
27 - * @param map  
28 - * @return  
29 - */  
30 - @POST("Daren/stock/getCollectionList.action")  
31 - Observable<Result<BaseInfo<CollectionData>>> getCollection(@QueryMap() Map<String, String> map);  
32 -  
33 - /**  
34 - * 取消收藏  
35 - *  
36 - * @param map  
37 - * @return  
38 - */  
39 - @POST("Daren/stock/deleteCollection.action")  
40 - Observable<Result<BaseInfo<BaseInfo>>> cancleCollection(@QueryMap() Map<String, String> map);  
41 -  
42 -  
43 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/api/ApiServiceSub.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.api;  
2 -  
3 -  
4 -import com.cnlive.strike.data.network.model.BaseInfo;  
5 -import com.cnlive.strike.data.network.model.GetDarenHomeData;  
6 -import com.cnlive.strike.data.network.model.GetDarensData;  
7 -import com.cnlive.strike.data.network.model.GroupNotificationListData;  
8 -import com.cnlive.strike.data.network.model.SearchDarenData;  
9 -import com.cnlive.strike.data.network.model.SysNumberSubsData;  
10 -import com.cnlive.strike.data.network.model.SystemNotificationListData;  
11 -  
12 -import java.util.List;  
13 -import java.util.Map;  
14 -  
15 -import io.reactivex.Observable;  
16 -import retrofit2.adapter.rxjava2.Result;  
17 -import retrofit2.http.FieldMap;  
18 -import retrofit2.http.FormUrlEncoded;  
19 -import retrofit2.http.Headers;  
20 -import retrofit2.http.POST;  
21 -import retrofit2.http.QueryMap;  
22 -  
23 -/**  
24 - * 达人有关的接口  
25 - */  
26 -public interface ApiServiceSub {  
27 -  
28 - /**  
29 - * 获取达人号列表接口  
30 - *  
31 - * @param maps  
32 - * @return  
33 - */  
34 - @Headers("cache:2")  
35 - @POST("Daren/sub/getDarenSubs.action")  
36 - Observable<Result<BaseInfo<List<SysNumberSubsData>>>> getDarenSubs(@QueryMap() Map<String, String> maps);  
37 -  
38 - /**  
39 - * 获取生活号列表接口  
40 - *  
41 - * @param maps  
42 - * @return  
43 - */  
44 - @POST("Daren/sub/getLifeSubs.action")  
45 - Observable<Result<BaseInfo<List<SysNumberSubsData>>>> getLifeSubs(@QueryMap() Map<String, String> maps);  
46 -  
47 - /**  
48 - * 获取关注列表接口  
49 - *  
50 - * @param maps  
51 - * @return  
52 - */  
53 - @POST("Daren/sub/getDarens.action")  
54 - Observable<Result<BaseInfo<GetDarensData>>> getDarens(@QueryMap() Map<String, String> maps);  
55 -  
56 - /**  
57 - * 获取未关注列表接口  
58 - *  
59 - * @param maps  
60 - * @return  
61 - */  
62 - @POST("Daren/classify/getUnFansOrDarenBean.action")  
63 - Observable<Result<BaseInfo<GetDarensData>>> getUnFollowDarens(@QueryMap() Map<String, String> maps);  
64 -  
65 - /**  
66 - * 获取关注列表接口(分类页面)  
67 - *  
68 - * @param maps  
69 - * @return  
70 - */  
71 - @POST("Daren/classify/getDarenList.action")  
72 - Observable<Result<BaseInfo<GetDarensData>>> getDarenList(@QueryMap() Map<String, String> maps);  
73 -  
74 - /**  
75 - * 分类页面--搜索  
76 - *  
77 - * @param maps  
78 - * @return  
79 - */  
80 - @FormUrlEncoded  
81 - @POST("Daren/search/searchDaren.action")  
82 - Observable<Result<BaseInfo<List<SearchDarenData>>>> searchDaren(@FieldMap() Map<String, String> maps);  
83 -  
84 - @Headers("cache:5")  
85 - @POST("Daren/sub/getFans.action")  
86 - Observable<Result<BaseInfo<GetDarensData>>> getFans(@QueryMap() Map<String, String> map);  
87 -  
88 - @Headers("cache:5")  
89 - @POST("Daren/sub/getDarenHome.action")  
90 - Observable<Result<BaseInfo<GetDarenHomeData>>> getDarenHome(@QueryMap() Map<String, String> maps);  
91 -  
92 - /**  
93 - * 获取系统通知列表或订单通知列表  
94 - *  
95 - * @param maps  
96 - * @return  
97 - */  
98 - @POST("Daren/sub/getLifeHome.action")  
99 - Observable<Result<BaseInfo<SystemNotificationListData>>> getLifeSystemHome(@QueryMap() Map<String, String> maps);  
100 -  
101 - /**  
102 - * 关注  
103 - *  
104 - * @param map appId 应用Id  
105 - * sid 用户Id  
106 - * darenIds 达人Id,多个用逗号分隔  
107 - * @return  
108 - */  
109 - @POST("Daren/sub/addDarenSub.action")  
110 - Observable<Result<BaseInfo>> addDaren(@QueryMap() Map<String, String> map);  
111 -  
112 -  
113 - /**  
114 - * 取消关注  
115 - *  
116 - * @param map appId 应用Id  
117 - * sid 用户Id  
118 - * darenIds 达人Id,多个用逗号分隔  
119 - * @return  
120 - */  
121 - @POST("Daren/sub/cancelDarenSub.action")  
122 - Observable<Result<BaseInfo>> cancelDaren(@QueryMap() Map<String, String> map);  
123 -  
124 - @POST("Daren/sub/deleteFriend.action")  
125 - Observable<Result<BaseInfo>> deleteFriend(@QueryMap() Map<String, String> maps);  
126 -  
127 - /**  
128 - * 从达人号列表删除某达人  
129 - *  
130 - * @return  
131 - */  
132 - @POST("Daren/sub/deleteDarenSubs.action")  
133 - Observable<Result<BaseInfo>> deleteDarenSubs(@QueryMap() Map<String, String> map);  
134 -  
135 - /**  
136 - * 删除生活号列表中的订单通知和系统通知的item  
137 - *  
138 - * @return  
139 - */  
140 - @POST("Daren/sub/deleteLifeSubs.action")  
141 - Observable<Result<BaseInfo>> deleteLifeSubs(@QueryMap() Map<String, String> map);  
142 -  
143 - /**  
144 - * 获取通知号的列表数据  
145 - *  
146 - * @return  
147 - */  
148 - @POST("Daren/sub/getNoticeSubs.action")  
149 - Observable<Result<BaseInfo<GroupNotificationListData>>> getNoticeSubs(@QueryMap() Map<String, String> map);  
150 -  
151 - /**  
152 - * 从群组通知列表删除某条通知  
153 - *  
154 - * @return  
155 - */  
156 - @POST("Daren/sub/deleteNotice.action")  
157 - Observable<Result<BaseInfo>> deleteNotice(@QueryMap() Map<String, String> map);  
158 -  
159 -}  
160 -  
lib_network/src/main/java/com/cnlive/strike/data/network/model/ActivityRecordDetailsInfo.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.model;  
2 -  
3 -import java.util.List;  
4 -  
5 -/**  
6 - * 作者: 吴奎庆  
7 - * <p>  
8 - * 时间: 2018/5/29  
9 - * <p>  
10 - * 简介:  
11 - */  
12 -  
13 -public class ActivityRecordDetailsInfo {  
14 -  
15 -  
16 - /**  
17 - * createTime : 2018-05-29 13:42:15  
18 - * description :  
19 - * endTime : 2018-05-29 15:40:00  
20 - * fundsId : 68f31cc1e5ec4dd793297facd72358af  
21 - * groupId : @TGS#1CEBXTHFD  
22 - * ownerMsg : {"image":"http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0504/1525422551146_small.jpg","nickName":"牛道健","userId":"10505015"}  
23 - * groupMembers : [{"payTime":"","type":false,"user":{"image":"http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0513/1526178128533_small.jpg","nickName":"张旭","userId":"10499533"}},{"payTime":"","type":false,"user":{"image":"http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0417/1523951343993_small.jpg","nickName":"写bug的程序猿","userId":"10458139"}},{"payTime":"","type":false,"user":{"image":"http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0504/1525422551146_small.jpg","nickName":"牛道健","userId":"10505015"}},{"payTime":"","type":false,"user":{"image":"http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0511/1526003358652_small.jpg","nickName":"牛道健","userId":"10504908"}}]  
24 - * payList : [{"payTime":"","type":false,"user":{"image":"http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0513/1526178128533_small.jpg","nickName":"张旭","userId":"10499533"}}]  
25 - * price : 0.1  
26 - * type : 1  
27 - */  
28 -  
29 - private String createTime;  
30 -  
31 - public String getTotalPrice() {  
32 - return totalPrice;  
33 - }  
34 -  
35 - public void setTotalPrice(String totalPrice) {  
36 - this.totalPrice = totalPrice;  
37 - }  
38 -  
39 - private String totalPrice;  
40 - private String description;  
41 - private String endTime;  
42 - private String fundsId;  
43 - private String groupId;  
44 - private OwnerMsgBean ownerMsg;  
45 - private double price;  
46 - private int type;  
47 - private List<GroupMembersBean> groupMembers;  
48 - private List<GroupMembersBean> payList;  
49 -  
50 - public String getCreateTime() {  
51 - return createTime;  
52 - }  
53 -  
54 - public void setCreateTime(String createTime) {  
55 - this.createTime = createTime;  
56 - }  
57 -  
58 - public String getDescription() {  
59 - return description;  
60 - }  
61 -  
62 - public void setDescription(String description) {  
63 - this.description = description;  
64 - }  
65 -  
66 - public String getEndTime() {  
67 - return endTime;  
68 - }  
69 -  
70 - public void setEndTime(String endTime) {  
71 - this.endTime = endTime;  
72 - }  
73 -  
74 - public String getFundsId() {  
75 - return fundsId;  
76 - }  
77 -  
78 - public void setFundsId(String fundsId) {  
79 - this.fundsId = fundsId;  
80 - }  
81 -  
82 - public String getGroupId() {  
83 - return groupId;  
84 - }  
85 -  
86 - public void setGroupId(String groupId) {  
87 - this.groupId = groupId;  
88 - }  
89 -  
90 - public OwnerMsgBean getOwnerMsg() {  
91 - return ownerMsg;  
92 - }  
93 -  
94 - public void setOwnerMsg(OwnerMsgBean ownerMsg) {  
95 - this.ownerMsg = ownerMsg;  
96 - }  
97 -  
98 - public double getPrice() {  
99 - return price;  
100 - }  
101 -  
102 - public void setPrice(double price) {  
103 - this.price = price;  
104 - }  
105 -  
106 - public int getType() {  
107 - return type;  
108 - }  
109 -  
110 - public void setType(int type) {  
111 - this.type = type;  
112 - }  
113 -  
114 - public List<GroupMembersBean> getGroupMembers() {  
115 - return groupMembers;  
116 - }  
117 -  
118 - public void setGroupMembers(List<GroupMembersBean> groupMembers) {  
119 - this.groupMembers = groupMembers;  
120 - }  
121 -  
122 - public List<GroupMembersBean> getPayList() {  
123 - return payList;  
124 - }  
125 -  
126 - public void setPayList(List<GroupMembersBean> payList) {  
127 - this.payList = payList;  
128 - }  
129 -  
130 - public static class OwnerMsgBean {  
131 - /**  
132 - * image : http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0504/1525422551146_small.jpg  
133 - * nickName : 牛道健  
134 - * userId : 10505015  
135 - */  
136 -  
137 - private String image;  
138 - private String nickName;  
139 - private String userId;  
140 -  
141 - public String getImage() {  
142 - return image;  
143 - }  
144 -  
145 - public void setImage(String image) {  
146 - this.image = image;  
147 - }  
148 -  
149 - public String getNickName() {  
150 - return nickName;  
151 - }  
152 -  
153 - public void setNickName(String nickName) {  
154 - this.nickName = nickName;  
155 - }  
156 -  
157 - public String getUserId() {  
158 - return userId;  
159 - }  
160 -  
161 - public void setUserId(String userId) {  
162 - this.userId = userId;  
163 - }  
164 - }  
165 -  
166 - public static class GroupMembersBean {  
167 - /**  
168 - * payTime :  
169 - * type : false  
170 - * user : {"image":"http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0513/1526178128533_small.jpg","nickName":"张旭","userId":"10499533"}  
171 - */  
172 -  
173 - private String payTime;  
174 - private boolean type;  
175 - private UserBean user;  
176 -  
177 - public String getPayTime() {  
178 - return payTime;  
179 - }  
180 -  
181 - public void setPayTime(String payTime) {  
182 - this.payTime = payTime;  
183 - }  
184 -  
185 - public boolean isType() {  
186 - return type;  
187 - }  
188 -  
189 - public void setType(boolean type) {  
190 - this.type = type;  
191 - }  
192 -  
193 - public UserBean getUser() {  
194 - return user;  
195 - }  
196 -  
197 - public void setUser(UserBean user) {  
198 - this.user = user;  
199 - }  
200 -  
201 - public static class UserBean {  
202 - /**  
203 - * image : http://cnlive-yweb.ks3-cn-beijing.ksyun.com/images/headImg/2018/0513/1526178128533_small.jpg  
204 - * nickName : 张旭  
205 - * userId : 10499533  
206 - */  
207 -  
208 - private String image;  
209 - private String nickName;  
210 - private String userId;  
211 -  
212 - public String getImage() {  
213 - return image;  
214 - }  
215 -  
216 - public void setImage(String image) {  
217 - this.image = image;  
218 - }  
219 -  
220 - public String getNickName() {  
221 - return nickName;  
222 - }  
223 -  
224 - public void setNickName(String nickName) {  
225 - this.nickName = nickName;  
226 - }  
227 -  
228 - public String getUserId() {  
229 - return userId;  
230 - }  
231 -  
232 - public void setUserId(String userId) {  
233 - this.userId = userId;  
234 - }  
235 - }  
236 - }  
237 -  
238 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/model/AddIntegration.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.model;  
2 -  
3 -import java.io.Serializable;  
4 -  
5 -public class AddIntegration implements Serializable {  
6 -  
7 -  
8 - public static class DataBean {  
9 - /**  
10 - * status : false  
11 - * score : 100  
12 - */  
13 -  
14 - private boolean status;  
15 - private String score;  
16 - private String desc;  
17 - private String descEnd;  
18 -  
19 - public String getDescEnd() {  
20 - return descEnd;  
21 - }  
22 -  
23 - public void setDescEnd(String descEnd) {  
24 - this.descEnd = descEnd;  
25 - }  
26 -  
27 - public String getDesc() {  
28 - return desc;  
29 - }  
30 -  
31 - public void setDesc(String desc) {  
32 - this.desc = desc;  
33 - }  
34 -  
35 -  
36 - public boolean isStatus() {  
37 - return status;  
38 - }  
39 -  
40 - public void setStatus(boolean status) {  
41 - this.status = status;  
42 - }  
43 -  
44 - public String getScore() {  
45 - return score;  
46 - }  
47 -  
48 - public void setScore(String score) {  
49 - this.score = score;  
50 - }  
51 - }  
52 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/model/AppVersionInfo.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.model;  
2 -  
3 -/**  
4 - * 创建:wukuiqing  
5 - * <p>  
6 - * 时间:2018/4/2  
7 - * <p>  
8 - * 描述:  
9 - */  
10 -  
11 -public class AppVersionInfo {  
12 -  
13 -  
14 -  
15 - /**  
16 - * deviceType : IOS  
17 - * msg : 达人端1.0  
18 - * createTime : 2018-04-02 00:00:00  
19 - * id : aaaaa  
20 - * type : B  
21 - * version : 1.0  
22 - * strongUpdate  
23 - */  
24 -  
25 - public String deviceType;  
26 - public String msg;  
27 - public String createTime;  
28 - public String id;  
29 - public String type;  
30 - public String version;  
31 - public String versionCode;  
32 - public String downLoadUrl;  
33 - public boolean forceUpdating;  
34 -  
35 - public boolean isForceUpdating() {  
36 - return forceUpdating;  
37 - }  
38 -  
39 - public void setForceUpdating(boolean forceUpdating) {  
40 - this.forceUpdating = forceUpdating;  
41 - }  
42 -  
43 - public String getVersionCode() {  
44 - return versionCode;  
45 - }  
46 -  
47 - public void setVersionCode(String versionCode) {  
48 - this.versionCode = versionCode;  
49 - }  
50 -  
51 - public String getDownLoadUrl() {  
52 - return downLoadUrl;  
53 - }  
54 -  
55 - public void setDownLoadUrl(String downLoadUrl) {  
56 - this.downLoadUrl = downLoadUrl;  
57 - }  
58 -  
59 - public String getDeviceType() {  
60 - return deviceType;  
61 - }  
62 -  
63 - public void setDeviceType(String deviceType) {  
64 - this.deviceType = deviceType;  
65 - }  
66 -  
67 - public String getMsg() {  
68 - return msg;  
69 - }  
70 -  
71 - public void setMsg(String msg) {  
72 - this.msg = msg;  
73 - }  
74 -  
75 - public String getCreateTime() {  
76 - return createTime;  
77 - }  
78 -  
79 - public void setCreateTime(String createTime) {  
80 - this.createTime = createTime;  
81 - }  
82 -  
83 - public String getId() {  
84 - return id;  
85 - }  
86 -  
87 - public void setId(String id) {  
88 - this.id = id;  
89 - }  
90 -  
91 - public String getType() {  
92 - return type;  
93 - }  
94 -  
95 - public void setType(String type) {  
96 - this.type = type;  
97 - }  
98 -  
99 - public String getVersion() {  
100 - return version;  
101 - }  
102 -  
103 - public void setVersion(String version) {  
104 - this.version = version;  
105 - }  
106 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/model/AudioAlbumDetailsInfo.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.model;  
2 -  
3 -/**  
4 - * 作者: 吴奎庆  
5 - * <p>  
6 - * 时间: 2019/2/22  
7 - * <p>  
8 - * 简介:  
9 - */  
10 -public class AudioAlbumDetailsInfo {  
11 -  
12 - /**  
13 - * albumId : 67  
14 - * albumImg : http://ffyl.ys1.cnliveimg.com/223/img/2018/1119/181119100131652_957.png@base@tag=imgScale&q=20  
15 - * albumName : 音频第一个专辑2  
16 - * desc : 123123  
17 - * actor : 123  
18 - * time : 1551061851000  
19 - * sp : {"spName":null,"spId":60,"spIcon":null,"desc":null,"subscriptions":null,"subscribe":false}  
20 - * episodeNow : 3  
21 - * subscriptions : null  
22 - * subscribe : false  
23 - * episodeLast : null  
24 - */  
25 -  
26 - private int albumId;  
27 - private String albumImg;  
28 - private String albumName;  
29 - private String desc;  
30 - private String actor;  
31 - private long time;  
32 - private SpBean sp;  
33 - private int episodeNow;  
34 - private String subscriptions;  
35 -  
36 - public String getContentIdLast() {  
37 - return contentIdLast;  
38 - }  
39 -  
40 - public void setContentIdLast(String contentIdLast) {  
41 - this.contentIdLast = contentIdLast;  
42 - }  
43 -  
44 - private String contentIdLast;  
45 - private boolean subscribe;  
46 - private int episodeLast;  
47 -  
48 - public int getAlbumId() {  
49 - return albumId;  
50 - }  
51 -  
52 - public void setAlbumId(int albumId) {  
53 - this.albumId = albumId;  
54 - }  
55 -  
56 - public String getAlbumImg() {  
57 - return albumImg;  
58 - }  
59 -  
60 - public void setAlbumImg(String albumImg) {  
61 - this.albumImg = albumImg;  
62 - }  
63 -  
64 - public String getAlbumName() {  
65 - return albumName;  
66 - }  
67 -  
68 - public void setAlbumName(String albumName) {  
69 - this.albumName = albumName;  
70 - }  
71 -  
72 - public String getDesc() {  
73 - return desc;  
74 - }  
75 -  
76 - public void setDesc(String desc) {  
77 - this.desc = desc;  
78 - }  
79 -  
80 - public String getActor() {  
81 - return actor;  
82 - }  
83 -  
84 - public void setActor(String actor) {  
85 - this.actor = actor;  
86 - }  
87 -  
88 - public long getTime() {  
89 - return time;  
90 - }  
91 -  
92 - public void setTime(long time) {  
93 - this.time = time;  
94 - }  
95 -  
96 - public SpBean getSp() {  
97 - return sp;  
98 - }  
99 -  
100 - public void setSp(SpBean sp) {  
101 - this.sp = sp;  
102 - }  
103 -  
104 - public int getEpisodeNow() {  
105 - return episodeNow;  
106 - }  
107 -  
108 - public void setEpisodeNow(int episodeNow) {  
109 - this.episodeNow = episodeNow;  
110 - }  
111 -  
112 - public String getSubscriptions() {  
113 - return subscriptions;  
114 - }  
115 -  
116 - public void setSubscriptions(String subscriptions) {  
117 - this.subscriptions = subscriptions;  
118 - }  
119 -  
120 - public boolean isSubscribe() {  
121 - return subscribe;  
122 - }  
123 -  
124 - public void setSubscribe(boolean subscribe) {  
125 - this.subscribe = subscribe;  
126 - }  
127 -  
128 - public int getEpisodeLast() {  
129 - return episodeLast;  
130 - }  
131 -  
132 - public void setEpisodeLast(int episodeLast) {  
133 - this.episodeLast = episodeLast;  
134 - }  
135 -  
136 - public static class SpBean {  
137 - /**  
138 - * spName : null  
139 - * spId : 60  
140 - * spIcon : null  
141 - * desc : null  
142 - * subscriptions : null  
143 - * subscribe : false  
144 - */  
145 -  
146 - private Object spName;  
147 - private int spId;  
148 - private Object spIcon;  
149 - private Object desc;  
150 - private Object subscriptions;  
151 - private boolean subscribe;  
152 -  
153 - public Object getSpName() {  
154 - return spName;  
155 - }  
156 -  
157 - public void setSpName(Object spName) {  
158 - this.spName = spName;  
159 - }  
160 -  
161 - public int getSpId() {  
162 - return spId;  
163 - }  
164 -  
165 - public void setSpId(int spId) {  
166 - this.spId = spId;  
167 - }  
168 -  
169 - public Object getSpIcon() {  
170 - return spIcon;  
171 - }  
172 -  
173 - public void setSpIcon(Object spIcon) {  
174 - this.spIcon = spIcon;  
175 - }  
176 -  
177 - public Object getDesc() {  
178 - return desc;  
179 - }  
180 -  
181 - public void setDesc(Object desc) {  
182 - this.desc = desc;  
183 - }  
184 -  
185 - public Object getSubscriptions() {  
186 - return subscriptions;  
187 - }  
188 -  
189 - public void setSubscriptions(Object subscriptions) {  
190 - this.subscriptions = subscriptions;  
191 - }  
192 -  
193 - public boolean isSubscribe() {  
194 - return subscribe;  
195 - }  
196 -  
197 - public void setSubscribe(boolean subscribe) {  
198 - this.subscribe = subscribe;  
199 - }  
200 - }  
201 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/model/AudioChapterInfo.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.model;  
2 -  
3 -import java.io.Serializable;  
4 -  
5 -/**  
6 - * 作者: 吴奎庆  
7 - * <p>  
8 - * 时间: 2019/2/22  
9 - * <p>  
10 - * 简介:  
11 - */  
12 -public class AudioChapterInfo implements Serializable {  
13 -  
14 - /**  
15 - * title : 20181030aaa  
16 - * modelId : 5  
17 - * time : 1550567051000  
18 - * img : null  
19 - * viewCounts : 66666  
20 - * schedule : null  
21 - * activityId : 604_42d8ee17506445c792dba348c1e794c1  
22 - * contentId : 25675  
23 - * duration : 146  
24 - */  
25 -  
26 - private String title;  
27 - private String albumId;  
28 - private String albumName;  
29 - private String actor;  
30 - private int modelId;  
31 - private long time;  
32 - private String img;  
33 - private int counts;  
34 - private double viewCounts;  
35 - private double schedule;  
36 - private String activityId;  
37 - private int contentId;  
38 - private long duration;  
39 - private int comments;  
40 - private String shareUrl;  
41 -  
42 - public String getTitle() {  
43 - return title;  
44 - }  
45 -  
46 - public void setTitle(String title) {  
47 - this.title = title;  
48 - }  
49 -  
50 - public String getAlbumId() {  
51 - return albumId;  
52 - }  
53 -  
54 - public void setAlbumId(String albumId) {  
55 - this.albumId = albumId;  
56 - }  
57 -  
58 - public String getAlbumName() {  
59 - return albumName;  
60 - }  
61 -  
62 - public void setAlbumName(String albumName) {  
63 - this.albumName = albumName;  
64 - }  
65 -  
66 - public String getActor() {  
67 - return actor;  
68 - }  
69 -  
70 - public void setActor(String actor) {  
71 - this.actor = actor;  
72 - }  
73 -  
74 - public int getModelId() {  
75 - return modelId;  
76 - }  
77 -  
78 - public void setModelId(int modelId) {  
79 - this.modelId = modelId;  
80 - }  
81 -  
82 - public long getTime() {  
83 - return time;  
84 - }  
85 -  
86 - public void setTime(long time) {  
87 - this.time = time;  
88 - }  
89 -  
90 - public String getImg() {  
91 - return img;  
92 - }  
93 -  
94 - public void setImg(String img) {  
95 - this.img = img;  
96 - }  
97 -  
98 - public int getCounts() {  
99 - return counts;  
100 - }  
101 -  
102 - public void setCounts(int counts) {  
103 - this.counts = counts;  
104 - }  
105 -  
106 - public double getViewCounts() {  
107 - return viewCounts;  
108 - }  
109 -  
110 - public void setViewCounts(double viewCounts) {  
111 - this.viewCounts = viewCounts;  
112 - }  
113 -  
114 - public double getSchedule() {  
115 - return schedule;  
116 - }  
117 -  
118 - public void setSchedule(double schedule) {  
119 - this.schedule = schedule;  
120 - }  
121 -  
122 - public String getActivityId() {  
123 - return activityId;  
124 - }  
125 -  
126 - public void setActivityId(String activityId) {  
127 - this.activityId = activityId;  
128 - }  
129 -  
130 - public int getContentId() {  
131 - return contentId;  
132 - }  
133 -  
134 - public void setContentId(int contentId) {  
135 - this.contentId = contentId;  
136 - }  
137 -  
138 - public long getDuration() {  
139 - return duration;  
140 - }  
141 -  
142 - public void setDuration(long duration) {  
143 - this.duration = duration;  
144 - }  
145 -  
146 - public int getComments() {  
147 - return comments;  
148 - }  
149 -  
150 - public void setComments(int comments) {  
151 - this.comments = comments;  
152 - }  
153 -  
154 - public String getShareUrl() {  
155 - return shareUrl;  
156 - }  
157 -  
158 - public void setShareUrl(String shareUrl) {  
159 - this.shareUrl = shareUrl;  
160 - }  
161 -  
162 - @Override  
163 - public boolean equals( Object obj) {  
164 - if(obj instanceof AudioChapterInfo){  
165 - return ((AudioChapterInfo)obj).getActivityId().equals(activityId);  
166 - }  
167 - return super.equals(obj);  
168 - }  
169 -}  
lib_network/src/main/java/com/cnlive/strike/data/network/model/AudioHistoryInfo.java deleted 100644 → 0
1 -package com.cnlive.strike.data.network.model;  
2 -  
3 -/**  
4 - * 作者: 吴奎庆  
5 - * <p>  
6 - * 时间: 2019/2/26  
7 - * <p>  
8 - * 简介:  
9 - */  
10 -public class AudioHistoryInfo {  
11 -  
12 - /**  
13 - * id : 262  
14 - * contentId : 25685  
15 - * activeId : 60_7f14a5821e8246339ccdb7f17ec1c291  
16 - * title : 20181030  
17 - * time : 1551110400000  
18 - * counts : null  
19 - * sid : 10504050  
20 - * albumId : 65  
21 - * albumName : audio-test1  
22 - * albumImg : http://ffyl.ys1.cnliveimg.com/223/img/2018/1119/181119100131652_957.png@base@tag=imgScale&q=20  
23 - * schedule : 0  
24 - * recent : true  
25 - */  
26 -  
27 - private int id;  
28 - private String contentId;  
29 - private String activeId;  
30 - private String title;  
31 - private long time;  
32 - private int counts;  
33 - private String sid;  
34 - private int albumId;  
35 - private String albumName;  
36 - private String albumImg;  
37 - private float schedule;  
38 - private boolean recent;  
39 - private String channelName;  
40 - private String shareUrl;  
41 - private String actor;  
42 -  
43 - public String getChannelName() {  
44 - return channelName;  
45 - }  
46 -  
47 - public void setChannelName(String channelName) {  
48 - this.channelName = channelName;  
49 - }  
50 -  
51 - public String getShareUrl() {  
52 - return shareUrl;  
53 - }  
54 -  
55 - public void setShareUrl(String shareUrl) {  
56 - this.shareUrl = shareUrl;  
57 - }  
58 -  
59 - public String getActor() {  
60 - return actor;  
61 - }  
62 -  
63 - public void setActor(String actor) {  
64 - this.actor = actor;  
65 - }  
66 -  
67 - public int getId() {  
68 - return id;  
69 - }  
70 -  
71 - public void setId(int id) {  
72 - this.id = id;  
73 - }  
74 -  
75 - public String getContentId() {  
76 - return contentId;  
77 - }  
78 -  
79 - public void setContentId(String contentId) {  
80 - this.contentId = contentId;  
81 - }  
82 -  
83 - public String getActiveId() {  
84 - return activeId;  
85 - }  
86 -  
87 - public void setActiveId(String activeId) {  
88 - this.activeId = activeId;  
89 - }  
90 -  
91 - public String getTitle() {  
92 - return title;  
93 - }  
94 -  
95 - public void setTitle(String title) {  
96 - this.title = title;  
97 - }  
98 -  
99 - public long getTime() {  
100 - return time;  
101 - }  
102 -  
103 - public void setTime(long time) {  
104 - this.time = time;  
105 - }  
106 -  
107 - public int getCounts() {  
108 - return counts;  
109 - }  
110 -  
111 - public void setCounts(int counts) {  
112 - this.counts = counts;  
113 - }  
114 -  
115 - public String getSid() {  
116 - return sid;  
117 - }  
118 -  
119 - public void setSid(String sid) {  
120 - this.sid = sid;  
121 - }  
122 -  
123 - public int getAlbumId() {  
124 - return albumId;  
125 - }  
126 -  
127 - public void setAlbumId(int albumId) {  
128 - this.albumId = albumId;  
129 - }  
130 -  
131 - public String getAlbumName() {  
132 - return albumName;  
133 - }  
134 -  
135 - public void setAlbumName(String albumName) {  
136 - this.albumName = albumName;  
137 - }  
138 -  
139 - public String getAlbumImg() {  
140 - return albumImg;  
141 - }  
142 -  
143 - public void setAlbumImg(String albumImg) {  
144 - this.albumImg = albumImg;  
145 - }  
146 -  
147 - public float getSchedule() {  
148 - return schedule;  
149 - }  
150 -  
151 - public void setSchedule(float schedule) {  
152 - this.schedule = schedule;  
153 - }  
154 -  
155 - public boolean isRecent() {  
156 - return recent;  
157 - }  
158 -  
159 - public void setRecent(boolean recent) {  
160 - this.recent = recent;  
161 - }  
162 -}