Explorar o código

2024-2-7 代码备份
提交订单页面增加红积分逻辑
我的团队页面数据对接
养老金页面弹窗逻辑调整
粉丝详情页面开发,数据对接

zhangbing %!s(int64=2) %!d(string=hai) anos
pai
achega
571bc78d19
Modificáronse 39 ficheiros con 1376 adicións e 329 borrados
  1. 6 2
      app/src/main/AndroidManifest.xml
  2. 10 1
      app/src/main/java/com/yihucha/hbyhc/network/request_bean/CreateOrderRequest.java
  3. 78 12
      app/src/main/java/com/yihucha/hbyhc/network/service/UserService.java
  4. 23 5
      app/src/main/java/com/yihucha/hbyhc/presentation/annuity/AnnuityRecordsActivity.kt
  5. 0 1
      app/src/main/java/com/yihucha/hbyhc/presentation/home/adapter/SearchProductListAdapter.java
  6. 0 1
      app/src/main/java/com/yihucha/hbyhc/presentation/home/adapter/SearchShopAdapter.java
  7. 0 1
      app/src/main/java/com/yihucha/hbyhc/presentation/integral/MyIntegralActivity.java
  8. 83 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/FansDetailActivity.kt
  9. 1 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/MineFragment.java
  10. 0 2
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/MyQRCodeActivity.java
  11. 88 1
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/MyTeamActivity.kt
  12. 13 4
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/TiXianRecordActivity.kt
  13. 135 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/adapter/TeamListAdapter.kt
  14. 38 11
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/adapter/TixianRecordAdapter.java
  15. 132 0
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/FansDetailBean.java
  16. 19 22
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/TeamBean.java
  17. 50 3
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/TeamViewModel.kt
  18. 15 17
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/view_model/MineSpreadInfo.java
  19. 10 3
      app/src/main/java/com/yihucha/hbyhc/presentation/mine/view_model/MineViewModel.java
  20. 0 1
      app/src/main/java/com/yihucha/hbyhc/presentation/order/LogisticsActivity.java
  21. 147 189
      app/src/main/java/com/yihucha/hbyhc/presentation/order/SubmitOrderActivity.java
  22. 119 14
      app/src/main/java/com/yihucha/hbyhc/presentation/order/adapter/OrderShopAdapter.java
  23. 9 0
      app/src/main/java/com/yihucha/hbyhc/presentation/order/model/OrderCheckBean.java
  24. 2 1
      app/src/main/java/com/yihucha/hbyhc/presentation/order/view_model/OrderViewModel.java
  25. 8 8
      app/src/main/java/com/yihucha/hbyhc/view/PopAnnuitySelector.java
  26. 0 1
      app/src/main/java/com/yihucha/hbyhc/view/UserInvitationCodeDialog.java
  27. 5 0
      app/src/main/res/drawable/slector_red_integral.xml
  28. 199 0
      app/src/main/res/layout/activity_fans_detail.xml
  29. 1 1
      app/src/main/res/layout/activity_my_commission.xml
  30. 19 8
      app/src/main/res/layout/activity_my_team.xml
  31. 9 13
      app/src/main/res/layout/activity_ti_xian_record.xml
  32. 43 2
      app/src/main/res/layout/item_order_shop.xml
  33. 94 0
      app/src/main/res/layout/item_team_list.xml
  34. 18 4
      app/src/main/res/layout/item_tixian_records.xml
  35. BIN=BIN
      app/src/main/res/mipmap-xxxhdpi/icon_checked.png
  36. BIN=BIN
      app/src/main/res/mipmap-xxxhdpi/icon_uncheck.png
  37. BIN=BIN
      app/src/main/res/mipmap-xxxhdpi/icon_unuse.png
  38. 1 0
      app/src/main/res/values/colors.xml
  39. 1 1
      easyPhotos/src/main/java/com/huantansheng/easyphotos/utils/file/FileUtils.java

+ 6 - 2
app/src/main/AndroidManifest.xml

@@ -78,10 +78,14 @@
78
         tools:replace="android:theme"
78
         tools:replace="android:theme"
79
         tools:targetApi="31">
79
         tools:targetApi="31">
80
         <activity
80
         <activity
81
-            android:name=".presentation.mine.MyTeamActivity"
82
-            android:label="我的团队"
81
+            android:name=".presentation.mine.FansDetailActivity"
82
+            android:label="粉丝详情"
83
             android:exported="false" />
83
             android:exported="false" />
84
         <activity
84
         <activity
85
+            android:name=".presentation.mine.MyTeamActivity"
86
+            android:exported="false"
87
+            android:label="我的团队" />
88
+        <activity
85
             android:name=".presentation.mine.TiXianRecordActivity"
89
             android:name=".presentation.mine.TiXianRecordActivity"
86
             android:exported="false"
90
             android:exported="false"
87
             android:label="提现记录" />
91
             android:label="提现记录" />

+ 10 - 1
app/src/main/java/com/yihucha/hbyhc/network/request_bean/CreateOrderRequest.java

@@ -15,8 +15,17 @@ public class CreateOrderRequest {
15
     private List<String> cart_id;//购物车id
15
     private List<String> cart_id;//购物车id
16
     private Map<String, Object> mark;//备注
16
     private Map<String, Object> mark;//备注
17
     private String dacang_id;//大仓id
17
     private String dacang_id;//大仓id
18
-    private String pay_type;//支付方式:0: 余额;1: 微信;2: 小程序;4: 支付宝;5: 特殊商户积分
18
+    private String pay_type;//支付方式:0: 余额;1: 微信;2: 小程序;4: 支付宝;5: 特殊商户积分 6:红积分支付
19
     private String mer_id;//商户id
19
     private String mer_id;//商户id
20
+    private String phone;//开通账号
21
+
22
+    public String getPhone() {
23
+        return phone;
24
+    }
25
+
26
+    public void setPhone(String phone) {
27
+        this.phone = phone;
28
+    }
20
 
29
 
21
     public String getPay_type() {
30
     public String getPay_type() {
22
         return pay_type == null ? "" : pay_type;
31
         return pay_type == null ? "" : pay_type;

+ 78 - 12
app/src/main/java/com/yihucha/hbyhc/network/service/UserService.java

@@ -35,6 +35,7 @@ import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalServiceBean;
35
 import com.yihucha.hbyhc.presentation.mine.model.AddressListBean;
35
 import com.yihucha.hbyhc.presentation.mine.model.AddressListBean;
36
 import com.yihucha.hbyhc.presentation.mine.model.BangfuBean;
36
 import com.yihucha.hbyhc.presentation.mine.model.BangfuBean;
37
 import com.yihucha.hbyhc.presentation.mine.model.BindingStateBean;
37
 import com.yihucha.hbyhc.presentation.mine.model.BindingStateBean;
38
+import com.yihucha.hbyhc.presentation.mine.model.FansDetailBean;
38
 import com.yihucha.hbyhc.presentation.mine.model.JiangjinBean;
39
 import com.yihucha.hbyhc.presentation.mine.model.JiangjinBean;
39
 import com.yihucha.hbyhc.presentation.mine.model.MyEvaluateBean;
40
 import com.yihucha.hbyhc.presentation.mine.model.MyEvaluateBean;
40
 import com.yihucha.hbyhc.presentation.mine.model.MyFavoriteBean;
41
 import com.yihucha.hbyhc.presentation.mine.model.MyFavoriteBean;
@@ -45,6 +46,7 @@ import com.yihucha.hbyhc.presentation.mine.model.RewardsocrBean;
45
 import com.yihucha.hbyhc.presentation.mine.model.RulesBean;
46
 import com.yihucha.hbyhc.presentation.mine.model.RulesBean;
46
 import com.yihucha.hbyhc.presentation.mine.model.SignInBean;
47
 import com.yihucha.hbyhc.presentation.mine.model.SignInBean;
47
 import com.yihucha.hbyhc.presentation.mine.model.SignInInfoBean;
48
 import com.yihucha.hbyhc.presentation.mine.model.SignInInfoBean;
49
+import com.yihucha.hbyhc.presentation.mine.model.TeamBean;
48
 import com.yihucha.hbyhc.presentation.mine.model.UserAnnuityInfoBean;
50
 import com.yihucha.hbyhc.presentation.mine.model.UserAnnuityInfoBean;
49
 import com.yihucha.hbyhc.presentation.mine.model.UserInfoModel;
51
 import com.yihucha.hbyhc.presentation.mine.model.UserInfoModel;
50
 import com.yihucha.hbyhc.presentation.mine.model.UserVipInfoBean;
52
 import com.yihucha.hbyhc.presentation.mine.model.UserVipInfoBean;
@@ -75,7 +77,7 @@ public interface UserService {
75
      * 养老金列表
77
      * 养老金列表
76
      */
78
      */
77
     @GET("/api/user/yanglaolog")
79
     @GET("/api/user/yanglaolog")
78
-    Observable<DataResponse<AnnuityRecordsBean>> getYanglaoList(@QueryMap Map<String,Object> map);
80
+    Observable<DataResponse<AnnuityRecordsBean>> getYanglaoList(@QueryMap Map<String, Object> map);
79
 
81
 
80
     /**
82
     /**
81
      * 我的页面信息  spread——info
83
      * 我的页面信息  spread——info
@@ -83,6 +85,14 @@ public interface UserService {
83
     @GET("/api/user/spread_info_yhc")
85
     @GET("/api/user/spread_info_yhc")
84
     Observable<DataResponse<MineSpreadInfo>> getSpreadInfoYhc();
86
     Observable<DataResponse<MineSpreadInfo>> getSpreadInfoYhc();
85
 
87
 
88
+    /**
89
+     * 团队列表
90
+     */
91
+    @GET("/api/user/team_list")
92
+    Observable<DataResponse<TeamBean>> getTeamList(@Query("page") int page, @Query("limit") int limit, @Query("type") int type);
93
+
94
+    @GET("/api/user/team_details")
95
+    Observable<DataResponse<FansDetailBean>> getFansDetail(@Query("uid") String uid);
86
 
96
 
87
     @GET("api/user/bill")
97
     @GET("api/user/bill")
88
     Call<JiangjinBean> getJiangjin(@Query("page") int page, @Query("limit") int limit, @Query("is_red") boolean is_red);
98
     Call<JiangjinBean> getJiangjin(@Query("page") int page, @Query("limit") int limit, @Query("is_red") boolean is_red);
@@ -91,22 +101,27 @@ public interface UserService {
91
     Call<BangfuBean> requestBangfu();
101
     Call<BangfuBean> requestBangfu();
92
 
102
 
93
     @GET("api/notice/detail/{id}")
103
     @GET("api/notice/detail/{id}")
94
-    Call<RulesBean> getRules(@Path("id")int id);
104
+    Call<RulesBean> getRules(@Path("id") int id);
105
+
95
     /**
106
     /**
96
      * 红积分列表
107
      * 红积分列表
108
+     *
97
      * @return
109
      * @return
98
      */
110
      */
99
     @GET("api/user/bill")
111
     @GET("api/user/bill")
100
     Call<RedIntegralBean2> getRedIntegralList(
112
     Call<RedIntegralBean2> getRedIntegralList(
101
             @Query("page") int page
113
             @Query("page") int page
102
-            ,@Query("limit") int limit
103
-            ,@Query(value = "is_red") boolean is_red);
114
+            , @Query("limit") int limit
115
+            , @Query(value = "is_red") boolean is_red);
116
+
104
     @GET("api/user/red_log")
117
     @GET("api/user/red_log")
105
     Call<RedIntegralBean> getRedIntegralList2(
118
     Call<RedIntegralBean> getRedIntegralList2(
106
             @Query("page") int page
119
             @Query("page") int page
107
-            ,@Query("limit") int limit);
120
+            , @Query("limit") int limit);
121
+
108
     /**
122
     /**
109
      * 个人资料
123
      * 个人资料
124
+     *
110
      * @param
125
      * @param
111
      * @return
126
      * @return
112
      */
127
      */
@@ -115,6 +130,7 @@ public interface UserService {
115
 
130
 
116
     /**
131
     /**
117
      * 会员资料
132
      * 会员资料
133
+     *
118
      * @param
134
      * @param
119
      * @return
135
      * @return
120
      */
136
      */
@@ -123,13 +139,16 @@ public interface UserService {
123
 
139
 
124
     /**
140
     /**
125
      * 地址列表
141
      * 地址列表
142
+     *
126
      * @param
143
      * @param
127
      * @return
144
      * @return
128
      */
145
      */
129
     @GET("api/user/address/lst")
146
     @GET("api/user/address/lst")
130
     Observable<DataResponse<AddressListBean>> addresslist();
147
     Observable<DataResponse<AddressListBean>> addresslist();
148
+
131
     /**
149
     /**
132
      * 省市区街道地址列表
150
      * 省市区街道地址列表
151
+     *
133
      * @param
152
      * @param
134
      * @return
153
      * @return
135
      */
154
      */
@@ -138,20 +157,25 @@ public interface UserService {
138
 
157
 
139
     /**
158
     /**
140
      * 地址添加或者修改
159
      * 地址添加或者修改
160
+     *
141
      * @param
161
      * @param
142
      * @return
162
      * @return
143
      */
163
      */
144
     @POST("api/user/address/new_create")
164
     @POST("api/user/address/new_create")
145
     Observable<DataResponse> addressNewCreate(@QueryMap Map<String, Object> request);
165
     Observable<DataResponse> addressNewCreate(@QueryMap Map<String, Object> request);
166
+
146
     /**
167
     /**
147
      * 删除地址
168
      * 删除地址
169
+     *
148
      * @param
170
      * @param
149
      * @return
171
      * @return
150
      */
172
      */
151
     @POST("api/user/address/delete/{id}")
173
     @POST("api/user/address/delete/{id}")
152
     Observable<DataResponse> deleteAddress(@Path("id") String id);
174
     Observable<DataResponse> deleteAddress(@Path("id") String id);
175
+
153
     /**
176
     /**
154
      * 购物车列表
177
      * 购物车列表
178
+     *
155
      * @param
179
      * @param
156
      * @return
180
      * @return
157
      */
181
      */
@@ -160,6 +184,7 @@ public interface UserService {
160
 
184
 
161
     /**
185
     /**
162
      * 购物车删除
186
      * 购物车删除
187
+     *
163
      * @param
188
      * @param
164
      * @return
189
      * @return
165
      */
190
      */
@@ -168,6 +193,7 @@ public interface UserService {
168
 
193
 
169
     /**
194
     /**
170
      * 养老金
195
      * 养老金
196
+     *
171
      * @param
197
      * @param
172
      * @return
198
      * @return
173
      */
199
      */
@@ -176,6 +202,7 @@ public interface UserService {
176
 
202
 
177
     /**
203
     /**
178
      * 养老金信息
204
      * 养老金信息
205
+     *
179
      * @param
206
      * @param
180
      * @return
207
      * @return
181
      */
208
      */
@@ -184,6 +211,7 @@ public interface UserService {
184
 
211
 
185
     /**
212
     /**
186
      * 我的邀请
213
      * 我的邀请
214
+     *
187
      * @param
215
      * @param
188
      * @return
216
      * @return
189
      */
217
      */
@@ -192,6 +220,7 @@ public interface UserService {
192
 
220
 
193
     /**
221
     /**
194
      * 个人资料编辑
222
      * 个人资料编辑
223
+     *
195
      * @param
224
      * @param
196
      * @return
225
      * @return
197
      */
226
      */
@@ -200,20 +229,25 @@ public interface UserService {
200
 
229
 
201
     /**
230
     /**
202
      * 实名认证
231
      * 实名认证
232
+     *
203
      * @param
233
      * @param
204
      * @return
234
      * @return
205
      */
235
      */
206
     @GET("api/user/add_certification")
236
     @GET("api/user/add_certification")
207
     Observable<DataResponse> getAutonym(@QueryMap Map<String, Object> request);
237
     Observable<DataResponse> getAutonym(@QueryMap Map<String, Object> request);
238
+
208
     /**
239
     /**
209
      * 实名认证信息
240
      * 实名认证信息
241
+     *
210
      * @param
242
      * @param
211
      * @return
243
      * @return
212
      */
244
      */
213
     @GET("api/user/add_certification")
245
     @GET("api/user/add_certification")
214
     Observable<DataResponse<AutonymRequest>> getAutonymInfo(@QueryMap Map<String, Object> request);
246
     Observable<DataResponse<AutonymRequest>> getAutonymInfo(@QueryMap Map<String, Object> request);
247
+
215
     /**
248
     /**
216
      * 第三方账号绑定状态
249
      * 第三方账号绑定状态
250
+     *
217
      * @param
251
      * @param
218
      * @return
252
      * @return
219
      */
253
      */
@@ -222,6 +256,7 @@ public interface UserService {
222
 
256
 
223
     /**
257
     /**
224
      * 关注/收藏
258
      * 关注/收藏
259
+     *
225
      * @param
260
      * @param
226
      * @return
261
      * @return
227
      */
262
      */
@@ -230,6 +265,7 @@ public interface UserService {
230
 
265
 
231
     /**
266
     /**
232
      * 批量收藏
267
      * 批量收藏
268
+     *
233
      * @param
269
      * @param
234
      * @return
270
      * @return
235
      */
271
      */
@@ -238,6 +274,7 @@ public interface UserService {
238
 
274
 
239
     /**
275
     /**
240
      * 取消关注
276
      * 取消关注
277
+     *
241
      * @param
278
      * @param
242
      * @return
279
      * @return
243
      */
280
      */
@@ -246,6 +283,7 @@ public interface UserService {
246
 
283
 
247
     /**
284
     /**
248
      * 我的收藏
285
      * 我的收藏
286
+     *
249
      * @param
287
      * @param
250
      * @return
288
      * @return
251
      */
289
      */
@@ -254,6 +292,7 @@ public interface UserService {
254
 
292
 
255
     /**
293
     /**
256
      * 我的关注
294
      * 我的关注
295
+     *
257
      * @param
296
      * @param
258
      * @return
297
      * @return
259
      */
298
      */
@@ -262,13 +301,16 @@ public interface UserService {
262
 
301
 
263
     /**
302
     /**
264
      * 评论列表
303
      * 评论列表
304
+     *
265
      * @param
305
      * @param
266
      * @return
306
      * @return
267
      */
307
      */
268
     @POST("api/reply/list")
308
     @POST("api/reply/list")
269
     Observable<DataResponse<MyEvaluateBean>> getMyEvaluate(@QueryMap Map<String, Object> request);
309
     Observable<DataResponse<MyEvaluateBean>> getMyEvaluate(@QueryMap Map<String, Object> request);
310
+
270
     /**
311
     /**
271
      * 删除评论
312
      * 删除评论
313
+     *
272
      * @param
314
      * @param
273
      * @return
315
      * @return
274
      */
316
      */
@@ -277,6 +319,7 @@ public interface UserService {
277
 
319
 
278
     /**
320
     /**
279
      * java 我的邀请
321
      * java 我的邀请
322
+     *
280
      * @param
323
      * @param
281
      * @return
324
      * @return
282
      */
325
      */
@@ -285,6 +328,7 @@ public interface UserService {
285
 
328
 
286
     /**
329
     /**
287
      * php 我的邀请
330
      * php 我的邀请
331
+     *
288
      * @param
332
      * @param
289
      * @return
333
      * @return
290
      */
334
      */
@@ -293,6 +337,7 @@ public interface UserService {
293
 
337
 
294
     /**
338
     /**
295
      * java 邀请商户+伙伴个数 列表
339
      * java 邀请商户+伙伴个数 列表
340
+     *
296
      * @param
341
      * @param
297
      * @return
342
      * @return
298
      */
343
      */
@@ -301,6 +346,7 @@ public interface UserService {
301
 
346
 
302
     /**
347
     /**
303
      * 分享收益
348
      * 分享收益
349
+     *
304
      * @param
350
      * @param
305
      * @return
351
      * @return
306
      */
352
      */
@@ -309,6 +355,7 @@ public interface UserService {
309
 
355
 
310
     /**
356
     /**
311
      * java 用户分享产品列表
357
      * java 用户分享产品列表
358
+     *
312
      * @param
359
      * @param
313
      * @return
360
      * @return
314
      */
361
      */
@@ -317,6 +364,7 @@ public interface UserService {
317
 
364
 
318
     /**
365
     /**
319
      * Java 累计收益列表
366
      * Java 累计收益列表
367
+     *
320
      * @param
368
      * @param
321
      * @return
369
      * @return
322
      */
370
      */
@@ -325,6 +373,7 @@ public interface UserService {
325
 
373
 
326
     /**
374
     /**
327
      * 佣金信息
375
      * 佣金信息
376
+     *
328
      * @param
377
      * @param
329
      * @return
378
      * @return
330
      */
379
      */
@@ -333,6 +382,7 @@ public interface UserService {
333
 
382
 
334
     /**
383
     /**
335
      * 提现配置
384
      * 提现配置
385
+     *
336
      * @param
386
      * @param
337
      * @return
387
      * @return
338
      */
388
      */
@@ -341,6 +391,7 @@ public interface UserService {
341
 
391
 
342
     /**
392
     /**
343
      * 提现检测是否绑定提交账户接口
393
      * 提现检测是否绑定提交账户接口
394
+     *
344
      * @param
395
      * @param
345
      * @return
396
      * @return
346
      */
397
      */
@@ -357,6 +408,7 @@ public interface UserService {
357
 
408
 
358
     /**
409
     /**
359
      * 提现服务费计算接口
410
      * 提现服务费计算接口
411
+     *
360
      * @param
412
      * @param
361
      * @return
413
      * @return
362
      */
414
      */
@@ -365,6 +417,7 @@ public interface UserService {
365
 
417
 
366
     /**
418
     /**
367
      * 提现申请
419
      * 提现申请
420
+     *
368
      * @param
421
      * @param
369
      * @return
422
      * @return
370
      */
423
      */
@@ -373,6 +426,7 @@ public interface UserService {
373
 
426
 
374
     /**
427
     /**
375
      * 提现记录
428
      * 提现记录
429
+     *
376
      * @param
430
      * @param
377
      * @return
431
      * @return
378
      */
432
      */
@@ -381,6 +435,7 @@ public interface UserService {
381
 
435
 
382
     /**
436
     /**
383
      * 实体店养老金明细线下
437
      * 实体店养老金明细线下
438
+     *
384
      * @param
439
      * @param
385
      * @return
440
      * @return
386
      */
441
      */
@@ -389,6 +444,7 @@ public interface UserService {
389
 
444
 
390
     /**
445
     /**
391
      * 实体店养老金明细线上
446
      * 实体店养老金明细线上
447
+     *
392
      * @param
448
      * @param
393
      * @return
449
      * @return
394
      */
450
      */
@@ -396,7 +452,8 @@ public interface UserService {
396
     Observable<DataResponse<YanglaojinLogXSBean>> getYanglaojinLogXS(@QueryMap Map<String, Object> request);
452
     Observable<DataResponse<YanglaojinLogXSBean>> getYanglaojinLogXS(@QueryMap Map<String, Object> request);
397
 
453
 
398
     /**
454
     /**
399
-     *新签到信息
455
+     * 新签到信息
456
+     *
400
      * @param
457
      * @param
401
      * @return
458
      * @return
402
      */
459
      */
@@ -404,7 +461,8 @@ public interface UserService {
404
     Observable<DataResponse<SignInInfoBean>> getSignInInfo();
461
     Observable<DataResponse<SignInInfoBean>> getSignInInfo();
405
 
462
 
406
     /**
463
     /**
407
-     *签到
464
+     * 签到
465
+     *
408
      * @param
466
      * @param
409
      * @return
467
      * @return
410
      */
468
      */
@@ -412,7 +470,8 @@ public interface UserService {
412
     Observable<DataResponse<SignInBean>> getSignIn();
470
     Observable<DataResponse<SignInBean>> getSignIn();
413
 
471
 
414
     /**
472
     /**
415
-     *签到
473
+     * 签到
474
+     *
416
      * @param
475
      * @param
417
      * @return
476
      * @return
418
      */
477
      */
@@ -421,6 +480,7 @@ public interface UserService {
421
 
480
 
422
     /**
481
     /**
423
      * 积分记录
482
      * 积分记录
483
+     *
424
      * @param
484
      * @param
425
      * @return
485
      * @return
426
      */
486
      */
@@ -428,7 +488,8 @@ public interface UserService {
428
     Observable<DataResponse<IntegralListBean>> getIntegralList(@QueryMap Map<String, Object> request);
488
     Observable<DataResponse<IntegralListBean>> getIntegralList(@QueryMap Map<String, Object> request);
429
 
489
 
430
     /**
490
     /**
431
-     *邀请码绑定接口
491
+     * 邀请码绑定接口
492
+     *
432
      * @param
493
      * @param
433
      * @return
494
      * @return
434
      */
495
      */
@@ -437,6 +498,7 @@ public interface UserService {
437
 
498
 
438
     /**
499
     /**
439
      * 分享二维码图片
500
      * 分享二维码图片
501
+     *
440
      * @param
502
      * @param
441
      * @return
503
      * @return
442
      */
504
      */
@@ -445,6 +507,7 @@ public interface UserService {
445
 
507
 
446
     /**
508
     /**
447
      * 公证处养老金余额
509
      * 公证处养老金余额
510
+     *
448
      * @param
511
      * @param
449
      * @return
512
      * @return
450
      */
513
      */
@@ -452,7 +515,8 @@ public interface UserService {
452
     Observable<DataResponse<AmountFromGzcBean>> getAmountFromGzc();
515
     Observable<DataResponse<AmountFromGzcBean>> getAmountFromGzc();
453
 
516
 
454
     /**
517
     /**
455
-     *邀请好友分享图片分类接口
518
+     * 邀请好友分享图片分类接口
519
+     *
456
      * @param
520
      * @param
457
      * @return
521
      * @return
458
      */
522
      */
@@ -460,7 +524,8 @@ public interface UserService {
460
     Observable<DataResponse<InviteFriendsClassifyBean>> getClassifyList();
524
     Observable<DataResponse<InviteFriendsClassifyBean>> getClassifyList();
461
 
525
 
462
     /**
526
     /**
463
-     *邀请好友图片列表
527
+     * 邀请好友图片列表
528
+     *
464
      * @param
529
      * @param
465
      * @return
530
      * @return
466
      */
531
      */
@@ -468,7 +533,8 @@ public interface UserService {
468
     Observable<DataResponse<InviteFriendsPicBean>> getClassifyImgesList(@Body ClassifyImgesListRequest request);
533
     Observable<DataResponse<InviteFriendsPicBean>> getClassifyImgesList(@Body ClassifyImgesListRequest request);
469
 
534
 
470
     /**
535
     /**
471
-     *生成图片
536
+     * 生成图片
537
+     *
472
      * @param
538
      * @param
473
      * @return
539
      * @return
474
      */
540
      */

+ 23 - 5
app/src/main/java/com/yihucha/hbyhc/presentation/annuity/AnnuityRecordsActivity.kt

@@ -27,20 +27,21 @@ import com.yihucha.hbyhc.presentation.annuity.model.AnnuityRecordsBean
27
 import com.yihucha.hbyhc.presentation.mine.view_model.MineViewModel
27
 import com.yihucha.hbyhc.presentation.mine.view_model.MineViewModel
28
 import com.yihucha.hbyhc.utils.*
28
 import com.yihucha.hbyhc.utils.*
29
 import com.yihucha.hbyhc.view.PopAnnuitySelector
29
 import com.yihucha.hbyhc.view.PopAnnuitySelector
30
+import com.yihucha.hbyhc.view.PopAnnuitySelector.OnSelectListener
30
 import java.util.*
31
 import java.util.*
31
 
32
 
32
 class AnnuityRecordsActivity : ViewBindingBaseActivity<ActivityAnnuityRecordsBinding>(),
33
 class AnnuityRecordsActivity : ViewBindingBaseActivity<ActivityAnnuityRecordsBinding>(),
33
     View.OnClickListener {
34
     View.OnClickListener {
34
     private lateinit var mMineViewModel: MineViewModel
35
     private lateinit var mMineViewModel: MineViewModel
35
     private var mPage = 1
36
     private var mPage = 1
36
-    private var source = "0"
37
-    private var status = 0
37
+    private var source:String? = "-1"
38
+    private var status:String? = "1"
38
     private lateinit var month: String
39
     private lateinit var month: String
39
     private lateinit var birthday: String
40
     private lateinit var birthday: String
40
     private lateinit var adapter: AnnuityRecordsAdapter
41
     private lateinit var adapter: AnnuityRecordsAdapter
41
     private var listDatas = mutableListOf<AnnuityRecordsBean.ListDTO>()
42
     private var listDatas = mutableListOf<AnnuityRecordsBean.ListDTO>()
42
     private lateinit var pvTime: TimePickerView
43
     private lateinit var pvTime: TimePickerView
43
-    private lateinit var popWindow:PopAnnuitySelector
44
+    private lateinit var popWindow: PopAnnuitySelector
44
 
45
 
45
     override fun onCreate(savedInstanceState: Bundle?) {
46
     override fun onCreate(savedInstanceState: Bundle?) {
46
         super.onCreate(savedInstanceState)
47
         super.onCreate(savedInstanceState)
@@ -61,6 +62,7 @@ class AnnuityRecordsActivity : ViewBindingBaseActivity<ActivityAnnuityRecordsBin
61
             "${calendar.get(Calendar.YEAR)}-${StringUtils.formatNumber(calendar.get(Calendar.MONTH) + 1)}"
62
             "${calendar.get(Calendar.YEAR)}-${StringUtils.formatNumber(calendar.get(Calendar.MONTH) + 1)}"
62
         birthday =
63
         birthday =
63
             "${calendar.get(Calendar.YEAR)}年${StringUtils.formatNumber(calendar.get(Calendar.MONTH) + 1)}月"
64
             "${calendar.get(Calendar.YEAR)}年${StringUtils.formatNumber(calendar.get(Calendar.MONTH) + 1)}月"
65
+        mViewBinding.tvDate.text = birthday
64
         var manager = LinearLayoutManager(this)
66
         var manager = LinearLayoutManager(this)
65
         mViewBinding.rvAnnuityRecords.layoutManager = manager
67
         mViewBinding.rvAnnuityRecords.layoutManager = manager
66
         adapter = AnnuityRecordsAdapter(this, listDatas)
68
         adapter = AnnuityRecordsAdapter(this, listDatas)
@@ -109,12 +111,19 @@ class AnnuityRecordsActivity : ViewBindingBaseActivity<ActivityAnnuityRecordsBin
109
                 if (EmptyCheckUtils.isEmpty(listDatas)) {
111
                 if (EmptyCheckUtils.isEmpty(listDatas)) {
110
                     mViewBinding.layoutNoData.visibility = View.VISIBLE
112
                     mViewBinding.layoutNoData.visibility = View.VISIBLE
111
                     mViewBinding.rvAnnuityRecords.visibility = View.GONE
113
                     mViewBinding.rvAnnuityRecords.visibility = View.GONE
112
-                    return@observe
113
                 } else {
114
                 } else {
114
                     mViewBinding.layoutNoData.visibility = View.GONE
115
                     mViewBinding.layoutNoData.visibility = View.GONE
115
                     mViewBinding.rvAnnuityRecords.visibility = View.VISIBLE
116
                     mViewBinding.rvAnnuityRecords.visibility = View.VISIBLE
116
                 }
117
                 }
117
                 adapter.setData(listDatas)
118
                 adapter.setData(listDatas)
119
+            }?:{
120
+                if (EmptyCheckUtils.isEmpty(listDatas)) {
121
+                    mViewBinding.layoutNoData.visibility = View.VISIBLE
122
+                    mViewBinding.rvAnnuityRecords.visibility = View.GONE
123
+                } else {
124
+                    mViewBinding.layoutNoData.visibility = View.GONE
125
+                    mViewBinding.rvAnnuityRecords.visibility = View.VISIBLE
126
+                }
118
             }
127
             }
119
 
128
 
120
         }
129
         }
@@ -146,11 +155,19 @@ class AnnuityRecordsActivity : ViewBindingBaseActivity<ActivityAnnuityRecordsBin
146
     /**
155
     /**
147
      * 条件选择器
156
      * 条件选择器
148
      */
157
      */
149
-    private fun initSelector(){
158
+    private fun initSelector() {
150
         popWindow = PopAnnuitySelector(this)
159
         popWindow = PopAnnuitySelector(this)
151
         popWindow.setOnDismissListener {
160
         popWindow.setOnDismissListener {
152
             mViewBinding.viewBg.visibility = View.GONE
161
             mViewBinding.viewBg.visibility = View.GONE
153
         }
162
         }
163
+        popWindow.setOnSelectListener { checkedSoource, checkedStatus ->
164
+            run {
165
+                source = checkedSoource
166
+                status = checkedStatus
167
+                mPage = 1
168
+                loadYanglaoList()
169
+            }
170
+        }
154
     }
171
     }
155
 
172
 
156
     /**
173
     /**
@@ -167,6 +184,7 @@ class AnnuityRecordsActivity : ViewBindingBaseActivity<ActivityAnnuityRecordsBin
167
             birthday = DateUtil.getYearMonth(date.time)
184
             birthday = DateUtil.getYearMonth(date.time)
168
             mViewBinding.tvDate.text = birthday
185
             mViewBinding.tvDate.text = birthday
169
             month = birthday.replace("年", "-").replace("月", "")
186
             month = birthday.replace("年", "-").replace("月", "")
187
+            mPage=1
170
             loadYanglaoList()
188
             loadYanglaoList()
171
         }
189
         }
172
             .setTimeSelectChangeListener { Log.i("pvTime", "onTimeSelectChanged") }
190
             .setTimeSelectChangeListener { Log.i("pvTime", "onTimeSelectChanged") }

+ 0 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/home/adapter/SearchProductListAdapter.java

@@ -51,7 +51,6 @@ public class SearchProductListAdapter extends RecyclerView.Adapter<SearchProduct
51
      * @param goodsPageBeans
51
      * @param goodsPageBeans
52
      */
52
      */
53
     public void updateData(List<SearchProductListBeans.PageInfo.ProductList> goodsPageBeans) {
53
     public void updateData(List<SearchProductListBeans.PageInfo.ProductList> goodsPageBeans) {
54
-        // TODO Auto-generated method stub
55
         setList(goodsPageBeans);
54
         setList(goodsPageBeans);
56
         notifyDataSetChanged();
55
         notifyDataSetChanged();
57
     }
56
     }

+ 0 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/home/adapter/SearchShopAdapter.java

@@ -44,7 +44,6 @@ public class SearchShopAdapter extends RecyclerView.Adapter<SearchShopAdapter.Vi
44
      * @param goodsPageBeans
44
      * @param goodsPageBeans
45
      */
45
      */
46
     public void updateData(List<SearchStoreBean.PageInfo.PageInfoList> goodsPageBeans) {
46
     public void updateData(List<SearchStoreBean.PageInfo.PageInfoList> goodsPageBeans) {
47
-        // TODO Auto-generated method stub
48
         setList(goodsPageBeans);
47
         setList(goodsPageBeans);
49
         notifyDataSetChanged();
48
         notifyDataSetChanged();
50
     }
49
     }

+ 0 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/integral/MyIntegralActivity.java

@@ -307,7 +307,6 @@ public class MyIntegralActivity extends ViewBindingTitleBaseActivity<ActivityMyI
307
     @Override
307
     @Override
308
     public void onRightClick() {
308
     public void onRightClick() {
309
         super.onRightClick();
309
         super.onRightClick();
310
-        //todo::没有定义积分规则
311
         WebViewTitleBaseActivity.launch(context, getString(R.string.integration_rule),
310
         WebViewTitleBaseActivity.launch(context, getString(R.string.integration_rule),
312
                 Constants.PROTOCOL + Constants.INTEGRAL_RULES);
311
                 Constants.PROTOCOL + Constants.INTEGRAL_RULES);
313
     }
312
     }

+ 83 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/FansDetailActivity.kt

@@ -0,0 +1,83 @@
1
+package com.yihucha.hbyhc.presentation.mine
2
+
3
+import android.app.Activity
4
+import android.content.Intent
5
+import android.os.Bundle
6
+import androidx.lifecycle.ViewModelProvider
7
+import com.yihucha.hbyhc.R
8
+import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
9
+import com.yihucha.hbyhc.databinding.ActivityFansDetailBinding
10
+import com.yihucha.hbyhc.presentation.mine.model.TeamBean
11
+import com.yihucha.hbyhc.presentation.mine.model.TeamViewModel
12
+
13
+class FansDetailActivity : ViewBindingTitleBaseActivity<ActivityFansDetailBinding>() {
14
+    private val teamViewModel by lazy {
15
+        ViewModelProvider(this)[TeamViewModel::class.java]
16
+    }
17
+
18
+    override fun onCreate(savedInstanceState: Bundle?) {
19
+        super.onCreate(savedInstanceState)
20
+        initData()
21
+    }
22
+
23
+    private fun initData() {
24
+        intent?.apply {
25
+            teamViewModel.requestFansDetails(getStringExtra("uid")!!)
26
+        }
27
+        teamViewModel.fansDetailBean.observe(this) {
28
+            mViewBinding.tvAccount.text = it.phone
29
+            mViewBinding.tvNickname.text = it.nickname
30
+            mViewBinding.tvYanglaojin.text = it.ylj
31
+            mViewBinding.tvRegistTime.text = it.createTime
32
+            mViewBinding.tvInvitateName.text = it.pNickname
33
+            mViewBinding.tvInvitatedAccount.text = it.pPhone
34
+            var memeber = ""
35
+            when (it.identity) {
36
+                "0" -> {
37
+                    //普通用户
38
+                    memeber = "普通用户"
39
+                }
40
+                "100" -> {
41
+                    //合伙人
42
+                    memeber = "合伙人"
43
+                }
44
+                "101" -> {
45
+                    //主任
46
+                    memeber = "主任"
47
+                }
48
+                "102" -> {
49
+                    //经理
50
+                    memeber = "经理"
51
+                }
52
+                "103" -> {
53
+                    //总监
54
+                    memeber = "总监"
55
+                }
56
+                "104" -> {
57
+                    //合伙商户
58
+                    memeber = "合伙商户"
59
+                }
60
+                "105" -> {
61
+                    //合伙公司
62
+                    memeber = "合伙公司"
63
+                }
64
+                else -> {
65
+                    //合伙董事  (猜的)
66
+                    memeber = "合伙董事"
67
+                }
68
+            }
69
+
70
+            mViewBinding.tvIdentify.text = memeber
71
+        }
72
+
73
+    }
74
+
75
+    companion object {
76
+        @JvmStatic
77
+        fun launch(activity: Activity, uid: String) {
78
+            var intent = Intent(activity, FansDetailActivity::class.java)
79
+            intent.putExtra("uid", uid)
80
+            activity.startActivity(intent)
81
+        }
82
+    }
83
+}

+ 1 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/MineFragment.java

@@ -236,6 +236,7 @@ public class MineFragment extends BaseFragment implements View.OnClickListener {
236
     public void onClick(View view) {
236
     public void onClick(View view) {
237
         if (view == binding.tvMineTd) {
237
         if (view == binding.tvMineTd) {
238
             //我的团队
238
             //我的团队
239
+            MyTeamActivity.launch(getActivity());
239
         } else if (view == binding.llAddress) {
240
         } else if (view == binding.llAddress) {
240
             //我的地址
241
             //我的地址
241
             MyAddressActivity.launch(getActivity());
242
             MyAddressActivity.launch(getActivity());

+ 0 - 2
app/src/main/java/com/yihucha/hbyhc/presentation/mine/MyQRCodeActivity.java

@@ -149,7 +149,6 @@ public class MyQRCodeActivity extends ViewBindingTitleBaseActivity<ActivityMyQrC
149
 //                public void run() {
149
 //                public void run() {
150
 //                    setTitileVisibility(false);
150
 //                    setTitileVisibility(false);
151
 //                    mViewBinding.llAnniu.setVisibility(View.GONE);
151
 //                    mViewBinding.llAnniu.setVisibility(View.GONE);
152
-//                    // TODO
153
 
152
 
154
 //                    view_bitmap = View2BitmapUtil.getBitmap(context, false);
153
 //                    view_bitmap = View2BitmapUtil.getBitmap(context, false);
155
 //                    saveBitmapToAlbum(view_bitmap);
154
 //                    saveBitmapToAlbum(view_bitmap);
@@ -163,7 +162,6 @@ public class MyQRCodeActivity extends ViewBindingTitleBaseActivity<ActivityMyQrC
163
         }
162
         }
164
     }
163
     }
165
 
164
 
166
-    // todo 分享图片
167
 //    private void fun_handleShare(int scene, Bitmap bm) {
165
 //    private void fun_handleShare(int scene, Bitmap bm) {
168
 //        if (WeChatShareUtils.isSupportWX()) {
166
 //        if (WeChatShareUtils.isSupportWX()) {
169
 //            Bitmap bitmap = Bitmap.createScaledBitmap(bm, 200, 400, true);
167
 //            Bitmap bitmap = Bitmap.createScaledBitmap(bm, 200, 400, true);

+ 88 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/mine/MyTeamActivity.kt

@@ -1,14 +1,101 @@
1
 package com.yihucha.hbyhc.presentation.mine
1
 package com.yihucha.hbyhc.presentation.mine
2
 
2
 
3
+import android.app.Activity
4
+import android.content.Intent
3
 import androidx.appcompat.app.AppCompatActivity
5
 import androidx.appcompat.app.AppCompatActivity
4
 import android.os.Bundle
6
 import android.os.Bundle
7
+import android.view.View
8
+import androidx.lifecycle.ViewModelProvider
9
+import androidx.recyclerview.widget.LinearLayoutManager
10
+import com.lcodecore.tkrefreshlayout.RefreshListenerAdapter
11
+import com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout
5
 import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
12
 import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
6
 import com.yihucha.hbyhc.databinding.ActivityMyTeamBinding
13
 import com.yihucha.hbyhc.databinding.ActivityMyTeamBinding
14
+import com.yihucha.hbyhc.presentation.mine.adapter.TeamListAdapter
15
+import com.yihucha.hbyhc.presentation.mine.model.TeamBean
16
+import com.yihucha.hbyhc.presentation.mine.model.TeamViewModel
17
+import com.yihucha.hbyhc.utils.EmptyCheckUtils
7
 
18
 
8
 class MyTeamActivity : ViewBindingTitleBaseActivity<ActivityMyTeamBinding>() {
19
 class MyTeamActivity : ViewBindingTitleBaseActivity<ActivityMyTeamBinding>() {
9
-
20
+    private val teamViewModel by lazy {
21
+        ViewModelProvider(this)[TeamViewModel::class.java]
22
+    }
23
+    private var datas = mutableListOf<TeamBean.TeamListDTO.DataDTO>()
24
+    var page = 1
25
+    var limit = 10
26
+    var type = 0
27
+    private lateinit var adapter: TeamListAdapter
10
     override fun onCreate(savedInstanceState: Bundle?) {
28
     override fun onCreate(savedInstanceState: Bundle?) {
11
         super.onCreate(savedInstanceState)
29
         super.onCreate(savedInstanceState)
30
+        initView()
31
+        initData()
32
+        initListener()
33
+    }
34
+
35
+    private fun initView() {
36
+        adapter = TeamListAdapter(datas, this)
37
+        mViewBinding.rvTeamList.layoutManager = LinearLayoutManager(this)
38
+        mViewBinding.rvTeamList.adapter = adapter
39
+    }
40
+
41
+    private fun initData() {
42
+        teamViewModel.requestTeamList(page)
43
+        teamViewModel.teamBean.observe(this) {
44
+            println(it.toString())
45
+            mViewBinding.refreshLayout?.apply {
46
+                finishRefreshing()
47
+                finishLoadmore()
48
+            }
49
+            mViewBinding.tvFansCount.text = "${it.fansNum}"
50
+            mViewBinding.tvFansYouxiao.text = "${it.effectiveFansNum}"
51
+            mViewBinding.tvFansZhishu.text = "${it.directFansNum}"
52
+            if (page == 1) {
53
+                datas.clear()
54
+            }
55
+            it.teamList?.apply {
56
+                if (EmptyCheckUtils.isNotEmpty(data)) {
57
+                    datas.addAll(data)
58
+                } else {
59
+                    if (page > 1) page--
60
+                }
61
+            } ?: page--
62
+            if (EmptyCheckUtils.isNotEmpty(datas)) {
63
+                mViewBinding.llNoSearch.llNotFound.visibility = View.GONE
64
+                mViewBinding.rvTeamList.visibility = View.VISIBLE
65
+            } else {
66
+                mViewBinding.llNoSearch.llNotFound.visibility = View.VISIBLE
67
+                mViewBinding.rvTeamList.visibility = View.INVISIBLE
68
+            }
69
+            adapter.setDatas(datas)
70
+        }
71
+        teamViewModel.failed.observe(this) {
72
+            mViewBinding.refreshLayout?.apply {
73
+                finishRefreshing()
74
+                finishLoadmore()
75
+            }
76
+        }
77
+    }
78
+
79
+    private fun initListener() {
80
+        mViewBinding.refreshLayout.setEnableRefresh(true)
81
+        mViewBinding.refreshLayout.setEnableLoadmore(true)
82
+        mViewBinding.refreshLayout.setOnRefreshListener(object : RefreshListenerAdapter() {
83
+            override fun onRefresh(refreshLayout: TwinklingRefreshLayout?) {
84
+                page = 1
85
+                teamViewModel.requestTeamList(page)
86
+            }
87
+
88
+            override fun onLoadMore(refreshLayout: TwinklingRefreshLayout?) {
89
+                page++
90
+                teamViewModel.requestTeamList(page)
91
+            }
92
+        })
93
+    }
12
 
94
 
95
+    companion object {
96
+        @JvmStatic
97
+        fun launch(activity: Activity) {
98
+            activity.startActivity(Intent(activity, MyTeamActivity::class.java))
99
+        }
13
     }
100
     }
14
 }
101
 }

+ 13 - 4
app/src/main/java/com/yihucha/hbyhc/presentation/mine/TiXianRecordActivity.kt

@@ -4,15 +4,22 @@ import android.app.Activity
4
 import android.content.Intent
4
 import android.content.Intent
5
 import androidx.appcompat.app.AppCompatActivity
5
 import androidx.appcompat.app.AppCompatActivity
6
 import android.os.Bundle
6
 import android.os.Bundle
7
+import androidx.lifecycle.ViewModelProvider
7
 import com.yihucha.hbyhc.base.ViewBindingChangeTitleColorTitleBaseActivity
8
 import com.yihucha.hbyhc.base.ViewBindingChangeTitleColorTitleBaseActivity
8
 import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
9
 import com.yihucha.hbyhc.base.ViewBindingTitleBaseActivity
9
 import com.yihucha.hbyhc.databinding.ActivityTiXianRecordBinding
10
 import com.yihucha.hbyhc.databinding.ActivityTiXianRecordBinding
11
+import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalBean
12
+import com.yihucha.hbyhc.presentation.invitation.view_model.InviteViewModel
10
 import com.yihucha.hbyhc.presentation.mine.adapter.TixianRecordAdapter
13
 import com.yihucha.hbyhc.presentation.mine.adapter.TixianRecordAdapter
11
 
14
 
12
 class TiXianRecordActivity :
15
 class TiXianRecordActivity :
13
     ViewBindingTitleBaseActivity<ActivityTiXianRecordBinding>() {
16
     ViewBindingTitleBaseActivity<ActivityTiXianRecordBinding>() {
14
-    private val datas = mutableListOf<String>()
17
+    private val datas = mutableListOf<WithdrawalBean>()
15
     private lateinit var adapter: TixianRecordAdapter
18
     private lateinit var adapter: TixianRecordAdapter
19
+    private val inviteViewModel by lazy {
20
+        ViewModelProvider(this)[InviteViewModel::class.java]
21
+    }
22
+
16
     override fun onCreate(savedInstanceState: Bundle?) {
23
     override fun onCreate(savedInstanceState: Bundle?) {
17
         super.onCreate(savedInstanceState)
24
         super.onCreate(savedInstanceState)
18
         initView()
25
         initView()
@@ -20,10 +27,12 @@ class TiXianRecordActivity :
20
     }
27
     }
21
 
28
 
22
     private fun initData() {
29
     private fun initData() {
23
-        for (i in 1..100) {
24
-            datas.add("$i")
30
+        inviteViewModel.getWithdrawal()
31
+        inviteViewModel.mWithdrawalData.observe(this) {
32
+            datas.addAll(it)
33
+            adapter.setDatas(datas)
25
         }
34
         }
26
-        adapter.setDatas(datas)
35
+
27
     }
36
     }
28
 
37
 
29
     private fun initView() {
38
     private fun initView() {

+ 135 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/adapter/TeamListAdapter.kt

@@ -0,0 +1,135 @@
1
+package com.yihucha.hbyhc.presentation.mine.adapter
2
+
3
+import android.app.Activity
4
+import android.content.Context
5
+import android.view.LayoutInflater
6
+import android.view.View
7
+import android.view.ViewGroup
8
+import androidx.recyclerview.widget.RecyclerView
9
+import androidx.recyclerview.widget.RecyclerView.ViewHolder
10
+import com.bumptech.glide.Glide
11
+import com.yihucha.hbyhc.R
12
+import com.yihucha.hbyhc.databinding.ItemTeamListBinding
13
+import com.yihucha.hbyhc.presentation.mine.FansDetailActivity
14
+import com.yihucha.hbyhc.presentation.mine.model.TeamBean
15
+import com.yihucha.hbyhc.utils.EmptyCheckUtils
16
+
17
+/**
18
+ *  author : zhangbing
19
+ *  time   : 2024/2/6 9:53
20
+ *  com.yihucha.hbyhc.presentation.mine.adapter
21
+ */
22
+class TeamListAdapter(var teamDatas: List<TeamBean.TeamListDTO.DataDTO>, var context: Context) :
23
+    RecyclerView.Adapter<TeamListAdapter.TeamHolder>() {
24
+
25
+    fun setDatas(teamDatas: List<TeamBean.TeamListDTO.DataDTO>) {
26
+        this.teamDatas = teamDatas
27
+        notifyDataSetChanged()
28
+    }
29
+
30
+    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TeamHolder {
31
+        return TeamHolder(
32
+            LayoutInflater.from(context).inflate(R.layout.item_team_list, parent, false)
33
+        )
34
+    }
35
+
36
+    override fun getItemCount(): Int {
37
+        return if (EmptyCheckUtils.isEmpty(teamDatas)) 0 else teamDatas.size
38
+    }
39
+
40
+    override fun onBindViewHolder(holder: TeamHolder, position: Int) {
41
+        teamDatas[position].apply {
42
+            Glide.with(context).load(avatar).into(holder.binding.imgvHead)
43
+            holder.binding.tvName.text = nickname
44
+            holder.binding.tvPhone.text = phone
45
+            holder.binding.tvDate.text = createTime
46
+            var member = identity
47
+            var areaManageType = level
48
+            var stockholder = partnership
49
+            when (areaManageType) {
50
+                "101" -> {
51
+                    //社区服务中心
52
+                    holder.binding.ivMemberDaili.visibility = View.VISIBLE
53
+                    holder.binding.ivMemberDaili.setImageResource(R.mipmap.icon_daili_shequ)
54
+                }
55
+                "102" -> {
56
+                    //乡镇服务中心
57
+                    holder.binding.ivMemberDaili.visibility = View.VISIBLE
58
+                    holder.binding.ivMemberDaili.setImageResource(R.mipmap.icon_daili_xiang)
59
+                }
60
+                "103" -> {
61
+                    //区县服务中心
62
+                    holder.binding.ivMemberDaili.visibility = View.VISIBLE
63
+                    holder.binding.ivMemberDaili.setImageResource(R.mipmap.icon_daili_qu)
64
+                }
65
+                "104" -> {
66
+                    //市级运营中心
67
+                    holder.binding.ivMemberDaili.visibility = View.VISIBLE
68
+                    holder.binding.ivMemberDaili.setImageResource(R.mipmap.icon_daili_shi)
69
+                }
70
+                "105" -> {
71
+                    //省级分公司
72
+                    holder.binding.ivMemberDaili.visibility = View.VISIBLE
73
+                    holder.binding.ivMemberDaili.setImageResource(R.mipmap.icon_daili_sheng)
74
+                }
75
+                else -> {
76
+                    holder.binding.ivMemberDaili.visibility = View.GONE
77
+                }
78
+            }
79
+            when (member) {
80
+                "0" -> {
81
+                    //普通用户
82
+                    holder.binding.imgvIdentity.setImageResource(R.mipmap.icon_member_yonghu)
83
+                }
84
+                "100" -> {
85
+                    //合伙人
86
+                    holder.binding.imgvIdentity.setImageResource(R.mipmap.hehuoren)
87
+                }
88
+                "101" -> {
89
+                    //主任
90
+                    holder.binding.imgvIdentity.setImageResource(R.mipmap.icon_member_zhuren)
91
+                }
92
+                "102" -> {
93
+                    //经理
94
+                    holder.binding.imgvIdentity.setImageResource(R.mipmap.icon_member_jingli)
95
+                }
96
+                "103" -> {
97
+                    //总监
98
+                    holder.binding.imgvIdentity.setImageResource(R.mipmap.icon_member_zongjian)
99
+                }
100
+                "104" -> {
101
+                    //合伙商户
102
+                    holder.binding.imgvIdentity.setImageResource(R.mipmap.icon_member_shanghu)
103
+                }
104
+                "105" -> {
105
+                    //合伙公司
106
+                    holder.binding.imgvIdentity.setImageResource(R.mipmap.icon_member_gongsi)
107
+                }
108
+                else -> {
109
+                    //合伙董事  (猜的)
110
+                    holder.binding.imgvIdentity.setImageResource(R.mipmap.icon_member_dongshi)
111
+                }
112
+            }
113
+
114
+            if ("1" == stockholder) {
115
+                holder.binding.ivMemberLhcsr.visibility = View.VISIBLE
116
+                holder.binding.ivMemberLhcsr.setImageResource(R.mipmap.icon_qiye)
117
+            } else {
118
+                holder.binding.ivMemberLhcsr.visibility = View.GONE
119
+            }
120
+            holder.binding.itemLayout.setOnClickListener {
121
+                FansDetailActivity.launch(context as Activity,uid)
122
+            }
123
+
124
+        }
125
+
126
+        if (position == teamDatas.size - 1) {
127
+            holder.binding.viewLine.visibility = View.GONE
128
+        }
129
+
130
+    }
131
+
132
+    inner class TeamHolder(itemView: View) : ViewHolder(itemView) {
133
+        val binding by lazy { ItemTeamListBinding.bind(itemView) }
134
+    }
135
+}

+ 38 - 11
app/src/main/java/com/yihucha/hbyhc/presentation/mine/adapter/TixianRecordAdapter.java

@@ -5,9 +5,13 @@ import android.view.LayoutInflater;
5
 import android.view.View;
5
 import android.view.View;
6
 import android.view.ViewGroup;
6
 import android.view.ViewGroup;
7
 import android.widget.BaseAdapter;
7
 import android.widget.BaseAdapter;
8
+import android.widget.TextView;
9
+
10
+import androidx.core.content.ContextCompat;
8
 
11
 
9
 import com.yihucha.hbyhc.R;
12
 import com.yihucha.hbyhc.R;
10
 import com.yihucha.hbyhc.databinding.ItemTixianRecordsBinding;
13
 import com.yihucha.hbyhc.databinding.ItemTixianRecordsBinding;
14
+import com.yihucha.hbyhc.presentation.invitation.model.WithdrawalBean;
11
 import com.yihucha.hbyhc.utils.EmptyCheckUtils;
15
 import com.yihucha.hbyhc.utils.EmptyCheckUtils;
12
 
16
 
13
 import java.util.List;
17
 import java.util.List;
@@ -19,14 +23,14 @@ import java.util.List;
19
  */
23
  */
20
 public class TixianRecordAdapter extends BaseAdapter {
24
 public class TixianRecordAdapter extends BaseAdapter {
21
     private Context context;
25
     private Context context;
22
-    private List<String> datas;
26
+    private List<WithdrawalBean> datas;
23
 
27
 
24
-    public TixianRecordAdapter(Context context, List<String> datas) {
28
+    public TixianRecordAdapter(Context context, List<WithdrawalBean> datas) {
25
         this.context = context;
29
         this.context = context;
26
         this.datas = datas;
30
         this.datas = datas;
27
     }
31
     }
28
 
32
 
29
-    public void setDatas(List<String> datas) {
33
+    public void setDatas(List<WithdrawalBean> datas) {
30
         this.datas = datas;
34
         this.datas = datas;
31
         notifyDataSetChanged();
35
         notifyDataSetChanged();
32
     }
36
     }
@@ -37,7 +41,7 @@ public class TixianRecordAdapter extends BaseAdapter {
37
     }
41
     }
38
 
42
 
39
     @Override
43
     @Override
40
-    public String getItem(int position) {
44
+    public WithdrawalBean getItem(int position) {
41
         return datas.get(position);
45
         return datas.get(position);
42
     }
46
     }
43
 
47
 
@@ -48,24 +52,47 @@ public class TixianRecordAdapter extends BaseAdapter {
48
 
52
 
49
     @Override
53
     @Override
50
     public View getView(int position, View convertView, ViewGroup parent) {
54
     public View getView(int position, View convertView, ViewGroup parent) {
51
-        TXRecordHolder holder=null;
52
-        if (convertView==null) {
53
-            convertView = LayoutInflater.from(context).inflate(R.layout.item_tixian_records,parent,false);
55
+        TXRecordHolder holder = null;
56
+        if (convertView == null) {
57
+            convertView = LayoutInflater.from(context).inflate(R.layout.item_tixian_records, parent, false);
54
             holder = new TXRecordHolder(convertView);
58
             holder = new TXRecordHolder(convertView);
55
             convertView.setTag(holder);
59
             convertView.setTag(holder);
56
-        }else {
60
+        } else {
57
             holder = (TXRecordHolder) convertView.getTag();
61
             holder = (TXRecordHolder) convertView.getTag();
58
         }
62
         }
59
         //此处设置数据
63
         //此处设置数据
64
+        WithdrawalBean item = getItem(position);
65
+        holder.tvName.setText(item.getTitle());
66
+        holder.tvTime.setText(item.getCreate_time());
67
+        holder.tvMoney.setText(item.getExtract_price());
68
+        TextView tvStatus = holder.tvStatus;
69
+        if ("-1".equals(item.getStatus())) {
70
+            //未通过
71
+            tvStatus.setText("提现失败");
72
+            tvStatus.setTextColor(ContextCompat.getColor(context, R.color.red_fe0032));
73
+        } else if ("0".equals(item.getStatus())) {
74
+            //审核中
75
+            tvStatus.setText("提现中");
76
+            tvStatus.setTextColor(ContextCompat.getColor(context, R.color.org_f88726));
77
+        } else if ("1".equals(item.getStatus())) {
78
+            //已提现
79
+            tvStatus.setText("已完成");
80
+            tvStatus.setTextColor(ContextCompat.getColor(context, R.color.black_333333));
81
+        }
60
         return convertView;
82
         return convertView;
61
     }
83
     }
62
 
84
 
63
 
85
 
64
     static class TXRecordHolder {
86
     static class TXRecordHolder {
65
-        public ItemTixianRecordsBinding binding;
66
-
87
+        public TextView tvName;
88
+        public TextView tvTime;
89
+        public TextView tvMoney;
90
+        public TextView tvStatus;
67
         public TXRecordHolder(View itemView) {
91
         public TXRecordHolder(View itemView) {
68
-            ItemTixianRecordsBinding.bind(itemView);
92
+            tvName = itemView.findViewById(R.id.tv_name);
93
+            tvTime = itemView.findViewById(R.id.tv_time);
94
+            tvMoney = itemView.findViewById(R.id.tv_money);
95
+            tvStatus = itemView.findViewById(R.id.tv_status);
69
         }
96
         }
70
     }
97
     }
71
 }
98
 }

+ 132 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/FansDetailBean.java

@@ -0,0 +1,132 @@
1
+package com.yihucha.hbyhc.presentation.mine.model;
2
+
3
+import com.google.gson.annotations.SerializedName;
4
+
5
+/**
6
+ * author : zhangbing
7
+ * time   : 2024/2/6 11:16
8
+ * com.yihucha.hbyhc.presentation.mine.model
9
+ */
10
+public class FansDetailBean {
11
+
12
+    @SerializedName("uid")
13
+    private String uid;
14
+    @SerializedName("nickname")
15
+    private String nickname;
16
+    @SerializedName("phone")
17
+    private String phone;
18
+    @SerializedName("avatar")
19
+    private String avatar;
20
+    @SerializedName("create_time")
21
+    private String createTime;
22
+    @SerializedName("identity")
23
+    private String identity;
24
+    @SerializedName("level")
25
+    private String level;
26
+    @SerializedName("partnership")
27
+    private String partnership;
28
+    @SerializedName("puid")
29
+    private String puid;
30
+    @SerializedName("p_nickname")
31
+    private String pNickname;
32
+    @SerializedName("p_phone")
33
+    private String pPhone;
34
+    @SerializedName("ylj")
35
+    private String ylj;
36
+
37
+    public String getUid() {
38
+        return uid;
39
+    }
40
+
41
+    public void setUid(String uid) {
42
+        this.uid = uid;
43
+    }
44
+
45
+    public String getNickname() {
46
+        return nickname;
47
+    }
48
+
49
+    public void setNickname(String nickname) {
50
+        this.nickname = nickname;
51
+    }
52
+
53
+    public String getPhone() {
54
+        return phone;
55
+    }
56
+
57
+    public void setPhone(String phone) {
58
+        this.phone = phone;
59
+    }
60
+
61
+    public String getAvatar() {
62
+        return avatar;
63
+    }
64
+
65
+    public void setAvatar(String avatar) {
66
+        this.avatar = avatar;
67
+    }
68
+
69
+    public String getCreateTime() {
70
+        return createTime;
71
+    }
72
+
73
+    public void setCreateTime(String createTime) {
74
+        this.createTime = createTime;
75
+    }
76
+
77
+    public String getIdentity() {
78
+        return identity;
79
+    }
80
+
81
+    public void setIdentity(String identity) {
82
+        this.identity = identity;
83
+    }
84
+
85
+    public String getLevel() {
86
+        return level;
87
+    }
88
+
89
+    public void setLevel(String level) {
90
+        this.level = level;
91
+    }
92
+
93
+    public String getPartnership() {
94
+        return partnership;
95
+    }
96
+
97
+    public void setPartnership(String partnership) {
98
+        this.partnership = partnership;
99
+    }
100
+
101
+    public String getPuid() {
102
+        return puid;
103
+    }
104
+
105
+    public void setPuid(String puid) {
106
+        this.puid = puid;
107
+    }
108
+
109
+    public String getPNickname() {
110
+        return pNickname;
111
+    }
112
+
113
+    public void setPNickname(String pNickname) {
114
+        this.pNickname = pNickname;
115
+    }
116
+
117
+    public String getPPhone() {
118
+        return pPhone;
119
+    }
120
+
121
+    public void setPPhone(String pPhone) {
122
+        this.pPhone = pPhone;
123
+    }
124
+
125
+    public String getYlj() {
126
+        return ylj;
127
+    }
128
+
129
+    public void setYlj(String ylj) {
130
+        this.ylj = ylj;
131
+    }
132
+}

+ 19 - 22
app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/TeamBean.java

@@ -1,7 +1,6 @@
1
 package com.yihucha.hbyhc.presentation.mine.model;
1
 package com.yihucha.hbyhc.presentation.mine.model;
2
 
2
 
3
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4
-import com.fasterxml.jackson.annotation.JsonProperty;
3
+import com.google.gson.annotations.SerializedName;
5
 
4
 
6
 import java.util.List;
5
 import java.util.List;
7
 
6
 
@@ -10,16 +9,16 @@ import java.util.List;
10
  * time   : 2024/2/5 16:51
9
  * time   : 2024/2/5 16:51
11
  * com.yihucha.hbyhc.presentation.mine.model
10
  * com.yihucha.hbyhc.presentation.mine.model
12
  */
11
  */
13
-@JsonIgnoreProperties(ignoreUnknown = true)
14
 public class TeamBean {
12
 public class TeamBean {
15
 
13
 
16
-    @JsonProperty("direct_fans_num")
14
+
15
+    @SerializedName("direct_fans_num")
17
     private Integer directFansNum;
16
     private Integer directFansNum;
18
-    @JsonProperty("fans_num")
17
+    @SerializedName("fans_num")
19
     private Integer fansNum;
18
     private Integer fansNum;
20
-    @JsonProperty("team_list")
19
+    @SerializedName("team_list")
21
     private TeamListDTO teamList;
20
     private TeamListDTO teamList;
22
-    @JsonProperty("effective_fans_num")
21
+    @SerializedName("effective_fans_num")
23
     private Integer effectiveFansNum;
22
     private Integer effectiveFansNum;
24
 
23
 
25
     public Integer getDirectFansNum() {
24
     public Integer getDirectFansNum() {
@@ -54,17 +53,16 @@ public class TeamBean {
54
         this.effectiveFansNum = effectiveFansNum;
53
         this.effectiveFansNum = effectiveFansNum;
55
     }
54
     }
56
 
55
 
57
-    @JsonIgnoreProperties(ignoreUnknown = true)
58
     public static class TeamListDTO {
56
     public static class TeamListDTO {
59
-        @JsonProperty("total")
57
+        @SerializedName("total")
60
         private Integer total;
58
         private Integer total;
61
-        @JsonProperty("per_page")
59
+        @SerializedName("per_page")
62
         private Integer perPage;
60
         private Integer perPage;
63
-        @JsonProperty("current_page")
61
+        @SerializedName("current_page")
64
         private Integer currentPage;
62
         private Integer currentPage;
65
-        @JsonProperty("last_page")
63
+        @SerializedName("last_page")
66
         private Integer lastPage;
64
         private Integer lastPage;
67
-        @JsonProperty("data")
65
+        @SerializedName("data")
68
         private List<DataDTO> data;
66
         private List<DataDTO> data;
69
 
67
 
70
         public Integer getTotal() {
68
         public Integer getTotal() {
@@ -107,23 +105,22 @@ public class TeamBean {
107
             this.data = data;
105
             this.data = data;
108
         }
106
         }
109
 
107
 
110
-        @JsonIgnoreProperties(ignoreUnknown = true)
111
         public static class DataDTO {
108
         public static class DataDTO {
112
-            @JsonProperty("uid")
109
+            @SerializedName("uid")
113
             private String uid;
110
             private String uid;
114
-            @JsonProperty("nickname")
111
+            @SerializedName("nickname")
115
             private String nickname;
112
             private String nickname;
116
-            @JsonProperty("phone")
113
+            @SerializedName("phone")
117
             private String phone;
114
             private String phone;
118
-            @JsonProperty("avatar")
115
+            @SerializedName("avatar")
119
             private String avatar;
116
             private String avatar;
120
-            @JsonProperty("create_time")
117
+            @SerializedName("create_time")
121
             private String createTime;
118
             private String createTime;
122
-            @JsonProperty("identity")
119
+            @SerializedName("identity")
123
             private String identity;
120
             private String identity;
124
-            @JsonProperty("level")
121
+            @SerializedName("level")
125
             private String level;
122
             private String level;
126
-            @JsonProperty("partnership")
123
+            @SerializedName("partnership")
127
             private String partnership;
124
             private String partnership;
128
 
125
 
129
             public String getUid() {
126
             public String getUid() {

+ 50 - 3
app/src/main/java/com/yihucha/hbyhc/presentation/mine/model/TeamViewModel.kt

@@ -1,21 +1,68 @@
1
 package com.yihucha.hbyhc.presentation.mine.model
1
 package com.yihucha.hbyhc.presentation.mine.model
2
 
2
 
3
+import androidx.lifecycle.MutableLiveData
3
 import androidx.lifecycle.ViewModel
4
 import androidx.lifecycle.ViewModel
5
+import com.yihucha.hbyhc.base.BaseViewModel
6
+import com.yihucha.hbyhc.network.BaseObserver
7
+import com.yihucha.hbyhc.network.DataResponse
8
+import com.yihucha.hbyhc.network.NetworkApi
9
+import com.yihucha.hbyhc.network.service.UserService
4
 
10
 
5
 /**
11
 /**
6
  *  author : zhangbing
12
  *  author : zhangbing
7
  *  time   : 2024/2/5 17:30
13
  *  time   : 2024/2/5 17:30
8
  *  com.yihucha.hbyhc.presentation.mine.model
14
  *  com.yihucha.hbyhc.presentation.mine.model
9
  */
15
  */
10
-class TeamViewModel : ViewModel() {
16
+class TeamViewModel : BaseViewModel() {
17
+    var teamBean = MutableLiveData<TeamBean>()
18
+    var fansDetailBean = MutableLiveData<FansDetailBean>()
11
 
19
 
20
+    /**
21
+     * 请求团队列表
22
+     */
23
+    @SuppressWarnings("CheckResult")
24
+    fun requestTeamList(page: Int, limit: Int = 10, type: Int = 0) {
25
+        NetworkApi.createService(UserService::class.java)
26
+            .getTeamList(page, limit, type)
27
+            .compose(NetworkApi.applySchedulers(object : BaseObserver<DataResponse<TeamBean>>() {
28
+                override fun onSuccess(t: DataResponse<TeamBean>) {
29
+                    if (t.responseCode != 200) {
30
+                        failed.postValue(t.responseError)
31
+                        return
32
+                    }
33
+                    t.data?.apply {
34
+                        teamBean.postValue(this)
35
+                    } ?: failed.postValue(t.responseError)
36
+                }
12
 
37
 
38
+                override fun onFailure(e: Throwable) {
39
+                    failed.postValue(e.message)
40
+                }
41
+            }))
42
+
43
+    }
13
 
44
 
14
     /**
45
     /**
15
-     * 请求团队列表
46
+     * 粉丝详情
16
      */
47
      */
17
-    fun requestTeamList(){
48
+    @SuppressWarnings("checkResult")
49
+    fun requestFansDetails(uid: String) {
50
+        NetworkApi.createService(UserService::class.java).getFansDetail(uid)
51
+            .compose(NetworkApi.applySchedulers(object :
52
+                BaseObserver<DataResponse<FansDetailBean>>() {
53
+                override fun onSuccess(t: DataResponse<FansDetailBean>?) {
54
+                    t?.apply {
55
+                        if (responseCode == 200) {
56
+                            data?.apply {
57
+                                fansDetailBean.postValue(data)
58
+                            }
59
+                        }
60
+                    }
61
+                }
18
 
62
 
63
+                override fun onFailure(e: Throwable?) {
64
+                }
19
 
65
 
66
+            }))
20
     }
67
     }
21
 }
68
 }

+ 15 - 17
app/src/main/java/com/yihucha/hbyhc/presentation/mine/view_model/MineSpreadInfo.java

@@ -1,43 +1,41 @@
1
 package com.yihucha.hbyhc.presentation.mine.view_model;
1
 package com.yihucha.hbyhc.presentation.mine.view_model;
2
 
2
 
3
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4
-import com.fasterxml.jackson.annotation.JsonProperty;
3
+import com.google.gson.annotations.SerializedName;
5
 
4
 
6
 /**
5
 /**
7
  * author : zhangbing
6
  * author : zhangbing
8
  * time   : 2024/2/5 14:51
7
  * time   : 2024/2/5 14:51
9
  * com.yihucha.hbyhc.presentation.mine.view_model
8
  * com.yihucha.hbyhc.presentation.mine.view_model
10
  */
9
  */
11
-@JsonIgnoreProperties(ignoreUnknown = true)
12
 public class MineSpreadInfo {
10
 public class MineSpreadInfo {
13
 
11
 
14
-    @JsonProperty("current_balance")
12
+    @SerializedName("current_balance")
15
     private String currentBalance;
13
     private String currentBalance;
16
-    @JsonProperty("unsettled_balance")
14
+    @SerializedName("unsettled_balance")
17
     private Integer unsettledBalance;
15
     private Integer unsettledBalance;
18
-    @JsonProperty("withdrawn_balance")
16
+    @SerializedName("withdrawn_balance")
19
     private String withdrawnBalance;
17
     private String withdrawnBalance;
20
-    @JsonProperty("total_balance")
18
+    @SerializedName("total_balance")
21
     private String totalBalance;
19
     private String totalBalance;
22
-    @JsonProperty("identity")
20
+    @SerializedName("identity")
23
     private String identity;
21
     private String identity;
24
-    @JsonProperty("level")
22
+    @SerializedName("level")
25
     private String level;
23
     private String level;
26
-    @JsonProperty("partnership")
24
+    @SerializedName("partnership")
27
     private String partnership;
25
     private String partnership;
28
-    @JsonProperty("green_integral")
26
+    @SerializedName("green_integral")
29
     private String greenIntegral;
27
     private String greenIntegral;
30
-    @JsonProperty("green_integral_is")
28
+    @SerializedName("green_integral_is")
31
     private String greenIntegralIs;
29
     private String greenIntegralIs;
32
-    @JsonProperty("nickname")
30
+    @SerializedName("nickname")
33
     private String nickname;
31
     private String nickname;
34
-    @JsonProperty("avatar")
32
+    @SerializedName("avatar")
35
     private String avatar;
33
     private String avatar;
36
-    @JsonProperty("fans_num")
34
+    @SerializedName("fans_num")
37
     private Integer fansNum;
35
     private Integer fansNum;
38
-    @JsonProperty("ylj")
36
+    @SerializedName("ylj")
39
     private String ylj;
37
     private String ylj;
40
-    @JsonProperty("yhc_withdrawal_money")
38
+    @SerializedName("yhc_withdrawal_money")
41
     private Integer yhcWithdrawalMoney;
39
     private Integer yhcWithdrawalMoney;
42
 
40
 
43
     public String getCurrentBalance() {
41
     public String getCurrentBalance() {

+ 10 - 3
app/src/main/java/com/yihucha/hbyhc/presentation/mine/view_model/MineViewModel.java

@@ -35,6 +35,7 @@ import com.yihucha.hbyhc.presentation.mine.model.UserVipInfoBean;
35
 import com.yihucha.hbyhc.presentation.mine.model.YanglaojinBean;
35
 import com.yihucha.hbyhc.presentation.mine.model.YanglaojinBean;
36
 import com.yihucha.hbyhc.presentation.mine.repository.UserRepository;
36
 import com.yihucha.hbyhc.presentation.mine.repository.UserRepository;
37
 import com.yihucha.hbyhc.presentation.order.model.ThirdOrderBean;
37
 import com.yihucha.hbyhc.presentation.order.model.ThirdOrderBean;
38
+import com.yihucha.hbyhc.utils.EmptyCheckUtils;
38
 import com.yihucha.hbyhc.utils.LogUtil;
39
 import com.yihucha.hbyhc.utils.LogUtil;
39
 import com.yihucha.hbyhc.utils.MVUtils;
40
 import com.yihucha.hbyhc.utils.MVUtils;
40
 
41
 
@@ -42,6 +43,8 @@ import java.util.HashMap;
42
 import java.util.List;
43
 import java.util.List;
43
 import java.util.Map;
44
 import java.util.Map;
44
 
45
 
46
+import javax.crypto.spec.PSource;
47
+
45
 import io.reactivex.Observer;
48
 import io.reactivex.Observer;
46
 
49
 
47
 /**
50
 /**
@@ -165,13 +168,17 @@ public class MineViewModel extends BaseViewModel {
165
      * 养老金列表
168
      * 养老金列表
166
      */
169
      */
167
     @SuppressLint("CheckResult")
170
     @SuppressLint("CheckResult")
168
-    public void getYanglaoList(int page, String sorce, String month, int status) {
171
+    public void getYanglaoList(int page, String sorce, String month, String status) {
169
         Map<String, Object> map = new HashMap<>();
172
         Map<String, Object> map = new HashMap<>();
170
         map.put("page", page);
173
         map.put("page", page);
171
         map.put("limit", 10);
174
         map.put("limit", 10);
172
-        map.put("sorce", sorce);
175
+        if (EmptyCheckUtils.isNotEmpty(sorce)) {
176
+            map.put("sorce", sorce);
177
+        }
173
         map.put("month", month);
178
         map.put("month", month);
174
-        map.put("status", status);
179
+        if (EmptyCheckUtils.isNotEmpty(status)) {
180
+            map.put("status", status);
181
+        }
175
         UserService service = NetworkApi.createService(UserService.class);
182
         UserService service = NetworkApi.createService(UserService.class);
176
         service.getYanglaoList(map).compose(NetworkApi.applySchedulers(new BaseObserver<DataResponse<AnnuityRecordsBean>>() {
183
         service.getYanglaoList(map).compose(NetworkApi.applySchedulers(new BaseObserver<DataResponse<AnnuityRecordsBean>>() {
177
             @Override
184
             @Override

+ 0 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/order/LogisticsActivity.java

@@ -41,7 +41,6 @@ import java.util.List;
41
  * @author qmzh
41
  * @author qmzh
42
  * @date 2022/7/6
42
  * @date 2022/7/6
43
  * note:物流
43
  * note:物流
44
- * TODO 没有做完,从退货列表进入该页面,数据没有调通
45
  */
44
  */
46
 public class LogisticsActivity extends ViewBindingTitleBaseActivity<ActivityLogisticsBinding> implements View.OnClickListener {
45
 public class LogisticsActivity extends ViewBindingTitleBaseActivity<ActivityLogisticsBinding> implements View.OnClickListener {
47
     public static final String INTENT_ORDER_BEAN = "intentOrderBean";
46
     public static final String INTENT_ORDER_BEAN = "intentOrderBean";

+ 147 - 189
app/src/main/java/com/yihucha/hbyhc/presentation/order/SubmitOrderActivity.java

@@ -6,6 +6,7 @@ import android.content.Intent;
6
 import android.os.Bundle;
6
 import android.os.Bundle;
7
 import android.view.Gravity;
7
 import android.view.Gravity;
8
 import android.view.View;
8
 import android.view.View;
9
+import android.widget.Toast;
9
 
10
 
10
 import androidx.lifecycle.Observer;
11
 import androidx.lifecycle.Observer;
11
 import androidx.lifecycle.ViewModelProvider;
12
 import androidx.lifecycle.ViewModelProvider;
@@ -22,6 +23,8 @@ import com.yihucha.hbyhc.presentation.big_storehouse.model.DcListBean;
22
 import com.yihucha.hbyhc.presentation.mine.MyAddressActivity;
23
 import com.yihucha.hbyhc.presentation.mine.MyAddressActivity;
23
 import com.yihucha.hbyhc.presentation.mine.model.AddressListBean;
24
 import com.yihucha.hbyhc.presentation.mine.model.AddressListBean;
24
 import com.yihucha.hbyhc.presentation.mine.model.UserInfoModel;
25
 import com.yihucha.hbyhc.presentation.mine.model.UserInfoModel;
26
+import com.yihucha.hbyhc.presentation.mine.view_model.MineSpreadInfo;
27
+import com.yihucha.hbyhc.presentation.mine.view_model.MineViewModel;
25
 import com.yihucha.hbyhc.presentation.order.adapter.OrderShopAdapter;
28
 import com.yihucha.hbyhc.presentation.order.adapter.OrderShopAdapter;
26
 import com.yihucha.hbyhc.presentation.order.model.OrderCheckBean;
29
 import com.yihucha.hbyhc.presentation.order.model.OrderCheckBean;
27
 import com.yihucha.hbyhc.presentation.order.model.OrderCreateBean;
30
 import com.yihucha.hbyhc.presentation.order.model.OrderCreateBean;
@@ -42,6 +45,7 @@ import java.util.ArrayList;
42
 import java.util.HashMap;
45
 import java.util.HashMap;
43
 import java.util.List;
46
 import java.util.List;
44
 import java.util.Map;
47
 import java.util.Map;
48
+import java.util.concurrent.locks.Lock;
45
 
49
 
46
 /**
50
 /**
47
  * @author qmzh
51
  * @author qmzh
@@ -55,6 +59,7 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
55
     private ArrayList mCartId;//购物车id
59
     private ArrayList mCartId;//购物车id
56
     private String flag;
60
     private String flag;
57
     public static OrderViewModel orderViewModel;
61
     public static OrderViewModel orderViewModel;
62
+    public static MineViewModel mineViewModel;
58
     //订单数据
63
     //订单数据
59
     private OrderShopAdapter orderShopAdapter;
64
     private OrderShopAdapter orderShopAdapter;
60
     private List<OrderCheckBean.DataDTO.OrderDTOX> orderDataList = new ArrayList<>();
65
     private List<OrderCheckBean.DataDTO.OrderDTOX> orderDataList = new ArrayList<>();
@@ -63,7 +68,6 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
63
     private List<AddressListBean.AddressList> addressListData = new ArrayList<>();
68
     private List<AddressListBean.AddressList> addressListData = new ArrayList<>();
64
 
69
 
65
     private RemarkDialog remarkDialog;
70
     private RemarkDialog remarkDialog;
66
-
67
     //大仓列表
71
     //大仓列表
68
     private List<DcListBean> mDcListData = new ArrayList<>();
72
     private List<DcListBean> mDcListData = new ArrayList<>();
69
     private String mMerId;//商户id
73
     private String mMerId;//商户id
@@ -76,6 +80,11 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
76
     private String special_type;
80
     private String special_type;
77
     private String special_merchant;
81
     private String special_merchant;
78
 
82
 
83
+    private boolean isChecked;
84
+    private String account;
85
+
86
+    private String totalPrices;
87
+
79
     @Subscribe
88
     @Subscribe
80
     @Override
89
     @Override
81
     protected void onCreate(Bundle savedInstanceState) {
90
     protected void onCreate(Bundle savedInstanceState) {
@@ -87,6 +96,8 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
87
 //        seckill = getIntent().getStringExtra(INTENT_SECKILL);
96
 //        seckill = getIntent().getStringExtra(INTENT_SECKILL);
88
         orderViewModel =
97
         orderViewModel =
89
                 new ViewModelProvider(this).get(OrderViewModel.class);
98
                 new ViewModelProvider(this).get(OrderViewModel.class);
99
+        mineViewModel =
100
+                new ViewModelProvider(this).get(MineViewModel.class);
90
 
101
 
91
         //注册EventBus
102
         //注册EventBus
92
         EventBus.getDefault().register(this);
103
         EventBus.getDefault().register(this);
@@ -123,21 +134,6 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
123
             @Override
134
             @Override
124
             public void onItemlChooseABigWarehouseClick(int position) {
135
             public void onItemlChooseABigWarehouseClick(int position) {
125
                 //选择大仓
136
                 //选择大仓
126
-            /*    DcListDialog mDcListDialog = new DcListDialog(context, orderDataList.get(position).getList(),
127
-                        new DcListDialog.PriorityListener() {
128
-                    @Override
129
-                    public void refreshPriorityUI(int state) {
130
-                        for (int i = 0; i < orderDataList.get(position).getList().size(); i++) {
131
-                            orderDataList.get(position).getList().get(i).setThe_selected(false);
132
-                        }
133
-                        orderDataList.get(position).getDcList().get(state).setThe_selected(true);
134
-                        LogUtil.LogInfo("orderDataList", JSON.toJSONString(orderDataList.get(position).getDcList()));
135
-                        orderShopAdapter.notifyDataSetChanged();
136
-                    }
137
-                });
138
-                //显示窗口
139
-                mDcListDialog.showAtLocation(SubmitOrderActivity.this.findViewById(R.id.main),
140
-                        Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 0); //设置layout在PopupWindow中显示的位置*/
141
             }
137
             }
142
 
138
 
143
             @Override
139
             @Override
@@ -145,6 +141,23 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
145
                 CustomDialog.getGreenIntegralDialog(SubmitOrderActivity.this);
141
                 CustomDialog.getGreenIntegralDialog(SubmitOrderActivity.this);
146
             }
142
             }
147
         });
143
         });
144
+        orderShopAdapter.setOnClickListener(new OrderShopAdapter.OnRedIntegralAction() {
145
+            @Override
146
+            public void onCheckChanged(boolean isC) {
147
+                if (isC) {
148
+                    totalPrices = mViewBinding.tvTotalPrice.getText().toString();
149
+                    mViewBinding.tvTotalPrice.setText("0");
150
+                } else {
151
+                    mViewBinding.tvTotalPrice.setText(totalPrices + "");
152
+                }
153
+                isChecked = isC;
154
+            }
155
+
156
+            @Override
157
+            public void onHhrChanged(String acc) {
158
+                account = acc;
159
+            }
160
+        });
148
         mViewBinding.tvSubmitOrder.setOnClickListener(this);
161
         mViewBinding.tvSubmitOrder.setOnClickListener(this);
149
         mViewBinding.llNoAddress.setOnClickListener(this);
162
         mViewBinding.llNoAddress.setOnClickListener(this);
150
         mViewBinding.llAddress.setOnClickListener(this);
163
         mViewBinding.llAddress.setOnClickListener(this);
@@ -152,17 +165,6 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
152
 
165
 
153
     private void getTotalprices() {
166
     private void getTotalprices() {
154
         double totalPrice = 0;
167
         double totalPrice = 0;
155
-/*        for (int i = 0; i < orderDataList.size(); i++) {
156
-            for (int j = 0; j < orderDataList.get(i).getList().size(); j++) {
157
-                //当前商品购买数量
158
-                int num = Integer.parseInt(orderDataList.get(i).getList().get(j).getCartNum());
159
-                Double   price = DoubleFormatTool.strToDouble(orderDataList.get(i).getList()
160
-                        .get(j).getProductAttr().getPrice());
161
-
162
-                totalPrice += DoubleFormatTool.multiply(num, price);
163
-            }
164
-            totalPrice += Double.parseDouble(orderDataList.get(i).getOrder().getPostagePrice());
165
-        }*/
166
         totalPrice += Double.parseDouble(orderBean == null ? "0.00" : orderBean.getOrderPrice());
168
         totalPrice += Double.parseDouble(orderBean == null ? "0.00" : orderBean.getOrderPrice());
167
         mViewBinding.tvTotalPrice.setText(StringsUtil.getNumber(DoubleFormatTool.getRoundHalfUpDouble(totalPrice) + "") + "");
169
         mViewBinding.tvTotalPrice.setText(StringsUtil.getNumber(DoubleFormatTool.getRoundHalfUpDouble(totalPrice) + "") + "");
168
     }
170
     }
@@ -172,154 +174,123 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
172
         orderViewModel.getUserInfo();
174
         orderViewModel.getUserInfo();
173
         orderViewModel.userModel.observe(this, uesrInfoModel -> is_da_cang_vip = uesrInfoModel.getIs_da_cang_vip());
175
         orderViewModel.userModel.observe(this, uesrInfoModel -> is_da_cang_vip = uesrInfoModel.getIs_da_cang_vip());
174
 
176
 
177
+//        mineViewModel.getSpreadInfoYhc();
178
+        mineViewModel.spreadInfo.observe(this, mineSpreadInfo -> {
179
+            //2 、如果identity == 0 ,toast 提示需要您升级为合伙人
180
+            String identity = mineSpreadInfo.getIdentity();
181
+            //1 、greenIntegralIs >= 2才能使用红积分,否则提示不满足使用条件
182
+            String greenIntegralIs = mineSpreadInfo.getGreenIntegralIs();
183
+            //红积分数量
184
+            String greenIntegral = mineSpreadInfo.getGreenIntegral();
185
+            System.out.println("identity : " + identity);
186
+            System.out.println("greenIntegralIs : " + greenIntegralIs);
187
+            System.out.println("greenIntegralIs : " + greenIntegralIs);
188
+            orderShopAdapter.setNotify(orderBean.getProduct_type(),
189
+                    greenIntegralIs, identity, greenIntegral, mViewBinding.tvTotalPrice.getText().toString());
190
+        });
191
+
192
+
175
         //如果是大仓进入,请求大仓列表
193
         //如果是大仓进入,请求大仓列表
176
         if (flag.equals("2")) {
194
         if (flag.equals("2")) {
177
             orderViewModel.getDcList();
195
             orderViewModel.getDcList();
178
-            orderViewModel.dcListBeanMutableLiveData.observe(this, new Observer<List<DcListBean>>() {
179
-                @Override
180
-                public void onChanged(List<DcListBean> dcListBeans) {
181
-                    mDcListData.addAll(dcListBeans);
182
-                }
183
-            });
196
+            orderViewModel.dcListBeanMutableLiveData.observe(this, dcListBeans -> mDcListData.addAll(dcListBeans));
184
         }
197
         }
185
-        orderViewModel.addressListData.observe(this, new Observer<List<AddressListBean.AddressList>>() {
186
-            @Override
187
-            public void onChanged(List<AddressListBean.AddressList> addressLists) {
188
-                addressListData = addressLists;
189
-                orderDataList.clear();
190
-                if (addressLists.size() <= 0) {
191
-                    //没有地址
192
-                    CartIdRequest cartIdRequest = new CartIdRequest();
193
-                    cartIdRequest.setCart_id(mCartId);
194
-                    orderViewModel.getCheckOrder(cartIdRequest);
195
-
196
-                    mViewBinding.llNoAddress.setVisibility(View.VISIBLE);
197
-                    mViewBinding.llAddress.setVisibility(View.GONE);
198
-                } else {
199
-                    CartIdRequest cartIdRequest = new CartIdRequest();
200
-                    cartIdRequest.setCart_id(mCartId);
201
-                    cartIdRequest.setAddress_id(addressLists.get(0).getAddress_id());
202
-                    orderViewModel.getCheckOrder(cartIdRequest);
203
-
204
-                    mViewBinding.llNoAddress.setVisibility(View.GONE);
205
-                    mViewBinding.llAddress.setVisibility(View.VISIBLE);
206
-                    String dizhi = addressLists.get(0).getProvince() +
207
-                            addressLists.get(0).getCity() + addressLists.get(0).getDistrict() +
208
-                            addressLists.get(0).getDetail();
209
-                    mViewBinding.tvAddressDetails.setText(dizhi);
210
-                    mViewBinding.tvName.setText(addressLists.get(0).getReal_name());
211
-                    mViewBinding.tvPhone.setText(StringsUtil.encodeTel(addressLists.get(0).getPhone()));
212
-                }
198
+        orderViewModel.addressListData.observe(this, addressLists -> {
199
+            addressListData = addressLists;
200
+            orderDataList.clear();
201
+            if (addressLists.size() <= 0) {
202
+                //没有地址
203
+                CartIdRequest cartIdRequest = new CartIdRequest();
204
+                cartIdRequest.setCart_id(mCartId);
205
+                orderViewModel.getCheckOrder(cartIdRequest);
206
+
207
+                mViewBinding.llNoAddress.setVisibility(View.VISIBLE);
208
+                mViewBinding.llAddress.setVisibility(View.GONE);
209
+            } else {
210
+                CartIdRequest cartIdRequest = new CartIdRequest();
211
+                cartIdRequest.setCart_id(mCartId);
212
+                cartIdRequest.setAddress_id(addressLists.get(0).getAddress_id());
213
+                orderViewModel.getCheckOrder(cartIdRequest);
214
+
215
+                mViewBinding.llNoAddress.setVisibility(View.GONE);
216
+                mViewBinding.llAddress.setVisibility(View.VISIBLE);
217
+                String dizhi = addressLists.get(0).getProvince() +
218
+                        addressLists.get(0).getCity() + addressLists.get(0).getDistrict() +
219
+                        addressLists.get(0).getDetail();
220
+                mViewBinding.tvAddressDetails.setText(dizhi);
221
+                mViewBinding.tvName.setText(addressLists.get(0).getReal_name());
222
+                mViewBinding.tvPhone.setText(StringsUtil.encodeTel(addressLists.get(0).getPhone()));
213
             }
223
             }
214
         });
224
         });
215
         //订单数据
225
         //订单数据
216
-        orderViewModel.orderData.observe(this, new Observer<OrderCheckBean.DataDTO>() {
217
-            @Override
218
-            public void onChanged(OrderCheckBean.DataDTO orderData) {
219
-                orderDataList = orderData.getOrder();
220
-                orderBean = orderData;
221
-                //默认第一条大仓为选中
222
-                /*if (flag.equals("2")) {
223
-                    mDcListData.get(0).setThe_selected(true);
224
-                    for (int i = 0; i < orderDataList.size(); i++) {
225
-                        orderDataList.get(i).setDcList(mDcListData);
226
-                    }
227
-                }*/
228
-                orderShopAdapter.replaceData(orderDataList);
229
-                orderShopAdapter.isDcMember(!is_da_cang_vip.equals("0") && !flag.equals("2"));
230
-                orderShopAdapter.notifyDataSetChanged();
231
-
232
-                mMerId = orderDataList.get(0).getMerId();
233
-                if ("148".equals(mMerId)) {
234
-                    //积分商品
235
-                    mViewBinding.tvAmountPayable.setText("应付积分");
236
-                    mViewBinding.tvFuhao.setVisibility(View.GONE);
237
-                    mViewBinding.tvJifen.setVisibility(View.VISIBLE);
238
-                    double totalPrice = 0;
239
-/*                    for (int i = 0; i < orderDataList.size(); i++) {
240
-                        for (int j = 0; j < orderDataList.get(i).getList().size(); j++) {
241
-                            //当前商品购买数量
242
-                            int num = Integer.parseInt(orderDataList.get(i).getList().get(j).getCartNum());
243
-                            //当前商品单价
244
-                            Double price = DoubleFormatTool.strToDouble(orderDataList.get(i).getList().get(j).getProductAttr().getPrice());
245
-                            totalPrice += DoubleFormatTool.multiply(num, price);
246
-                        }
247
-                        totalPrice += Double.parseDouble(orderDataList.get(i).getOrder().getPostagePrice());
248
-                    }
249
-                   */
250
-                    totalPrice += Double.parseDouble(orderBean == null ? "0.00" : orderBean.getOrderPrice());
251
-                    //积分兑换金额==商品金额*30
252
-                    mViewBinding.tvTotalPrice.setText(StringsUtil.getNumber(NumberUtil.multiply(totalPrice + "", "30")));
253
-                } else if ("7".equals(special_type) && "beishengtang".equals(special_merchant)) {
254
-                    mViewBinding.tvAmountPayable.setVisibility(View.GONE);
255
-                    mViewBinding.tvJifen.setVisibility(View.VISIBLE);
256
-                    double totalPrice = 0;
257
-/*                    for (int i = 0; i < orderDataList.size(); i++) {
258
-                        for (int j = 0; j < orderDataList.get(i).getList().size(); j++) {
259
-                            //当前商品购买数量
260
-                            int num = Integer.parseInt(orderDataList.get(i).getList().get(j).getCartNum());
261
-                            //当前商品单价
262
-                            Double price = DoubleFormatTool.strToDouble(orderDataList.get(i).getList().get(j).getProductAttr().getPrice());
263
-                            totalPrice += DoubleFormatTool.multiply(num, price);
264
-                        }
265
-                        totalPrice += Double.parseDouble(orderDataList.get(i).getOrder().getPostagePrice());
266
-                    }*/
267
-                    totalPrice += Double.parseDouble(orderBean == null ? "0.00" : orderBean.getOrderPrice());
268
-                    mViewBinding.tvTotalPrice.setText(DoubleFormatTool.getRoundHalfUpDouble(totalPrice) + "");
269
-                } else {
270
-                    getTotalprices();
271
-                }
272
-
226
+        orderViewModel.orderData.observe(this, orderData -> {
227
+            orderDataList = orderData.getOrder();
228
+            orderBean = orderData;
229
+            mMerId = orderDataList.get(0).getMerId();
230
+            if ("148".equals(mMerId)) {
231
+                //积分商品
232
+                mViewBinding.tvAmountPayable.setText("应付积分");
233
+                mViewBinding.tvFuhao.setVisibility(View.GONE);
234
+                mViewBinding.tvJifen.setVisibility(View.VISIBLE);
235
+                double totalPrice = 0;
236
+                totalPrice += Double.parseDouble(orderBean == null ? "0.00" : orderBean.getOrderPrice());
237
+                //积分兑换金额==商品金额*30
238
+                mViewBinding.tvTotalPrice.setText(StringsUtil.getNumber(NumberUtil.multiply(totalPrice + "", "30")));
239
+            } else if ("7".equals(special_type) && "beishengtang".equals(special_merchant)) {
240
+                mViewBinding.tvAmountPayable.setVisibility(View.GONE);
241
+                mViewBinding.tvJifen.setVisibility(View.VISIBLE);
242
+                double totalPrice = 0;
243
+                totalPrice += Double.parseDouble(orderBean == null ? "0.00" : orderBean.getOrderPrice());
244
+                mViewBinding.tvTotalPrice.setText(DoubleFormatTool.getRoundHalfUpDouble(totalPrice) + "");
245
+            } else {
246
+                getTotalprices();
273
             }
247
             }
248
+            if ("17".equals(orderData.getProduct_type())) {
249
+                mineViewModel.getSpreadInfoYhc();
250
+            }
251
+
252
+            //默认第一条大仓为选中
253
+            orderShopAdapter.setDatas(orderDataList);
254
+            orderShopAdapter.isDcMember(!is_da_cang_vip.equals("0") && !flag.equals("2"));
255
+            orderShopAdapter.notifyDataSetChanged();
274
         });
256
         });
275
         //加减法成功
257
         //加减法成功
276
-        orderViewModel.numStatus.observe(this, new Observer<Integer>() {
277
-            @Override
278
-            public void onChanged(Integer i) {
258
+        orderViewModel.numStatus.observe(this, i -> {
279
 //                getTotalprices();
259
 //                getTotalprices();
280
-                if (addressListData == null || addressListData.size() <= 0) {
281
-                    //没有地址
282
-                    CartIdRequest cartIdRequest = new CartIdRequest();
283
-                    cartIdRequest.setCart_id(mCartId);
284
-                    orderViewModel.getCheckOrder(cartIdRequest);
285
-
286
-                    mViewBinding.llNoAddress.setVisibility(View.VISIBLE);
287
-                    mViewBinding.llAddress.setVisibility(View.GONE);
288
-                } else {
289
-                    CartIdRequest cartIdRequest = new CartIdRequest();
290
-                    cartIdRequest.setCart_id(mCartId);
291
-                    cartIdRequest.setAddress_id(addressListData.get(0).getAddress_id());
292
-                    orderViewModel.getCheckOrder(cartIdRequest);
293
-
294
-                    mViewBinding.llNoAddress.setVisibility(View.GONE);
295
-                    mViewBinding.llAddress.setVisibility(View.VISIBLE);
296
-                    String dizhi = addressListData.get(0).getProvince() +
297
-                            addressListData.get(0).getCity() + addressListData.get(0).getDistrict() +
298
-                            addressListData.get(0).getDetail();
299
-                    mViewBinding.tvAddressDetails.setText(dizhi);
300
-                    mViewBinding.tvName.setText(addressListData.get(0).getReal_name());
301
-                    mViewBinding.tvPhone.setText(StringsUtil.encodeTel(addressListData.get(0).getPhone()));
302
-                }
260
+            if (addressListData == null || addressListData.size() <= 0) {
261
+                //没有地址
262
+                CartIdRequest cartIdRequest = new CartIdRequest();
263
+                cartIdRequest.setCart_id(mCartId);
264
+                orderViewModel.getCheckOrder(cartIdRequest);
265
+
266
+                mViewBinding.llNoAddress.setVisibility(View.VISIBLE);
267
+                mViewBinding.llAddress.setVisibility(View.GONE);
268
+            } else {
269
+                CartIdRequest cartIdRequest = new CartIdRequest();
270
+                cartIdRequest.setCart_id(mCartId);
271
+                cartIdRequest.setAddress_id(addressListData.get(0).getAddress_id());
272
+                orderViewModel.getCheckOrder(cartIdRequest);
273
+
274
+                mViewBinding.llNoAddress.setVisibility(View.GONE);
275
+                mViewBinding.llAddress.setVisibility(View.VISIBLE);
276
+                String dizhi = addressListData.get(0).getProvince() +
277
+                        addressListData.get(0).getCity() + addressListData.get(0).getDistrict() +
278
+                        addressListData.get(0).getDetail();
279
+                mViewBinding.tvAddressDetails.setText(dizhi);
280
+                mViewBinding.tvName.setText(addressListData.get(0).getReal_name());
281
+                mViewBinding.tvPhone.setText(StringsUtil.encodeTel(addressListData.get(0).getPhone()));
303
             }
282
             }
304
         });
283
         });
305
         //网络问题
284
         //网络问题
306
-        orderViewModel.failed.observe(this, new Observer<String>() {
307
-            @Override
308
-            public void onChanged(String s) {
309
-                ToastUtils.showLong(s);
310
-            }
311
-        });
285
+        orderViewModel.failed.observe(this, s -> ToastUtils.showLong(s));
312
         //订单创建成功
286
         //订单创建成功
313
-        orderViewModel.orderCreateData.observe(this, new Observer<OrderCreateBean>() {
314
-            @Override
315
-            public void onChanged(OrderCreateBean orderCreateBean) {
287
+        orderViewModel.orderCreateData.observe(this, orderCreateBean -> {
316
 
288
 
317
-                LogUtil.LogInfo("groupOrder", JSON.toJSONString(orderCreateBean));
289
+            LogUtil.LogInfo("groupOrder", JSON.toJSONString(orderCreateBean));
318
 //                ToastUtils.showLong("订单创建成功");
290
 //                ToastUtils.showLong("订单创建成功");
319
-                finish();
320
-                PayActivity.launch(context, "1", JSON.toJSONString(orderCreateBean.getGroupOrder()),
321
-                        orderCreateBean.getOrder_id(), mViewBinding.tvTotalPrice.getText().toString(), 1);
322
-            }
291
+            finish();
292
+            PayActivity.launch(context, "1", JSON.toJSONString(orderCreateBean.getGroupOrder()),
293
+                    orderCreateBean.getOrder_id(), mViewBinding.tvTotalPrice.getText().toString(), 1);
323
         });
294
         });
324
 
295
 
325
     }
296
     }
@@ -345,30 +316,34 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
345
             if (StringsUtil.isEmpty(mMerId)) {
316
             if (StringsUtil.isEmpty(mMerId)) {
346
                 return;
317
                 return;
347
             }
318
             }
319
+            CreateOrderRequest createOrderRequest = new CreateOrderRequest();
320
+            createOrderRequest.setPay_type("1");
321
+            if (isChecked) {
322
+                if (!StringsUtil.isTel(account)) {
323
+                    Toast.makeText(context, "请正确输入开通账号", Toast.LENGTH_SHORT).show();
324
+                    return;
325
+                } else {
326
+                    createOrderRequest.setPay_type("6");
327
+                    createOrderRequest.setPhone(account);
328
+                }
329
+            }
330
+
348
             List<String> cartId = new ArrayList<>();
331
             List<String> cartId = new ArrayList<>();
349
             for (int i = 0; i < orderDataList.size(); i++) {
332
             for (int i = 0; i < orderDataList.size(); i++) {
350
                 for (int j = 0; j < orderDataList.get(i).getList().size(); j++) {
333
                 for (int j = 0; j < orderDataList.get(i).getList().size(); j++) {
351
                     cartId.add(orderDataList.get(i).getList().get(j).getCartId());
334
                     cartId.add(orderDataList.get(i).getList().get(j).getCartId());
352
                 }
335
                 }
353
             }
336
             }
354
-            CreateOrderRequest createOrderRequest = new CreateOrderRequest();
355
             createOrderRequest.setAddress_id(addressListData.get(0).getAddress_id());
337
             createOrderRequest.setAddress_id(addressListData.get(0).getAddress_id());
356
             createOrderRequest.setDistribution_mode("1");
338
             createOrderRequest.setDistribution_mode("1");
357
             createOrderRequest.setCart_id(cartId);
339
             createOrderRequest.setCart_id(cartId);
358
-            createOrderRequest.setPay_type("1");
340
+
359
             Map<String, Object> markMap = new HashMap<>();
341
             Map<String, Object> markMap = new HashMap<>();
360
             for (int i = 0; i < orderDataList.size(); i++) {
342
             for (int i = 0; i < orderDataList.size(); i++) {
361
                 markMap.put(orderDataList.get(i).getMerId(), orderDataList.get(i).getRemark());
343
                 markMap.put(orderDataList.get(i).getMerId(), orderDataList.get(i).getRemark());
362
 
344
 
363
             }
345
             }
364
             createOrderRequest.setMark(markMap);
346
             createOrderRequest.setMark(markMap);
365
-/*            if (flag.equals("2")) {
366
-                for (int i = 0; i < orderDataList.get(0).getDcList().size(); i++) {
367
-                    if (orderDataList.get(0).getDcList().get(i).isThe_selected()) {
368
-                        createOrderRequest.setDacang_id(orderDataList.get(0).getDcList().get(i).getId());
369
-                    }
370
-                }
371
-            }*/
372
             if (mMerId.equals("148")) {
347
             if (mMerId.equals("148")) {
373
                 createOrderRequest.setMer_id(mMerId);
348
                 createOrderRequest.setMer_id(mMerId);
374
                 createOrderRequest.setPay_type("5");
349
                 createOrderRequest.setPay_type("5");
@@ -379,6 +354,7 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
379
             }
354
             }
380
             //提交订单
355
             //提交订单
381
             orderViewModel.getCreateOrder(context, createOrderRequest, special_type, special_merchant);
356
             orderViewModel.getCreateOrder(context, createOrderRequest, special_type, special_merchant);
357
+
382
         } else if (v == mViewBinding.llNoAddress) {
358
         } else if (v == mViewBinding.llNoAddress) {
383
             MyAddressActivity.launch(context, "1");
359
             MyAddressActivity.launch(context, "1");
384
         } else if (v == mViewBinding.llAddress) {
360
         } else if (v == mViewBinding.llAddress) {
@@ -390,20 +366,6 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
390
     //接收消息
366
     //接收消息
391
     @Subscribe(threadMode = ThreadMode.MAIN)
367
     @Subscribe(threadMode = ThreadMode.MAIN)
392
     public void Event(AddressListBean.AddressList addressList) {
368
     public void Event(AddressListBean.AddressList addressList) {
393
-//        orderDataList.clear();
394
-//        CartIdRequest cartIdRequest = new CartIdRequest();
395
-//        cartIdRequest.setCart_id(mCartId);
396
-//        cartIdRequest.setAddress_id(addressListData.getAddress_id());
397
-//        orderViewModel.getCheckOrder(cartIdRequest);
398
-//
399
-//        mViewBinding.llNoAddress.setVisibility(View.GONE);
400
-//        mViewBinding.llAddress.setVisibility(View.VISIBLE);
401
-//        String dizhi = addressListData.getProvince() +
402
-//                addressListData.getCity() + addressListData.getDistrict() +
403
-//                addressListData.getDetail();
404
-//        mViewBinding.tvAddressDetails.setText(dizhi);
405
-//        mViewBinding.tvName.setText(addressListData.getReal_name());
406
-//        mViewBinding.tvPhone.setText(StringsUtil.encodeTel(addressListData.getPhone()));
407
         addressListData.get(0).setAddress_id(addressList.getAddress_id());
369
         addressListData.get(0).setAddress_id(addressList.getAddress_id());
408
         orderDataList.clear();
370
         orderDataList.clear();
409
         CartIdRequest cartIdRequest = new CartIdRequest();
371
         CartIdRequest cartIdRequest = new CartIdRequest();
@@ -424,15 +386,11 @@ public class SubmitOrderActivity extends ViewBindingTitleBaseActivity<ActivitySu
424
 
386
 
425
     @SuppressLint("ResourceAsColor")
387
     @SuppressLint("ResourceAsColor")
426
     private void showDialogs(int position) {
388
     private void showDialogs(int position) {
427
-//        StatusBarCompat.setStatusBarColor(context,R.color.black_737373);
428
         //弹窗
389
         //弹窗
429
-        remarkDialog = new RemarkDialog(this, new RemarkDialog.PriorityListener() {
430
-            @Override
431
-            public void refreshPriorityUI(String string) {
432
-                //刷新备注数据
433
-                orderDataList.get(position).setRemark(string);
434
-                orderShopAdapter.notifyDataSetChanged();
435
-            }
390
+        remarkDialog = new RemarkDialog(this, string -> {
391
+            //刷新备注数据
392
+            orderDataList.get(position).setRemark(string);
393
+            orderShopAdapter.notifyDataSetChanged();
436
         });
394
         });
437
         //显示窗口
395
         //显示窗口
438
         remarkDialog.showAtLocation(SubmitOrderActivity.this.findViewById(R.id.main), Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 0); //设置layout在PopupWindow中显示的位置
396
         remarkDialog.showAtLocation(SubmitOrderActivity.this.findViewById(R.id.main), Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, 0); //设置layout在PopupWindow中显示的位置

+ 119 - 14
app/src/main/java/com/yihucha/hbyhc/presentation/order/adapter/OrderShopAdapter.java

@@ -2,8 +2,13 @@ package com.yihucha.hbyhc.presentation.order.adapter;
2
 
2
 
3
 import android.annotation.SuppressLint;
3
 import android.annotation.SuppressLint;
4
 import android.content.Context;
4
 import android.content.Context;
5
+import android.text.Editable;
5
 import android.text.TextUtils;
6
 import android.text.TextUtils;
7
+import android.text.TextWatcher;
6
 import android.view.View;
8
 import android.view.View;
9
+import android.widget.CheckBox;
10
+import android.widget.CompoundButton;
11
+import android.widget.EditText;
7
 import android.widget.ImageView;
12
 import android.widget.ImageView;
8
 import android.widget.LinearLayout;
13
 import android.widget.LinearLayout;
9
 import android.widget.TextView;
14
 import android.widget.TextView;
@@ -13,6 +18,7 @@ import androidx.annotation.Nullable;
13
 import androidx.recyclerview.widget.LinearLayoutManager;
18
 import androidx.recyclerview.widget.LinearLayoutManager;
14
 import androidx.recyclerview.widget.RecyclerView;
19
 import androidx.recyclerview.widget.RecyclerView;
15
 
20
 
21
+import com.blankj.utilcode.util.ToastUtils;
16
 import com.chad.library.adapter.base.BaseQuickAdapter;
22
 import com.chad.library.adapter.base.BaseQuickAdapter;
17
 import com.chad.library.adapter.base.BaseViewHolder;
23
 import com.chad.library.adapter.base.BaseViewHolder;
18
 import com.yihucha.hbyhc.R;
24
 import com.yihucha.hbyhc.R;
@@ -25,11 +31,19 @@ import java.util.List;
25
 public class OrderShopAdapter extends BaseQuickAdapter<OrderCheckBean.DataDTO.OrderDTOX, BaseViewHolder> {
31
 public class OrderShopAdapter extends BaseQuickAdapter<OrderCheckBean.DataDTO.OrderDTOX, BaseViewHolder> {
26
     private Context mContext;
32
     private Context mContext;
27
     private OnClickListener mClickListener;
33
     private OnClickListener mClickListener;
34
+    private OnRedIntegralAction redIntegralAction;
28
     private String flag;
35
     private String flag;
29
     private boolean isMember;
36
     private boolean isMember;
30
     private String special_type;
37
     private String special_type;
31
     private String special_merchant;
38
     private String special_merchant;
32
 
39
 
40
+    private String productType;
41
+    private int greenIntegralIs;
42
+    private double greenIntegral;
43
+//    TODO: 2024/2/7 这里使用totalPrice感觉不对,等测试反馈
44
+    private double totalPrice;
45
+    private String identity;
46
+
33
     public OrderShopAdapter(Context context, int layoutResId, @Nullable List<OrderCheckBean.DataDTO.OrderDTOX> data,
47
     public OrderShopAdapter(Context context, int layoutResId, @Nullable List<OrderCheckBean.DataDTO.OrderDTOX> data,
34
                             String flag, String special_type, String special_merchant) {
48
                             String flag, String special_type, String special_merchant) {
35
         super(layoutResId, data);
49
         super(layoutResId, data);
@@ -39,6 +53,26 @@ public class OrderShopAdapter extends BaseQuickAdapter<OrderCheckBean.DataDTO.Or
39
         this.special_merchant = special_merchant;
53
         this.special_merchant = special_merchant;
40
     }
54
     }
41
 
55
 
56
+    public void setNotify(String productType, String greenIntegralIs,
57
+                          String identity, String greenIntegral, String totalPrice) {
58
+        this.productType = productType;
59
+        this.identity = identity;
60
+        try {
61
+            this.greenIntegralIs = Integer.parseInt(greenIntegralIs);
62
+            this.greenIntegral = Double.parseDouble(greenIntegral);
63
+            this.totalPrice = Double.parseDouble(totalPrice);
64
+        } catch (Exception e) {
65
+
66
+        }
67
+        System.out.println("productType = " + productType + ", greenIntegralIs = " + greenIntegralIs + ", identity = " + identity + ", greenIntegral = " + greenIntegral + ", totalPrice = " + totalPrice);
68
+        notifyDataSetChanged();
69
+    }
70
+
71
+    public void setDatas(List<OrderCheckBean.DataDTO.OrderDTOX> datas) {
72
+        this.mData = datas;
73
+        notifyDataSetChanged();
74
+    }
75
+
42
     public void isDcMember(boolean isMember) {
76
     public void isDcMember(boolean isMember) {
43
         this.isMember = isMember;
77
         this.isMember = isMember;
44
     }
78
     }
@@ -57,23 +91,13 @@ public class OrderShopAdapter extends BaseQuickAdapter<OrderCheckBean.DataDTO.Or
57
         OrderGoodsAdapter orderShopAdapter = new OrderGoodsAdapter(mContext, R.layout.item_order_goods, orderData.getList(), flag, orderData.getMerId(), isMember, special_type, special_merchant);
91
         OrderGoodsAdapter orderShopAdapter = new OrderGoodsAdapter(mContext, R.layout.item_order_goods, orderData.getList(), flag, orderData.getMerId(), isMember, special_type, special_merchant);
58
         //给RecyclerView设置适配器
92
         //给RecyclerView设置适配器
59
         rvGoods.setAdapter(orderShopAdapter);
93
         rvGoods.setAdapter(orderShopAdapter);
60
-        orderShopAdapter.setOnClickListener(new OrderGoodsAdapter.OnClickListener() {
61
-            @Override
62
-            public void onItemClick(int position) {
63
-                mClickListener.onItemClick(holder.getLayoutPosition(), position);
64
-            }
65
-        });
94
+        orderShopAdapter.setOnClickListener(position -> mClickListener.onItemClick(holder.getLayoutPosition(), position));
66
 
95
 
67
         TextView tvRemark = holder.getView(R.id.tv_remark);
96
         TextView tvRemark = holder.getView(R.id.tv_remark);
68
         if (!TextUtils.isEmpty(orderData.getRemark())) {
97
         if (!TextUtils.isEmpty(orderData.getRemark())) {
69
             tvRemark.setText(orderData.getRemark());
98
             tvRemark.setText(orderData.getRemark());
70
         }
99
         }
71
-        tvRemark.setOnClickListener(new View.OnClickListener() {
72
-            @Override
73
-            public void onClick(View view) {
74
-                mClickListener.onItemRemarkClick(holder.getLayoutPosition());
75
-            }
76
-        });
100
+        tvRemark.setOnClickListener(view -> mClickListener.onItemRemarkClick(holder.getLayoutPosition()));
77
         LinearLayout layoutYhq = holder.getView(R.id.layout_yhq);
101
         LinearLayout layoutYhq = holder.getView(R.id.layout_yhq);
78
         if ("148".equals(orderData.getMerId())) {
102
         if ("148".equals(orderData.getMerId())) {
79
             layoutYhq.setVisibility(View.GONE);
103
             layoutYhq.setVisibility(View.GONE);
@@ -90,6 +114,49 @@ public class OrderShopAdapter extends BaseQuickAdapter<OrderCheckBean.DataDTO.Or
90
         TextView tvSjj = holder.getView(R.id.tv_sjj);
114
         TextView tvSjj = holder.getView(R.id.tv_sjj);
91
         //TODO 不知道从哪里获取参数来赋值(绿积分数据)
115
         //TODO 不知道从哪里获取参数来赋值(绿积分数据)
92
         TextView tvHjf = holder.getView(R.id.tv_hjf);
116
         TextView tvHjf = holder.getView(R.id.tv_hjf);
117
+        LinearLayout layoutHjf = holder.getView(R.id.layout_hjf);
118
+        LinearLayout layoutHhr = holder.getView(R.id.layout_hhr);
119
+        LinearLayout layoutSjj = holder.getView(R.id.layout_sjj);
120
+        CheckBox checkBox = holder.getView(R.id.cb_red_integral);
121
+        if (greenIntegral < totalPrice) {
122
+            checkBox.setChecked(false);
123
+            checkBox.setButtonDrawable(R.mipmap.icon_unuse);
124
+            checkBox.setEnabled(false);
125
+            checkBox.setClickable(false);
126
+            tvHjf.setText("共" + greenIntegral + "个,红积分不足");
127
+        } else {
128
+            tvHjf.setText("共" + greenIntegral + "个");
129
+        }
130
+        if ("17".equals(productType)) {
131
+            layoutHjf.setVisibility(View.VISIBLE);
132
+        } else {
133
+            layoutHjf.setVisibility(View.GONE);
134
+        }
135
+        checkBox.setOnClickListener(v -> {
136
+            boolean isBoolean = checkBox.isChecked();
137
+            if (greenIntegralIs < 2 && isBoolean) {
138
+                ToastUtils.showLong("不满足使用条件");
139
+                checkBox.setChecked(false);
140
+                isBoolean = false;
141
+            } else {
142
+                if ("0".equals(identity) && isBoolean) {
143
+                    ToastUtils.showLong("需要您升级为合伙人");
144
+                    checkBox.setChecked(false);
145
+                    isBoolean = false;
146
+                }
147
+            }
148
+            if (checkBox.isChecked() && isBoolean) {
149
+                //显示填写邀请人UI,更新提示语
150
+                layoutHhr.setVisibility(View.VISIBLE);
151
+                layoutSjj.setVisibility(View.GONE);
152
+                tvHjf.setText("共" + greenIntegral + "个,本次扣除" + (int) totalPrice + "个");
153
+            } else {
154
+                //隐藏填写邀请人UI
155
+                layoutHhr.setVisibility(View.GONE);
156
+                layoutSjj.setVisibility(View.VISIBLE);
157
+                tvHjf.setText("共" + greenIntegral + "个");
158
+            }
159
+        });
93
         //绿积分使用说明
160
         //绿积分使用说明
94
         holder.getView(R.id.imgv_wh).setOnClickListener(v -> {
161
         holder.getView(R.id.imgv_wh).setOnClickListener(v -> {
95
             if (mClickListener != null) {
162
             if (mClickListener != null) {
@@ -107,10 +174,32 @@ public class OrderShopAdapter extends BaseQuickAdapter<OrderCheckBean.DataDTO.Or
107
         TextView tvYf = holder.getView(R.id.tv_yf);
174
         TextView tvYf = holder.getView(R.id.tv_yf);
108
         String postagePrice = orderData.getOrder().getPostagePrice();
175
         String postagePrice = orderData.getOrder().getPostagePrice();
109
         if (Double.parseDouble(postagePrice) > 0) {
176
         if (Double.parseDouble(postagePrice) > 0) {
110
-            tvYf.setText("¥"+Double.parseDouble(postagePrice));
177
+            tvYf.setText("¥" + Double.parseDouble(postagePrice));
111
         } else {
178
         } else {
112
             tvYf.setText("包邮");
179
             tvYf.setText("包邮");
113
         }
180
         }
181
+        checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
182
+            @Override
183
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
184
+                if (redIntegralAction != null) redIntegralAction.onCheckChanged(isChecked);
185
+            }
186
+        });
187
+        ((EditText)holder.getView(R.id.edt_ktzh)).addTextChangedListener(new TextWatcher() {
188
+            @Override
189
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
190
+
191
+            }
192
+
193
+            @Override
194
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
195
+
196
+            }
197
+
198
+            @Override
199
+            public void afterTextChanged(Editable s) {
200
+                if (redIntegralAction != null) redIntegralAction.onHhrChanged(s.toString());
201
+            }
202
+        });
114
     }
203
     }
115
 
204
 
116
     //点击回调
205
     //点击回调
@@ -124,12 +213,28 @@ public class OrderShopAdapter extends BaseQuickAdapter<OrderCheckBean.DataDTO.Or
124
         //选择大仓
213
         //选择大仓
125
         void onItemlChooseABigWarehouseClick(int position);
214
         void onItemlChooseABigWarehouseClick(int position);
126
 
215
 
127
-        default void onWenHaoClick(){
216
+        default void onWenHaoClick() {
128
 
217
 
129
         }
218
         }
130
     }
219
     }
131
 
220
 
221
+    public interface OnRedIntegralAction {
222
+        /**
223
+         * @param isChecked 是否选中红积分
224
+         */
225
+        void onCheckChanged(boolean isChecked);
226
+
227
+        /**
228
+         * @param account 合伙人账号
229
+         */
230
+        void onHhrChanged(String account);
231
+    }
232
+
132
     public void setOnClickListener(OnClickListener listener) {
233
     public void setOnClickListener(OnClickListener listener) {
133
         mClickListener = listener;
234
         mClickListener = listener;
134
     }
235
     }
236
+
237
+    public void setOnClickListener(OnRedIntegralAction listener) {
238
+        redIntegralAction = listener;
239
+    }
135
 }
240
 }

+ 9 - 0
app/src/main/java/com/yihucha/hbyhc/presentation/order/model/OrderCheckBean.java

@@ -55,9 +55,18 @@ public class OrderCheckBean {
55
         private String status;
55
         private String status;
56
         @JsonProperty("is_dacang_vip_product")
56
         @JsonProperty("is_dacang_vip_product")
57
         private Integer isDacangVipProduct;
57
         private Integer isDacangVipProduct;
58
+        private String product_type;
58
         @JsonProperty("order")
59
         @JsonProperty("order")
59
         private List<OrderDTOX> order;
60
         private List<OrderDTOX> order;
60
 
61
 
62
+        public String getProduct_type() {
63
+            return product_type;
64
+        }
65
+
66
+        public void setProduct_type(String product_type) {
67
+            this.product_type = product_type;
68
+        }
69
+
61
         public String getYouHuiPrice() {
70
         public String getYouHuiPrice() {
62
             return youHuiPrice;
71
             return youHuiPrice;
63
         }
72
         }

+ 2 - 1
app/src/main/java/com/yihucha/hbyhc/presentation/order/view_model/OrderViewModel.java

@@ -163,7 +163,8 @@ public class OrderViewModel extends BaseViewModel {
163
      * @param createOrderRequest
163
      * @param createOrderRequest
164
      */
164
      */
165
     @SuppressLint("CheckResult")
165
     @SuppressLint("CheckResult")
166
-    public void getCreateOrder(Context context, CreateOrderRequest createOrderRequest, String special_type, String special_merchant) {
166
+    public void getCreateOrder(Context context, CreateOrderRequest createOrderRequest, String special_type,
167
+                               String special_merchant) {
167
         ShowLoadingDialog.showLoadingDialog(context);
168
         ShowLoadingDialog.showLoadingDialog(context);
168
         if (createOrderRequest.getMer_id().equals("148")) {
169
         if (createOrderRequest.getMer_id().equals("148")) {
169
             //积分兑换
170
             //积分兑换

+ 8 - 8
app/src/main/java/com/yihucha/hbyhc/view/PopAnnuitySelector.java

@@ -67,14 +67,14 @@ public class PopAnnuitySelector extends PopupWindow implements View.OnClickListe
67
     }
67
     }
68
 
68
 
69
     private void initView() {
69
     private void initView() {
70
-        sourceBeans.add(new SelectorBean("全部", null, true));
70
+        sourceBeans.add(new SelectorBean("全部", "-1", true));
71
         sourceBeans.add(new SelectorBean("线上订单", "0", false));
71
         sourceBeans.add(new SelectorBean("线上订单", "0", false));
72
         sourceBeans.add(new SelectorBean("线下实体订单", "1", false));
72
         sourceBeans.add(new SelectorBean("线下实体订单", "1", false));
73
 
73
 
74
-        statusBeans.add(new SelectorBean("全部状态", null, true));
75
-        statusBeans.add(new SelectorBean("已结算", "0", false));
76
-        statusBeans.add(new SelectorBean("未结算", "1", false));
77
-        statusBeans.add(new SelectorBean("已取消", "2", false));
74
+        statusBeans.add(new SelectorBean("全部状态", "1", true));
75
+        statusBeans.add(new SelectorBean("已结算", "2", false));
76
+        statusBeans.add(new SelectorBean("未结算", "3", false));
77
+        statusBeans.add(new SelectorBean("已取消", "4", false));
78
 
78
 
79
         GridLayoutManager sourceManager = new GridLayoutManager(context, 3);
79
         GridLayoutManager sourceManager = new GridLayoutManager(context, 3);
80
         GridLayoutManager statusManager = new GridLayoutManager(context, 3);
80
         GridLayoutManager statusManager = new GridLayoutManager(context, 3);
@@ -111,10 +111,10 @@ public class PopAnnuitySelector extends PopupWindow implements View.OnClickListe
111
             sourcePos = sourcePosL;
111
             sourcePos = sourcePosL;
112
             statusPos = statusPosL;
112
             statusPos = statusPosL;
113
             if (EmptyCheckUtils.isNotEmpty(onSelectListener)) {
113
             if (EmptyCheckUtils.isNotEmpty(onSelectListener)) {
114
-                onSelectListener.onSelect(sourcePos, statusPos);
114
+                onSelectListener.onSelect(sourceBeans.get(sourcePos).getKey(), statusBeans.get(statusPos).getKey());
115
             }
115
             }
116
             dismiss();
116
             dismiss();
117
-        } else if (view == binding.viewBg){
117
+        } else if (view == binding.viewBg) {
118
             dismiss();
118
             dismiss();
119
         }
119
         }
120
     }
120
     }
@@ -126,6 +126,6 @@ public class PopAnnuitySelector extends PopupWindow implements View.OnClickListe
126
     }
126
     }
127
 
127
 
128
     public interface OnSelectListener {
128
     public interface OnSelectListener {
129
-        void onSelect(int sourcePos, int statusPos);
129
+        void onSelect(String sourcePos, String statusPos);
130
     }
130
     }
131
 }
131
 }

+ 0 - 1
app/src/main/java/com/yihucha/hbyhc/view/UserInvitationCodeDialog.java

@@ -69,7 +69,6 @@ public class UserInvitationCodeDialog extends PopupWindow {
69
         this.setFocusable(true);
69
         this.setFocusable(true);
70
         //设置SelectPicPopupWindow弹出窗体动画效果
70
         //设置SelectPicPopupWindow弹出窗体动画效果
71
 //        this.setAnimationStyle(R.style.InputDialogStyle);
71
 //        this.setAnimationStyle(R.style.InputDialogStyle);
72
-        //todo:全屏
73
 
72
 
74
         //实例化一个ColorDrawable颜色为半透明
73
         //实例化一个ColorDrawable颜色为半透明
75
         ColorDrawable dw = new ColorDrawable(0x00000000);
74
         ColorDrawable dw = new ColorDrawable(0x00000000);

+ 5 - 0
app/src/main/res/drawable/slector_red_integral.xml

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
3
+    <item android:drawable="@mipmap/icon_checked" android:state_checked="true" />
4
+    <item android:drawable="@mipmap/icon_uncheck" android:state_checked="false" />
5
+</selector>

+ 199 - 0
app/src/main/res/layout/activity_fans_detail.xml

@@ -0,0 +1,199 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+    xmlns:app="http://schemas.android.com/apk/res-auto"
4
+    xmlns:tools="http://schemas.android.com/tools"
5
+    android:layout_width="match_parent"
6
+    android:layout_height="match_parent"
7
+    android:background="@color/white_f8f8f8"
8
+    android:orientation="vertical"
9
+    tools:context=".presentation.mine.FansDetailActivity">
10
+    <LinearLayout
11
+        android:layout_width="match_parent"
12
+        android:layout_height="wrap_content"
13
+        android:background="@color/white"
14
+        android:orientation="horizontal"
15
+        android:paddingLeft="16dp"
16
+        android:paddingTop="8dp"
17
+        android:paddingRight="16dp"
18
+        android:paddingBottom="8dp">
19
+
20
+        <TextView
21
+            android:layout_width="wrap_content"
22
+            android:layout_height="wrap_content"
23
+            android:layout_weight="1"
24
+            android:text="昵称"
25
+            android:textColor="@color/black_333333"
26
+            android:textSize="14sp" />
27
+
28
+        <TextView
29
+            android:id="@+id/tv_nickname"
30
+            android:layout_width="wrap_content"
31
+            android:layout_height="wrap_content"
32
+            android:text=""
33
+            android:textColor="@color/black_333333"
34
+            android:textSize="14sp" />
35
+    </LinearLayout>
36
+    <LinearLayout
37
+        android:layout_width="match_parent"
38
+        android:layout_height="wrap_content"
39
+        android:background="@color/white"
40
+        android:orientation="horizontal"
41
+        android:paddingLeft="16dp"
42
+        android:paddingTop="8dp"
43
+        android:paddingRight="16dp"
44
+        android:paddingBottom="8dp">
45
+
46
+        <TextView
47
+            android:layout_width="wrap_content"
48
+            android:layout_height="wrap_content"
49
+            android:layout_weight="1"
50
+            android:text="账号"
51
+            android:textColor="@color/black_333333"
52
+            android:textSize="14sp" />
53
+
54
+        <TextView
55
+            android:id="@+id/tv_account"
56
+            android:layout_width="wrap_content"
57
+            android:layout_height="wrap_content"
58
+            android:text=""
59
+            android:textColor="@color/black_333333"
60
+            android:textSize="14sp" />
61
+    </LinearLayout>
62
+
63
+    <LinearLayout
64
+        android:layout_width="match_parent"
65
+        android:layout_height="wrap_content"
66
+        android:background="@color/white"
67
+        android:orientation="horizontal"
68
+        android:paddingLeft="16dp"
69
+        android:paddingTop="8dp"
70
+        android:paddingRight="16dp"
71
+        android:paddingBottom="8dp">
72
+
73
+        <TextView
74
+            android:layout_width="wrap_content"
75
+            android:layout_height="wrap_content"
76
+            android:layout_weight="1"
77
+            android:text="当前身份"
78
+            android:textColor="@color/black_333333"
79
+            android:textSize="14sp" />
80
+
81
+        <TextView
82
+            android:id="@+id/tv_identify"
83
+            android:layout_width="wrap_content"
84
+            android:layout_height="wrap_content"
85
+            android:text=""
86
+            android:textColor="@color/black_333333"
87
+            android:textSize="14sp" />
88
+    </LinearLayout>
89
+
90
+    <LinearLayout
91
+        android:layout_width="match_parent"
92
+        android:layout_height="wrap_content"
93
+        android:background="@color/white"
94
+        android:orientation="horizontal"
95
+        android:paddingLeft="16dp"
96
+        android:paddingTop="8dp"
97
+        android:paddingRight="16dp"
98
+        android:paddingBottom="8dp">
99
+
100
+        <TextView
101
+            android:layout_width="wrap_content"
102
+            android:layout_height="wrap_content"
103
+            android:layout_weight="1"
104
+            android:text="累计自购预估养老金"
105
+            android:textColor="@color/black_333333"
106
+            android:textSize="14sp" />
107
+
108
+        <TextView
109
+            android:id="@+id/tv_yanglaojin"
110
+            android:layout_width="wrap_content"
111
+            android:layout_height="wrap_content"
112
+            android:text=""
113
+            android:textColor="@color/black_333333"
114
+            android:textSize="14sp" />
115
+    </LinearLayout>
116
+
117
+    <LinearLayout
118
+        android:layout_width="match_parent"
119
+        android:layout_height="wrap_content"
120
+        android:background="@color/white"
121
+        android:orientation="horizontal"
122
+        android:paddingLeft="16dp"
123
+        android:paddingTop="8dp"
124
+        android:paddingRight="16dp"
125
+        android:paddingBottom="8dp">
126
+
127
+        <TextView
128
+            android:layout_width="wrap_content"
129
+            android:layout_height="wrap_content"
130
+            android:layout_weight="1"
131
+            android:text="注册时间"
132
+            android:textColor="@color/black_333333"
133
+            android:textSize="14sp" />
134
+
135
+        <TextView
136
+            android:id="@+id/tv_regist_time"
137
+            android:layout_width="wrap_content"
138
+            android:layout_height="wrap_content"
139
+            android:text=""
140
+            android:textColor="@color/black_333333"
141
+            android:textSize="14sp" />
142
+    </LinearLayout>
143
+
144
+    <LinearLayout
145
+        android:layout_width="match_parent"
146
+        android:layout_height="wrap_content"
147
+        android:background="@color/white"
148
+        android:orientation="horizontal"
149
+        android:paddingLeft="16dp"
150
+        android:paddingTop="8dp"
151
+        android:paddingRight="16dp"
152
+        android:paddingBottom="8dp">
153
+
154
+        <TextView
155
+            android:layout_width="wrap_content"
156
+            android:layout_height="wrap_content"
157
+            android:layout_weight="1"
158
+            android:text="邀请人"
159
+            android:textColor="@color/black_333333"
160
+            android:textSize="14sp" />
161
+
162
+        <TextView
163
+            android:id="@+id/tv_invitate_name"
164
+            android:layout_width="wrap_content"
165
+            android:layout_height="wrap_content"
166
+            android:text=""
167
+            android:textColor="@color/black_333333"
168
+            android:textSize="14sp" />
169
+    </LinearLayout>
170
+
171
+    <LinearLayout
172
+        android:layout_width="match_parent"
173
+        android:layout_height="wrap_content"
174
+        android:background="@color/white"
175
+        android:orientation="horizontal"
176
+        android:paddingLeft="16dp"
177
+        android:paddingTop="8dp"
178
+        android:paddingRight="16dp"
179
+        android:paddingBottom="8dp">
180
+
181
+        <TextView
182
+            android:layout_width="wrap_content"
183
+            android:layout_height="wrap_content"
184
+            android:layout_weight="1"
185
+            android:text="邀请人账号"
186
+            android:textColor="@color/black_333333"
187
+            android:textSize="14sp" />
188
+
189
+        <TextView
190
+            android:id="@+id/tv_invitated_account"
191
+            android:layout_width="wrap_content"
192
+            android:layout_height="wrap_content"
193
+            android:text=""
194
+            android:textColor="@color/black_333333"
195
+            android:textSize="14sp" />
196
+    </LinearLayout>
197
+
198
+
199
+</LinearLayout>

+ 1 - 1
app/src/main/res/layout/activity_my_commission.xml

@@ -27,7 +27,7 @@
27
         android:id="@+id/imgv_head_commission"
27
         android:id="@+id/imgv_head_commission"
28
         android:layout_width="43dp"
28
         android:layout_width="43dp"
29
         android:layout_height="43dp"
29
         android:layout_height="43dp"
30
-        android:layout_marginLeft="28dp"
30
+        android:layout_marginLeft="25dp"
31
         android:layout_marginTop="5dp"
31
         android:layout_marginTop="5dp"
32
         android:src="@mipmap/ic_launcher"
32
         android:src="@mipmap/ic_launcher"
33
         app:layout_constraintLeft_toLeftOf="@+id/view_bg2"
33
         app:layout_constraintLeft_toLeftOf="@+id/view_bg2"

+ 19 - 8
app/src/main/res/layout/activity_my_team.xml

@@ -84,46 +84,50 @@
84
 
84
 
85
     <TextView
85
     <TextView
86
         android:id="@+id/tv_fans_zhishu_title"
86
         android:id="@+id/tv_fans_zhishu_title"
87
-        android:layout_width="wrap_content"
87
+        android:layout_width="0dp"
88
         android:layout_height="wrap_content"
88
         android:layout_height="wrap_content"
89
         android:layout_marginTop="8dp"
89
         android:layout_marginTop="8dp"
90
         android:text="直属粉丝"
90
         android:text="直属粉丝"
91
         android:textColor="@color/white"
91
         android:textColor="@color/white"
92
         android:textSize="13sp"
92
         android:textSize="13sp"
93
+        android:gravity="center_horizontal"
93
         app:layout_constraintLeft_toLeftOf="@+id/view_bg_bottom"
94
         app:layout_constraintLeft_toLeftOf="@+id/view_bg_bottom"
94
         app:layout_constraintRight_toLeftOf="@+id/tv_fans_youxiao_title"
95
         app:layout_constraintRight_toLeftOf="@+id/tv_fans_youxiao_title"
95
         app:layout_constraintTop_toTopOf="@+id/view_bg_bottom" />
96
         app:layout_constraintTop_toTopOf="@+id/view_bg_bottom" />
96
 
97
 
97
     <TextView
98
     <TextView
98
         android:id="@+id/tv_fans_youxiao_title"
99
         android:id="@+id/tv_fans_youxiao_title"
99
-        android:layout_width="wrap_content"
100
+        android:layout_width="0dp"
100
         android:layout_height="wrap_content"
101
         android:layout_height="wrap_content"
101
         android:text="有效粉丝"
102
         android:text="有效粉丝"
102
         android:textColor="@color/white"
103
         android:textColor="@color/white"
103
         android:textSize="13sp"
104
         android:textSize="13sp"
105
+        android:gravity="center_horizontal"
104
         app:layout_constraintLeft_toRightOf="@+id/tv_fans_zhishu_title"
106
         app:layout_constraintLeft_toRightOf="@+id/tv_fans_zhishu_title"
105
         app:layout_constraintRight_toRightOf="@+id/view_bg_bottom"
107
         app:layout_constraintRight_toRightOf="@+id/view_bg_bottom"
106
         app:layout_constraintTop_toTopOf="@+id/tv_fans_zhishu_title" />
108
         app:layout_constraintTop_toTopOf="@+id/tv_fans_zhishu_title" />
107
 
109
 
108
     <TextView
110
     <TextView
109
         android:id="@+id/tv_fans_zhishu"
111
         android:id="@+id/tv_fans_zhishu"
110
-        android:layout_width="wrap_content"
112
+        android:layout_width="0dp"
111
         android:layout_height="wrap_content"
113
         android:layout_height="wrap_content"
112
         android:layout_marginBottom="8dp"
114
         android:layout_marginBottom="8dp"
113
         android:text="3432"
115
         android:text="3432"
114
         android:textColor="@color/white"
116
         android:textColor="@color/white"
115
         android:textSize="13sp"
117
         android:textSize="13sp"
118
+        android:gravity="center_horizontal"
116
         app:layout_constraintBottom_toBottomOf="@+id/view_bg_bottom"
119
         app:layout_constraintBottom_toBottomOf="@+id/view_bg_bottom"
117
         app:layout_constraintLeft_toLeftOf="@+id/view_bg_bottom"
120
         app:layout_constraintLeft_toLeftOf="@+id/view_bg_bottom"
118
         app:layout_constraintRight_toLeftOf="@+id/tv_fans_youxiao" />
121
         app:layout_constraintRight_toLeftOf="@+id/tv_fans_youxiao" />
119
 
122
 
120
     <TextView
123
     <TextView
121
         android:id="@+id/tv_fans_youxiao"
124
         android:id="@+id/tv_fans_youxiao"
122
-        android:layout_width="wrap_content"
125
+        android:layout_width="0dp"
123
         android:layout_height="wrap_content"
126
         android:layout_height="wrap_content"
124
         android:text="2344"
127
         android:text="2344"
125
         android:textColor="@color/white"
128
         android:textColor="@color/white"
126
         android:textSize="13sp"
129
         android:textSize="13sp"
130
+        android:gravity="center_horizontal"
127
         app:layout_constraintLeft_toRightOf="@+id/tv_fans_zhishu"
131
         app:layout_constraintLeft_toRightOf="@+id/tv_fans_zhishu"
128
         app:layout_constraintRight_toRightOf="@+id/view_bg_bottom"
132
         app:layout_constraintRight_toRightOf="@+id/view_bg_bottom"
129
         app:layout_constraintTop_toTopOf="@+id/tv_fans_zhishu" />
133
         app:layout_constraintTop_toTopOf="@+id/tv_fans_zhishu" />
@@ -153,13 +157,20 @@
153
         android:textSize="15sp"
157
         android:textSize="15sp"
154
         app:layout_constraintTop_toBottomOf="@+id/imgv_team_bg" />
158
         app:layout_constraintTop_toBottomOf="@+id/imgv_team_bg" />
155
 
159
 
156
-    <androidx.recyclerview.widget.RecyclerView
157
-        android:id="@+id/rv_team_list"
160
+    <com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout
161
+        android:id="@+id/refresh_layout"
158
         android:layout_width="match_parent"
162
         android:layout_width="match_parent"
159
         android:layout_height="0dp"
163
         android:layout_height="0dp"
160
         android:background="@color/white"
164
         android:background="@color/white"
161
         app:layout_constraintBottom_toBottomOf="parent"
165
         app:layout_constraintBottom_toBottomOf="parent"
162
-        app:layout_constraintTop_toBottomOf="@+id/tv_team_list_title" />
166
+        app:layout_constraintTop_toBottomOf="@+id/tv_team_list_title">
167
+
168
+        <androidx.recyclerview.widget.RecyclerView
169
+            android:id="@+id/rv_team_list"
170
+            android:layout_width="match_parent"
171
+            android:layout_height="match_parent" />
172
+    </com.lcodecore.tkrefreshlayout.TwinklingRefreshLayout>
173
+
163
 
174
 
164
     <include
175
     <include
165
         android:id="@+id/ll_no_search"
176
         android:id="@+id/ll_no_search"
@@ -169,5 +180,5 @@
169
         android:visibility="gone"
180
         android:visibility="gone"
170
         app:layout_constraintLeft_toLeftOf="parent"
181
         app:layout_constraintLeft_toLeftOf="parent"
171
         app:layout_constraintRight_toRightOf="parent"
182
         app:layout_constraintRight_toRightOf="parent"
172
-        app:layout_constraintTop_toTopOf="@id/rv_team_list" />
183
+        app:layout_constraintTop_toTopOf="@id/refresh_layout" />
173
 </androidx.constraintlayout.widget.ConstraintLayout>
184
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 9 - 13
app/src/main/res/layout/activity_ti_xian_record.xml

@@ -1,21 +1,17 @@
1
 <?xml version="1.0" encoding="utf-8"?>
1
 <?xml version="1.0" encoding="utf-8"?>
2
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
2
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
     xmlns:app="http://schemas.android.com/apk/res-auto"
3
     xmlns:app="http://schemas.android.com/apk/res-auto"
4
     xmlns:tools="http://schemas.android.com/tools"
4
     xmlns:tools="http://schemas.android.com/tools"
5
     android:layout_width="match_parent"
5
     android:layout_width="match_parent"
6
     android:layout_height="match_parent"
6
     android:layout_height="match_parent"
7
     android:background="@color/white_f8f8f8"
7
     android:background="@color/white_f8f8f8"
8
     tools:context=".presentation.mine.TiXianRecordActivity">
8
     tools:context=".presentation.mine.TiXianRecordActivity">
9
-    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
9
+    <ListView
10
+        android:id="@+id/rv_tixian_records"
10
         android:layout_width="match_parent"
11
         android:layout_width="match_parent"
11
-        android:layout_height="match_parent"
12
-        >
13
-        <ListView
14
-            android:id="@+id/rv_tixian_records"
15
-            android:layout_width="match_parent"
16
-            android:layout_height="wrap_content"
17
-            android:layout_marginLeft="16dp"
18
-            android:layout_marginRight="16dp"
19
-            />
20
-    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
21
-</androidx.constraintlayout.widget.ConstraintLayout>
12
+        android:layout_height="wrap_content"
13
+        android:layout_marginLeft="16dp"
14
+        android:layout_marginRight="16dp"
15
+        android:scrollbars="none"
16
+        />
17
+</FrameLayout>

+ 43 - 2
app/src/main/res/layout/item_order_shop.xml

@@ -241,14 +241,55 @@
241
                     android:textColor="@color/gray_999999"
241
                     android:textColor="@color/gray_999999"
242
                     android:textSize="14sp" />
242
                     android:textSize="14sp" />
243
 
243
 
244
-                <ImageView
244
+                <CheckBox
245
+                    android:id="@+id/cb_red_integral"
245
                     android:layout_width="wrap_content"
246
                     android:layout_width="wrap_content"
246
                     android:layout_height="wrap_content"
247
                     android:layout_height="wrap_content"
247
                     android:layout_marginLeft="4dp"
248
                     android:layout_marginLeft="4dp"
248
-                    android:src="@mipmap/icon_jh"
249
+                    android:background="@null"
249
                     android:layout_gravity="center_vertical"
250
                     android:layout_gravity="center_vertical"
251
+                    android:button="@drawable/slector_red_integral"
252
+                    android:checked="false"
250
                     />
253
                     />
251
             </LinearLayout>
254
             </LinearLayout>
255
+
256
+            <LinearLayout
257
+                android:id="@+id/layout_hhr"
258
+                android:layout_width="match_parent"
259
+                android:layout_height="wrap_content"
260
+                android:layout_marginTop="25dp"
261
+                android:visibility="gone"
262
+                android:orientation="horizontal">
263
+
264
+                <TextView
265
+                    android:layout_width="wrap_content"
266
+                    android:layout_height="wrap_content"
267
+                    android:text="开通账号"
268
+                    android:textColor="@color/black_333333"
269
+                    android:textSize="14sp" />
270
+                <TextView
271
+                    android:layout_width="wrap_content"
272
+                    android:layout_height="wrap_content"
273
+                    android:text="*"
274
+                    android:textColor="@color/red_fe0032"
275
+                    />
276
+                <View
277
+                    android:layout_width="0dp"
278
+                    android:layout_height="1dp"
279
+                    android:layout_weight="1"
280
+                    />
281
+                <EditText
282
+                    android:id="@+id/edt_ktzh"
283
+                    android:layout_width="wrap_content"
284
+                    android:layout_height="wrap_content"
285
+                    android:hint="请输入需要开通合伙人的手机号"
286
+                    android:textColor="@color/gray_999999"
287
+                    android:textSize="14sp"
288
+                    android:background="@null"
289
+                    />
290
+
291
+            </LinearLayout>
292
+
252
             <LinearLayout
293
             <LinearLayout
253
                 android:layout_width="match_parent"
294
                 android:layout_width="match_parent"
254
                 android:layout_height="wrap_content"
295
                 android:layout_height="wrap_content"

+ 94 - 0
app/src/main/res/layout/item_team_list.xml

@@ -0,0 +1,94 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+    android:layout_width="match_parent"
4
+    android:layout_height="80dp"
5
+    android:id="@+id/item_layout"
6
+    android:paddingLeft="16dp"
7
+    android:paddingTop="8dp"
8
+    android:paddingRight="16dp">
9
+
10
+    <com.yihucha.hbyhc.view.ClipPathCircleImage
11
+        android:id="@+id/imgv_head"
12
+        android:layout_width="50dp"
13
+        android:layout_height="50dp"
14
+        android:src="@mipmap/ic_launcher" />
15
+
16
+    <TextView
17
+        android:id="@+id/tv_name"
18
+        android:layout_width="wrap_content"
19
+        android:layout_height="wrap_content"
20
+        android:layout_marginLeft="13dp"
21
+        android:layout_toRightOf="@+id/imgv_head"
22
+        android:text="放羊的星星"
23
+        android:textColor="@color/black_333333"
24
+        android:textSize="14sp" />
25
+    <LinearLayout
26
+        android:id="@+id/layout_member"
27
+        android:layout_width="wrap_content"
28
+        android:layout_height="wrap_content"
29
+        android:orientation="horizontal"
30
+        android:layout_alignTop="@+id/tv_name"
31
+        android:layout_alignBottom="@+id/tv_name"
32
+        android:layout_marginLeft="5dp"
33
+        android:layout_toRightOf="@+id/tv_name">
34
+
35
+        <ImageView
36
+            android:id="@+id/imgv_identity"
37
+            android:layout_width="wrap_content"
38
+            android:layout_height="wrap_content"
39
+            android:layout_marginLeft="3dp"
40
+            android:visibility="visible" />
41
+
42
+        <ImageView
43
+            android:id="@+id/iv_member_daili"
44
+            android:layout_width="wrap_content"
45
+            android:layout_height="wrap_content"
46
+            android:layout_marginLeft="3dp"
47
+            android:visibility="gone" />
48
+
49
+        <ImageView
50
+            android:id="@+id/iv_member_lhcsr"
51
+            android:layout_width="wrap_content"
52
+            android:layout_height="wrap_content"
53
+            android:visibility="gone" />
54
+    </LinearLayout>
55
+
56
+    <TextView
57
+        android:id="@+id/tv_phone"
58
+        android:layout_width="wrap_content"
59
+        android:layout_height="wrap_content"
60
+        android:layout_below="@+id/tv_name"
61
+        android:layout_alignLeft="@+id/tv_name"
62
+        android:text="手机号:188****3333"
63
+        android:textColor="@color/gray_666666"
64
+        android:textSize="11sp" />
65
+
66
+    <TextView
67
+        android:id="@+id/tv_date"
68
+        android:layout_width="wrap_content"
69
+        android:layout_height="wrap_content"
70
+        android:layout_below="@+id/tv_phone"
71
+        android:layout_alignLeft="@+id/tv_name"
72
+        android:layout_alignBottom="@+id/imgv_head"
73
+        android:text="2023-12-12 16:22:22"
74
+        android:textColor="@color/gray_666666"
75
+        android:textSize="11sp" />
76
+
77
+    <ImageView
78
+        android:layout_width="wrap_content"
79
+        android:layout_height="wrap_content"
80
+        android:layout_alignTop="@id/imgv_head"
81
+        android:layout_alignBottom="@+id/imgv_head"
82
+        android:layout_alignParentRight="true"
83
+        android:src="@mipmap/goin_220619" />
84
+
85
+
86
+    <View
87
+        android:id="@+id/view_line"
88
+        android:layout_width="match_parent"
89
+        android:layout_height="1dp"
90
+        android:layout_alignParentBottom="true"
91
+        android:layout_marginBottom="8dp"
92
+        android:layout_toRightOf="@+id/imgv_head"
93
+        android:background="@color/gray_e5e5e5" />
94
+</RelativeLayout>

+ 18 - 4
app/src/main/res/layout/item_tixian_records.xml

@@ -3,7 +3,10 @@
3
     android:layout_width="match_parent"
3
     android:layout_width="match_parent"
4
     android:layout_height="80dp"
4
     android:layout_height="80dp"
5
     xmlns:app="http://schemas.android.com/apk/res-auto"
5
     xmlns:app="http://schemas.android.com/apk/res-auto"
6
-    android:background="@color/white">
6
+    android:background="@color/white"
7
+    android:paddingLeft="16dp"
8
+    android:paddingRight="16dp"
9
+    >
7
     <TextView
10
     <TextView
8
         android:id="@+id/tv_name"
11
         android:id="@+id/tv_name"
9
         android:layout_width="wrap_content"
12
         android:layout_width="wrap_content"
@@ -26,7 +29,7 @@
26
         android:text="2023-08-26 18:30:30"
29
         android:text="2023-08-26 18:30:30"
27
         android:textSize="12sp"
30
         android:textSize="12sp"
28
         android:textColor="@color/gray_999999"
31
         android:textColor="@color/gray_999999"
29
-        android:layout_marginTop="5dp"
32
+        android:layout_marginTop="8dp"
30
         />
33
         />
31
     <TextView
34
     <TextView
32
         android:id="@+id/tv_money"
35
         android:id="@+id/tv_money"
@@ -34,10 +37,21 @@
34
         android:layout_height="wrap_content"
37
         android:layout_height="wrap_content"
35
         app:layout_constraintTop_toTopOf="@+id/tv_name"
38
         app:layout_constraintTop_toTopOf="@+id/tv_name"
36
         app:layout_constraintBottom_toBottomOf="@+id/tv_name"
39
         app:layout_constraintBottom_toBottomOf="@+id/tv_name"
37
-        app:layout_constraintRight_toRightOf="parent"
40
+        app:layout_constraintRight_toLeftOf="@+id/imgv_jiantou"
38
         android:text="$200.00"
41
         android:text="$200.00"
39
         android:textSize="15sp"
42
         android:textSize="15sp"
40
         android:textColor="@color/black_333333"
43
         android:textColor="@color/black_333333"
44
+        android:layout_marginRight="5dp"
45
+        />
46
+    <ImageView
47
+        android:id="@+id/imgv_jiantou"
48
+        android:layout_width="wrap_content"
49
+        android:layout_height="wrap_content"
50
+        android:src="@mipmap/goin_220619"
51
+        app:layout_constraintRight_toRightOf="parent"
52
+        app:layout_constraintTop_toTopOf="@+id/tv_name"
53
+        app:layout_constraintBottom_toBottomOf="@+id/tv_name"
54
+        android:scaleType="centerInside"
41
         />
55
         />
42
     <TextView
56
     <TextView
43
         android:id="@+id/tv_status"
57
         android:id="@+id/tv_status"
@@ -47,7 +61,7 @@
47
         app:layout_constraintBottom_toBottomOf="@+id/tv_time"
61
         app:layout_constraintBottom_toBottomOf="@+id/tv_time"
48
         app:layout_constraintRight_toRightOf="parent"
62
         app:layout_constraintRight_toRightOf="parent"
49
         android:text="提现中"
63
         android:text="提现中"
50
-        android:textSize="15sp"
64
+        android:textSize="12sp"
51
         android:textColor="@color/black_333333"
65
         android:textColor="@color/black_333333"
52
         />
66
         />
53
 
67
 

BIN=BIN
app/src/main/res/mipmap-xxxhdpi/icon_checked.png


BIN=BIN
app/src/main/res/mipmap-xxxhdpi/icon_uncheck.png


BIN=BIN
app/src/main/res/mipmap-xxxhdpi/icon_unuse.png


+ 1 - 0
app/src/main/res/values/colors.xml

@@ -17,6 +17,7 @@
17
     <color name="black_737373">#737373</color>
17
     <color name="black_737373">#737373</color>
18
     <color name="white">#FFFFFFFF</color>
18
     <color name="white">#FFFFFFFF</color>
19
     <color name="white_f8f8f8">#F8F8F8</color>
19
     <color name="white_f8f8f8">#F8F8F8</color>
20
+    <color name="org_f88726">#f88726</color>
20
 
21
 
21
     <color name="translate">#00000000</color>
22
     <color name="translate">#00000000</color>
22
 
23
 

+ 1 - 1
easyPhotos/src/main/java/com/huantansheng/easyphotos/utils/file/FileUtils.java

@@ -39,7 +39,7 @@ public class FileUtils {
39
     static final String TAG = "FileUtils";
39
     static final String TAG = "FileUtils";
40
     private static final boolean DEBUG = false; // Set to true to enable logging
40
     private static final boolean DEBUG = false; // Set to true to enable logging
41
     /**
41
     /**
42
-     * File and folder comparator. TODO Expose sorting option method
42
+     * File and folder comparator.
43
      */
43
      */
44
 
44
 
45
     /**
45
     /**