CosPlyaPlayerServiceImpl.java
41.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
package com.pipi.qa.service.impl;
import java.util.HashMap;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fangdd.qa.framework.tools.HttpToolKit;
import com.pipi.basic.BasicData;
import com.pipi.basic.ConfigReader;
import com.pipi.qa.service.CosPlayPlayerService;
/**
* Created by dennis.dong on 2021/05/18.
*/
@Service
public class CosPlyaPlayerServiceImpl implements CosPlayPlayerService {
public static Map<String, Object> headers = new HashMap<String, Object>();
public static String cardUrl = "https://test-game-play.oss-cn-hangzhou.aliyuncs.com/temp/2021/4/17/991a50cab9594ce9b7827744f8286b09.jpg";
public static String cardHandUrl = "https://test-game-play.oss-cn-hangzhou.aliyuncs.com/temp/2021/4/17/66ed341c47764ff1b12c834eda023956.jpg";
public static String emblemUrl = "https://test-game-play.oss-cn-hangzhou.aliyuncs.com/temp/2021/4/17/66ed341c47764ff1b12c834eda023956.jpg";
public static String pngURL = "http://test-game-play.oss-cn-hangzhou.aliyuncs.com/temp/2020/11/11/c343b09eccfe4f14b56f33b2f42041d2.jpg";
public static String adminToken = null;
public static String userMobileToken = null;
public static String playMobileToken = null;
public static String env = ConfigReader.env;
/**
* 登录
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject login(String mobile) {
String loginUrl = "https://"+env+"-api-app.apeiwan.com/"+"login";
String smsUrl = "https://"+env+"-api-app.apeiwan.com/"+"sms/verify";
Map<String, Object> params = new HashMap();
Map<String, Object> SmsParams = new HashMap();
SmsParams.put("mobile", mobile);
//获取验证码
HttpToolKit.invokePost(smsUrl, null, SmsParams);
params.put("mobile", mobile);
params.put("code", 2222);
//登录
JSONObject jsonObj = HttpToolKit.invokePost(loginUrl, null, params).getJSONObject();
return jsonObj;
}
/**
* 获取userMobileToken
* @param env
* @param userMobileToken
* @return
*/
@Override
public String getUserMobileToken(String mobile) {
JSONObject loginRes = this.login(mobile);
userMobileToken = loginRes.getJSONObject("data").getString("token");
return userMobileToken;
}
/**
* 获取playMobileToken
* @param env
* @param playMobileToken
* @return
*/
@Override
public String getPlayMobileToken(String mobile) {
JSONObject loginRes = this.login(mobile);
playMobileToken = loginRes.getJSONObject("data").getString("token");
return playMobileToken;
}
/**
* 获取admin token
* @param env
* @param mobile
* @return
*/
@Override
public String getAdminToken() {
String adminLoginUrl = "https://"+env+"-api-admin.apeiwan.com/login";
Map<String, Object> params = new HashMap();
String username = BasicData.userName;
String password = BasicData.passWord;
if(env.equals("pre-test")){
username = BasicData.preTestUserName;
password = BasicData.preTestPassWord;
}
params.put("username", username);
params.put("password", password);
JSONObject jsonObj = HttpToolKit.invokePost(adminLoginUrl, null, params ).getJSONObject();
adminToken = jsonObj.getJSONObject("data").getString("token");
return adminToken;
}
/**
* 实名认证
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject SubmitAuthentication(String token,String userId) {
logger.info("token:"+token);
logger.info("userId:"+userId);
headers.put("token", token);
Map<String, Object> params = new HashMap();
params.put("authType", 0);
params.put("userId", userId);
params.put("userName", userId);
params.put("cardNo", userId);
params.put("cardHandUrl", cardHandUrl);
params.put("cardUrl", cardUrl);
params.put("emblemUrl", emblemUrl);
params.put("gender", 1);
//实名认证申请
String authUrl = "https://"+env+"-api-h5.apeiwan.com/api/v2/user/body-auth/save";
HttpToolKit.invokePost(authUrl, headers, params);
//获取控制台用户token
String adminToken = getAdminToken();
String passUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/user/body-auth/pass";
Map<String, Object> headers1 = new HashMap();
headers1.put("token", adminToken);
//实名认证同意
JSONObject jsonObj = HttpToolKit.invokePost(passUrl, headers1, params).getJSONObject();
return jsonObj;
}
/**
* 提交个人资料及审核
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject saveUserInfo(String token,String userId) {
//提交个人资料
headers.put("token", token);
String saveUserInfoUrl = "https://"+env+"-api-h5.apeiwan.com/api/v2/user/save-user-info";
Map<String, Object> params = new HashMap();
params.put("nickName", "test");
params.put("headPortraitsUrl", pngURL);
params.put("picUrls", pngURL);
params.put("videoUrl", pngURL);
HttpToolKit.invokePost(saveUserInfoUrl, headers, params).getJSONObject();
//获取控制台用户token
String adminToken = getAdminToken();
String authUpdateUrl = "https://"+env+"-api-admin.apeiwan.com/api/v2/user/info-auth-update";
Map<String, Object> headers1 = new HashMap();
headers1.put("token", adminToken);
//个人资料审核通过
Map<String, Object> updateParams = new HashMap();
updateParams.put("userId", userId);
updateParams.put("status", 2);
updateParams.put("reasonJSon", "");
JSONObject jsonObj = HttpToolKit.invokePost(authUpdateUrl, headers1, updateParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject saveInfoTech(String token,String userId, String categoryId,String techLevelId) {
//提交王者荣耀陪玩师入驻申请
headers.put("token", token);
String saveInfoTechUrl = "https://"+env+"-api-h5.apeiwan.com/api/v2/user/save-info-tech";
Map<String, Object> params = new HashMap();
//技能ID,首次申请为空
params.put("id", "");
params.put("userId", userId);
//品类
params.put("categoryId", categoryId);
//等级,如王者荣耀
params.put("techLevelId", techLevelId);
params.put("voice", "http://test-game-play.oss-cn-hangzhou.aliyuncs.com/2021/5/25/b5cfddf754744946998c49be57bda518.mp3");
params.put("voiceDuration", 8);
params.put("gradePicUrl", pngURL);
params.put("description", "非常好");
HttpToolKit.invokePost(saveInfoTechUrl, headers, params).getJSONObject();
//获取控制台用户token
String adminToken = getAdminToken();
String techAuthUrl = "https://"+env+"-api-admin.apeiwan.com/api/v2/user/tech-auth/pass";
Map<String, Object> headers1 = new HashMap();
headers1.put("token", adminToken);
Map<String, Object> updateParams = new HashMap();
//查询技能ID
String id = "";
String techAuthListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v2/user/tech/to-audit/list";
Map<String, Object> techAuthListParams = new HashMap();
techAuthListParams.put("pageNum", "1");
techAuthListParams.put("pageSize", "10");
techAuthListParams.put("authStatus", 7);
techAuthListParams.put("type", false);
JSONObject techAuthListJson = HttpToolKit.invokePost(techAuthListUrl, headers1, techAuthListParams).getJSONObject();
JSONArray jsonArr = techAuthListJson.getJSONObject("data").getJSONArray("list");
JSONObject jsonObj1 = (JSONObject) jsonArr.get(0);
id = jsonObj1.getString("id");
logger.info("技能ID:"+id);
updateParams.put("id", id);
updateParams.put("maxPrice", "");
updateParams.put("techLevelId", "6");
//审批入驻
JSONObject jsonObj = HttpToolKit.invokePost(techAuthUrl, headers1, updateParams).getJSONObject();
return jsonObj;
}
/**
* 充钻石
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject virtualMoneyModify(String mobile,long money) {
//根据用户手机号获取userId
String userListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/user/list";
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
Map<String, Object> updateParams = new HashMap();
updateParams.put("pageNum", 1);
updateParams.put("pageSize", 10);
updateParams.put("mobile", mobile);
JSONObject jsonObj = HttpToolKit.invokePost(userListUrl, adminHeaders, updateParams).getJSONObject();
JSONArray jsonArr = jsonObj.getJSONObject("data").getJSONArray("list");
JSONObject jsonObj1 = (JSONObject) jsonArr.get(0);
String userId = jsonObj1.getString("id");
logger.info("userId:"+userId);
//充值钻石
String virtualMoneyModifyUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/moneyDetails/virtual-money/modify";
Map<String, Object> modifyParams = new HashMap();
modifyParams.put("userId", userId);
modifyParams.put("type", 1);
modifyParams.put("remark", "1");
modifyParams.put("ext", "1");
modifyParams.put("money", money);
JSONObject modifyJsonObj = HttpToolKit.invokePost(virtualMoneyModifyUrl, adminHeaders, modifyParams).getJSONObject();
return modifyJsonObj;
}
/**
* 充皮皮币
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject moneyDetailsSave(String mobile,long money) {
//根据用户手机号获取userId
String userListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/user/list";
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
Map<String, Object> updateParams = new HashMap();
updateParams.put("pageNum", 1);
updateParams.put("pageSize", 10);
updateParams.put("mobile", mobile);
JSONObject jsonObj = HttpToolKit.invokePost(userListUrl, adminHeaders, updateParams).getJSONObject();
JSONArray jsonArr = jsonObj.getJSONObject("data").getJSONArray("list");
JSONObject jsonObj1 = (JSONObject) jsonArr.get(0);
String userId = jsonObj1.getString("id");
String nickname = jsonObj1.getString("nickname");
String balance = jsonObj1.getString("balance");
String chargeBalance = jsonObj1.getString("chargeBalance");
logger.info("userId:"+userId);
//充皮皮币
String saveUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/moneyDetails/save";
Map<String, Object> saveParams = new HashMap();
saveParams.put("mobile", mobile);
saveParams.put("userId", userId);
saveParams.put("moneyType", 1);
saveParams.put("remark", "1");
saveParams.put("ext", "1");
saveParams.put("money", money);
saveParams.put("nickname", nickname);
saveParams.put("balance", balance);
saveParams.put("chargeBalance", chargeBalance);
saveParams.put("isSearch", true);
saveParams.put("searchValue", userId);
JSONObject saveJsonObj = HttpToolKit.invokePost(saveUrl, adminHeaders, saveParams).getJSONObject();
return saveJsonObj;
}
/**
* 送礼物
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject send(String roomNo,String productId,String amount, String userIds) {
String sendUrl = "https://"+env+"-api-app.apeiwan.com/api/v4/room/gift/send";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("actionType", "1");
sendParams.put("amount", amount);
sendParams.put("roomNo", roomNo);
sendParams.put("productId", productId);
sendParams.put("userIds", userIds);
sendParams.put("timestamp", "1621828487580");
JSONObject jsonObj = HttpToolKit.invokePost(sendUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
/**
* 礼物列表
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject giftList() {
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
//查询礼物列表
String giftListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/virtual-product/gift-list";
Map<String, Object> giftListParams = new HashMap();
giftListParams.put("pageNum", "1");
giftListParams.put("pageSize", "10");
giftListParams.put("useStatus", "1");
giftListParams.put("type", "1");
JSONObject giftListJsonObj = HttpToolKit.invokePost(giftListUrl, adminHeaders, giftListParams).getJSONObject();
return giftListJsonObj;
}
/**
* 幸运夺宝箱列表
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject activityList() {
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
//幸运夺宝箱列表
String giftListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/lottery/activity/list";
Map<String, Object> activityListParams = new HashMap();
activityListParams.put("pageNum", "1");
activityListParams.put("pageSize", "10");
activityListParams.put("activityType", "1");
JSONObject giftListJsonObj = HttpToolKit.invokePost(giftListUrl, adminHeaders, activityListParams).getJSONObject();
return giftListJsonObj;
}
/**
* 开宝箱
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject lotteryActivity(String mobile,String roomNo, String activityId,String times) {
String sendUrl = "https://"+env+"-api-app.apeiwan.com/api/v3/virtual-product/lottery-activity";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("activityId", activityId);
sendParams.put("roomNo", roomNo);
sendParams.put("times", times);
sendParams.put("timestamp", "1621828487580");
JSONObject jsonObj = HttpToolKit.invokePost(sendUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
/**
* 申请开公会
* @param env
* @param mobile
* @param guildBiz
* @param openStatus
* @return
*/
@Override
public JSONObject guildCreate(String mobile,long openStatus, long guildBiz) {
headers.put("token", playMobileToken);
String guildCreateUrl = "http://"+env+"-guild-api.apeiwan.com/api/v1/guild-center/guild/create";
Map<String, Object> guildCreateParams = new HashMap();
guildCreateParams.put("leaderQq", "253772296");
guildCreateParams.put("leaderName", "心玄");
guildCreateParams.put("guildAuditPics", "http://test-game-play.oss-cn-hangzhou.aliyuncs.com/temp/2021/6/10/c117b205ae6d4ffc86d7cfb095c34756.jpeg");
guildCreateParams.put("companyName", "");
guildCreateParams.put("guildType", 1);
guildCreateParams.put("description", "欢迎来到我的公会");
guildCreateParams.put("remark", "欢迎来到我的公会");
guildCreateParams.put("maxNum", "50");
guildCreateParams.put("logoUrl", "http://test-game-play.oss-cn-hangzhou.aliyuncs.com/temp/2021/6/10/41ccae2242e74da8a554726da01f1dc2.jpeg");
guildCreateParams.put("guildName", "心玄的公会");
HttpToolKit.invokePost(guildCreateUrl, headers, guildCreateParams).getJSONObject();
//获取控制台用户token
String adminToken = getAdminToken();
//根据用户手机号获取公会ID
String auditListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/guild-center/guild/audit-list";
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
Map<String, Object> updateParams = new HashMap();
updateParams.put("pageNum", 1);
updateParams.put("pageSize", 10);
updateParams.put("mobile", mobile);
JSONObject jsonObj = HttpToolKit.invokePost(auditListUrl, adminHeaders, updateParams).getJSONObject();
JSONArray jsonArr = jsonObj.getJSONObject("data").getJSONArray("list");
JSONObject jsonObj1 = (JSONObject) jsonArr.get(0);
String guildAuditId = jsonObj1.getString("id");
logger.info("id:"+guildAuditId);
//审核公会 //公会自定义分成 //分成权限设置
Map<String, Object> auditHandleParams = new HashMap();
String auditHandleUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/guild-center/guild/audit-handle";
//审核状态
auditHandleParams.put("auditStatus", 2);
//审核ID
auditHandleParams.put("guildAuditId", guildAuditId);
//guildBiz语音1,游戏2,全部0
auditHandleParams.put("guildBiz", 0);
//openStatus是否开启自定义分成,1开启,0不开启,
auditHandleParams.put("openStatus",1);
JSONObject jsonObj2 = HttpToolKit.invokePost(auditHandleUrl, adminHeaders, auditHandleParams).getJSONObject();
return jsonObj2;
}
/**
* 根据公会ID获取会长相关信息
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject guildList(Map<String, Object> adminHeaders,String guildCode) {
//获取会长相关信息
String guildListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/guild-center/guild/list";
Map<String, Object> guildListParams = new HashMap();
guildListParams.put("guildCode", guildCode);
guildListParams.put("pageNum", 1);
guildListParams.put("pageSize", 999999);
JSONObject giftListJsonObj = HttpToolKit.invokePost(guildListUrl, adminHeaders, guildListParams).getJSONObject();
JSONArray jsonArr = giftListJsonObj.getJSONObject("data").getJSONArray("list");
JSONObject jsonObj1 = (JSONObject) jsonArr.get(0);
logger.info("获取会长相关信息:"+jsonObj1);
return jsonObj1;
}
/**
* 根据手机号获取userId、公会信息
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject userList(String mobile) {
//根据用户手机号获取userId
String userListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/user/list";
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
Map<String, Object> updateParams = new HashMap();
updateParams.put("pageNum", 1);
updateParams.put("pageSize", 10);
updateParams.put("mobile", mobile);
JSONObject jsonObj = HttpToolKit.invokePost(userListUrl, adminHeaders, updateParams).getJSONObject();
JSONArray jsonArr = jsonObj.getJSONObject("data").getJSONArray("list");
JSONObject jsonObj1 = (JSONObject) jsonArr.get(0);
return jsonObj1;
}
/**
* 根据手机号获取userId、公会信息
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject userListCheck(String mobile) {
//根据用户手机号获取userId
String userListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/user/list";
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
Map<String, Object> updateParams = new HashMap();
updateParams.put("pageNum", 1);
updateParams.put("pageSize", 10);
updateParams.put("mobile", mobile);
JSONObject jsonObj = HttpToolKit.invokePost(userListUrl, adminHeaders, updateParams).getJSONObject();
return jsonObj;
}
/**
* 创建房间
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject roomSave(String mobile,String roomName,long roomType,long roomCategoryId) {
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
//创建房间
String roomSaveUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/room/save";
Map<String, Object> roomSaveParams = new HashMap();
//房间属性,是否为公会厅,1为公会,2为非公会
roomSaveParams.put("roomType", roomType);
//通过房主手机号获取公会信息及leaderId
JSONObject jsObj= this.userList(mobile);
String guildCode = jsObj.getString("guildCode");
//公会ID
roomSaveParams.put("guildCode", guildCode);
String hostUserId = null;
String leaderNickName = null;
//如果为公会厅,则获取会长相关信息
if(roomType==1){
JSONObject guildList = this.guildList(adminHeaders, guildCode);
hostUserId = guildList.getString("leaderId");
leaderNickName = guildList.getString("leaderNickName");
roomSaveParams.put("hostUserId", hostUserId);
roomSaveParams.put("hostUserName", leaderNickName);
}
//如果为非公会厅,则获取房主相关信息
else{
hostUserId = jsObj.getString("id");
leaderNickName = jsObj.getString("nickname");
roomSaveParams.put("hostUserId", hostUserId);
roomSaveParams.put("hostUserName", leaderNickName);
//兼容guildCode为null的情况
if(guildCode==null){
roomSaveParams.put("guildCode", "");
}
}
roomSaveParams.put("roomIcon", "http://game-play.oss-cn-hangzhou.aliyuncs.com/temp/2021/6/16/9729215f7fad47a1a5d511b9a710620e.jpg");
//是否激活
roomSaveParams.put("isActivate", true);
//厅名称
roomSaveParams.put("roomName", roomName);
//房间类型:2为派单厅 3为女生厅,4为点唱厅,8为直播厅,17为男生厅
roomSaveParams.put("roomCategoryId", roomCategoryId);
roomSaveParams.put("orderRoomSerial", "1");
roomSaveParams.put("virtualPeople", "1");
roomSaveParams.put("remark", roomName);
logger.info("roomSaveParams:"+roomSaveParams.toString());
JSONObject giftListJsonObj = HttpToolKit.invokePost(roomSaveUrl, adminHeaders, roomSaveParams).getJSONObject();
return giftListJsonObj;
}
/**
* 根据手机号获取房间信息
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject roomList(String mobile) {
//根据用户手机号获取userId
JSONObject userJsonObj = this.userList(mobile);
String userId = userJsonObj.getString("id");
String userListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/room/list";
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
Map<String, Object> updateParams = new HashMap();
updateParams.put("pageNum", 1);
updateParams.put("pageSize", 10);
updateParams.put("userId", userId);
JSONObject jsonObj = HttpToolKit.invokePost(userListUrl, adminHeaders, updateParams).getJSONObject();
return jsonObj;
}
/**
* 申请加入公会
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject guildCenter(String mobile,String queryStr) {
String sendUrl = "https://"+env+"-guild-api.apeiwan.com/api/v1/guild-center/guild/join";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
//根据guildCode获取guildId
long guildId = this.guildSearch(mobile, queryStr);
sendParams.put("guildId", guildId);
sendParams.put("applyRemark", "我是test,想加入公会");
JSONObject jsonObj = null;
if(guildId!=0){
jsonObj = HttpToolKit.invokePost(sendUrl, headers, sendParams).getJSONObject();
}
else{
jsonObj = new JSONObject();
jsonObj.put("desc", "未找到该公会!");
}
return jsonObj;
}
/**
* 搜索公会
* @param env
* @param mobile
* @return
*/
@Override
public long guildSearch(String mobile,String queryStr) {
String searchUrl = "https://"+env+"-guild-api.apeiwan.com/api/v1/guild-center/guild/search";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
//根据guildCode获取guildId
sendParams.put("pageNum", "1");
sendParams.put("pageSize", "20");
sendParams.put("queryStr", queryStr);
JSONObject jsonObj = HttpToolKit.invokePost(searchUrl, headers, sendParams).getJSONObject();
JSONArray jsonArr = jsonObj.getJSONObject("data").getJSONArray("list");
long guildId = 0;
if(jsonArr.size()!=0){
JSONObject jsonObj1 = (JSONObject) jsonArr.get(0);
guildId = jsonObj1.getLong("id");
}
logger.info("guildId:"+guildId);
return guildId;
}
/**
* 搜索公会列表
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject guildSearchList(String mobile,String queryStr) {
String searchUrl = "https://"+env+"-guild-api.apeiwan.com/api/v1/guild-center/guild/search";
Map<String, Object> sendParams = new HashMap();
headers.put("token", playMobileToken);
//根据guildCode获取guildId
sendParams.put("pageNum", "1");
sendParams.put("pageSize", "20");
sendParams.put("queryStr", queryStr);
JSONObject jsonObj = HttpToolKit.invokePost(searchUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
/**
* 审核加入公会
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject applyList(String mobile) {
String searchUrl = "https://"+env+"-guild-api.apeiwan.com/api/v1/guild-center/guild/apply-list";
long guildId = 0;
//根据用户手机号获取公会ID
JSONObject jsObj = this.userList(mobile);
String guildCode = jsObj.getString("guildCode");
guildId = this.guildSearch(mobile, guildCode);
Map<String, Object> sendParams = new HashMap();
//根据公会ID即guildCode获取guildId
sendParams.put("pageNum", "1");
sendParams.put("pageSize", "20");
sendParams.put("applyType", "1");
sendParams.put("guildId", guildId);
headers.put("token", playMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(searchUrl, headers, sendParams).getJSONObject();
JSONArray jsonArr = jsonObj.getJSONObject("data").getJSONArray("list");
JSONObject jsonObj1 = (JSONObject) jsonArr.get(0);
long applyId = jsonObj1.getLong("applyId");
logger.info("applyId:"+applyId);
JSONObject jsObj1 = this.handleApply(mobile, applyId);
return jsObj1;
}
/**
* 申请加入公会及审核
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject auditGuild (String mobile,String queryStr) {
//通过公会ID申请加入公会
this.guildCenter(mobile, queryStr);
Map<String, Object> adminHeaders = new HashMap();
adminHeaders.put("token", adminToken);
//根据公会ID获取会长相关信息
JSONObject guildList = this.guildList(adminHeaders, queryStr);
String LeaderMobile = guildList.getString("mobile");
JSONObject jsonObj = this.applyList(LeaderMobile);
return jsonObj;
}
/**
* 审核加入公会
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject handleApply(String mobile,long applyId) {
String handleApplyUrl = "https://"+env+"-guild-api.apeiwan.com/api/v1/guild-center/guild/handle-apply";
Map<String, Object> sendParams = new HashMap();
sendParams.put("applyId", applyId);
sendParams.put("handleStatus", 2);
sendParams.put("configs", "[]");
JSONObject jsonObj = HttpToolKit.invokePost(handleApplyUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
/**
* 将成员从移除公会
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject remove(String userMobile) {
String removeUrl = "https://"+env+"-guild-api.apeiwan.com/api/v2/guild-member/remove";
Map<String, Object> sendParams = new HashMap();
JSONObject userJsonObj = this.userList(userMobile);
String userId = userJsonObj.getString("id");
sendParams.put("userId", userId);
headers.put("token", playMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(removeUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject upList(String userMobile, String roomCategoryId, String type) {
String upListUrl = "https://"+env+"-guild-api.apeiwan.com/api/v1/room/mic/up/list";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("roomNo", roomCategoryId);
sendParams.put("type", type);
JSONObject jsonObj = HttpToolKit.invokePost(upListUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject upSize(String userMobile, String roomCategoryId, String type) {
String upSizeUrl = "https://"+env+"-guild-api.apeiwan.com/api/v1/room/mic/up/size";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("roomNo", roomCategoryId);
sendParams.put("types", type);
JSONObject jsonObj = HttpToolKit.invokePost(upSizeUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject getUserBalance() {
String getUserBalanceUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/user/balance/get";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(getUserBalanceUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject getUserSimple(String mobile) {
String getUserSimpleUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/user/simple/get";
Map<String, Object> sendParams = new HashMap();
JSONObject userJsonObj = this.userList(mobile);
String userId = userJsonObj.getString("id");
sendParams.put("userId", userId);
sendParams.put("roomNo", BasicData.roomNo);
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(getUserSimpleUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject getUserSimple2(String mobile) {
String getUserSimpleUrl = "https://"+env+"-api-app.apeiwan.com/api/v2/user/simple/get";
Map<String, Object> sendParams = new HashMap();
JSONObject userJsonObj = this.userList(mobile);
String userId = userJsonObj.getString("id");
sendParams.put("userId", userId);
sendParams.put("roomNo", BasicData.roomNo);
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(getUserSimpleUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject getHome() {
String getHomeUrl = "https://"+env+"-api-app.apeiwan.com/api/v3/user/get-home";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(getHomeUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject userGet() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/api/v2/user/get";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject getMine() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v3/user/get-mine";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject managerList() {
String managerListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/rask/manager/list";
Map<String, Object> sendParams = new HashMap();
headers.put("token", adminToken);
sendParams.put("pageNum", "1");
sendParams.put("pageSize", "10");
JSONObject jsonObj = HttpToolKit.invokePost(managerListUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject roomRecord() {
String managerListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/rask/manager/room/record";
Map<String, Object> sendParams = new HashMap();
headers.put("token", adminToken);
sendParams.put("pageNum", "1");
sendParams.put("pageSize", "10");
JSONObject jsonObj = HttpToolKit.invokePost(managerListUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject recordExport() {
String managerListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/rask/manager/room/operate/record/export";
Map<String, Object> sendParams = new HashMap();
headers.put("token", adminToken);
JSONObject jsonObj = HttpToolKit.invokePost(managerListUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject delete() {
// TODO Auto-generated method stub
return null;
}
public static void main(String args[]){
CosPlyaPlayerServiceImpl cosPlyaPlayerServiceImpl = new CosPlyaPlayerServiceImpl();
String env = "t3";
String mobile = "13823774131";
String roomNo = "TEST902661";
String productId = "444";
String userIds = "2952662,2952651";
String amount="1";
long money=10;
String times="1";
String activityId="110";
//JSONObject loginRes = cosPlyaPlayerServiceImpl.login(mobile,env);
//String token = loginRes.getJSONObject("data").getString("token");
//String userId = loginRes.getJSONObject("data").getString("id");
String techLevelId="107";
String categoryId="30";
String id = "";
long openStatus=1;
long guildBiz=0;
//cosPlyaPlayerServiceImpl.guildCreate(mobile,openStatus,guildBiz,"t");
//cosPlyaPlayerServiceImpl.SubmitAuthentication(token,userId,env);
//CosPlyaPlayerServiceImpl.saveUserInfo(token, userId, env);
//CosPlyaPlayerServiceImpl.virtualMoneyModify(mobile,money,env);
//CosPlyaPlayerServiceImpl.send(mobile, roomNo, productId,amount,userIds,env);
//CosPlyaPlayerServiceImpl.giftList(env);
//CosPlyaPlayerServiceImpl.moneyDetailsSave(mobile, money, env);
//CosPlyaPlayerServiceImpl.activityList(env);
//CosPlyaPlayerServiceImpl.lotteryActivity(mobile, roomNo, activityId, times, env);
//cosPlyaPlayerServiceImpl.saveInfoTech(mobile, categoryId, techLevelId, env);
//String guildCode ="16208545";
//房间属性,是否为公会厅,1为公会,2为非公会
long roomType = 2;
String roomName = "我的非公会厅1";
long roomCategoryId = 2;
String queryStr = "10113062";
long applyId = 87148;
// cosPlyaPlayerServiceImpl.roomSave(mobile, roomName, roomType, roomCategoryId , env);
//cosPlyaPlayerServiceImpl.userList(mobile, env); 公会ID 12359482 13823774131
//cosPlyaPlayerServiceImpl.guildCenter(mobile, queryStr, env);
//cosPlyaPlayerServiceImpl.guildSearch(mobile, queryStr, env);
//公会审批列表
//cosPlyaPlayerServiceImpl.applyList(mobile, env);
//cosPlyaPlayerServiceImpl.handleApply(mobile,applyId,env);
//cosPlyaPlayerServiceImpl.auditGuild("13823774135", queryStr, env);
//cosPlyaPlayerServiceImpl.roomList(mobile, env);
// cosPlyaPlayerServiceImpl.userList(adminToken,mobile, env);
}
@Override
public JSONObject sendPipibi(String toUserId, String giftProductId, String amount) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/gift-product/send-gift";
Map<String, Object> sendParams = new HashMap();
sendParams.put("toUserId", toUserId);
sendParams.put("giftProductId", giftProductId);
sendParams.put("amount", amount);
sendParams.put("dynamicId", "");
sendParams.put("timestamp", "1630395325064");
sendParams.put("SendGiftScene", "1");
sendParams.put("rewardOrderNo", "");
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject orderProduct() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/order/product";
Map<String, Object> sendParams = new HashMap();
sendParams.put("productId", "317595");
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject orderList() {
String orderListUrl = "https://"+env+"-api-admin.apeiwan.com/api/v1/order/list";
Map<String, Object> sendParams = new HashMap();
sendParams.put("pageNum", "1");
sendParams.put("pageSize", "10");
sendParams.put("status", "20");
sendParams.put("chanType", "0");
headers.put("token", adminToken);
JSONObject jsonObj = HttpToolKit.invokePost(orderListUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject bSend(String roomno, String backpackId, String amount, String userId) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v4/room/gift/backpack/send";
Map<String, Object> sendParams = new HashMap();
sendParams.put("userIds", userId);
sendParams.put("backpackId", backpackId);
sendParams.put("amount", amount);
sendParams.put("actionType", 1);
sendParams.put("timestamp", "1630395325064");
sendParams.put("roomNo", roomno);
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject RecentAuditionDetails(String roomNo) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v2/assign/recent-audition-details";
Map<String, Object> sendParams = new HashMap();
sendParams.put("roomNo", roomNo);
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject dictGet() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v2/dict/get";
Map<String, Object> sendParams = new HashMap();
sendParams.put("dictCode", "GUILD_PK_ACTIVITY_CONFIG");
sendParams.put("code", "GUILD_PK_ACTIVITY_CONFIG_CODE_1");
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject micAll(String roomNo) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/room/mic/all";
Map<String, Object> sendParams = new HashMap();
sendParams.put("roomNo", roomNo);
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject playeeCenter() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/playee/center";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject dynamicGet() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v2/dynamic/get";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("pageSize", 20);
sendParams.put("type", 2);
sendParams.put("pageNum", 1);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject backpackGift() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v3/virtual-product/my/backpack/gift";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject roomEnter(String roomno) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v3/virtual-product/my/backpack/gift";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("roomNo", roomno);
sendParams.put("isFirstEnter", 1);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject giftProductList() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/gift-product/list";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject virtualProductList(String roomno) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v6/virtual-product/list";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("_version", "2.3.7");
sendParams.put("_imei2", "111");
sendParams.put("roomNo", roomno);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject productList() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/product/list";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject operations() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v1/welfare-center/operations";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject giftBoxSend(String roomno) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v2/room/gift-box/send";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("roomNo", roomno);
sendParams.put("targetUserIds", "5523052");
sendParams.put("perCount", 1);
sendParams.put("giftBoxId", 108);
sendParams.put("timestamp", "1621828487580");
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject State(String roomno) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v2/dynamic-info-flow/state";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("roomNo", roomno);
sendParams.put("_version", "2.3.7");
sendParams.put("_imei2", "111");
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject roomMicAll() {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v4/room/get-room-mic-all";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject holdUp(String roomno) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v4/room/get-room-mic-all";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("roomNo", roomno);
sendParams.put("index", 1);
sendParams.put("userId", 4022309);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
@Override
public JSONObject holdStatus(String roomno) {
String userGetUrl = "https://"+env+"-api-app.apeiwan.com/api/v2/room/mic/hold-status";
Map<String, Object> sendParams = new HashMap();
headers.put("token", userMobileToken);
sendParams.put("roomNo", roomno);
sendParams.put("index", 1);
sendParams.put("userId", 4022309);
JSONObject jsonObj = HttpToolKit.invokePost(userGetUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
}