hefeixia
2021-02-18 5b8c95c760840f09910730943b21391e47187315
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
package chat.user;
 
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
 
import chat.module.ConcurrentMapList;
import chat.module.ModuleLoader;
import chat.module.UserMessageList;
import chat.module.entity.FriendRequest;
import chat.module.entity.FriendShip;
import chat.module.entity.MessageContainer;
import chat.module.entity.MessageRecord;
import chat.module.entity.MessageRelation;
import chat.module.entity.MessageType;
import chat.module.entity.PrivateFriend;
import chat.module.entity.PublishOperator;
import chat.module.friendcircle.FriendCircle;
import chat.server.call.IJSONWriter;
import chat.server.call.IJsonProvider;
import chat.server.im.DataPool;
import chat.server.im.IMTopic;
import chat.util.MessageShardingUtil;
import cn.wildfirechat.proto.ProtoConstants;
import cn.wildfirechat.proto.WFCMessage;
import cn.wildfirechat.proto.WFCMessage.HandleFriendRequest;
import cn.wildfirechat.proto.WFCMessage.Message;
import cn.wildfirechat.proto.WFCMessage.Message.Builder;
import frame.object.data.Entity;
import frame.object.data.ID;
import frame.persist.NamedSQL;
import frame.persist.SQLRunner;
 
public class User implements IJsonProvider {
 
    private String id;
    private String mobile;
    private String name;
    private String displayName;
    private String portrait;
    private String password;
    private int gender;
    private boolean stranger;
    private String roletype;
    private long timestamp;
    private String bizid;
    private String extra;
    private String rejectreason;
    
    private WFCMessage.UserResult userResult;
    private Set<Client> clientSet;
    
    protected ConcurrentMapList<List<FriendShip>> friendShipList;
    protected ConcurrentMapList<List<FriendShip>> pushFriendList;
    //protected ConcurrentMapList<FriendShip> pushFriendList;
    private UserMessageList messageList;
    private FriendCircle friendCircle;
    
    public User() {}
    
    public User(String id) {
        clientSet = new HashSet<Client>();
        friendShipList = new ConcurrentMapList<List<FriendShip>>();
        pushFriendList = new ConcurrentMapList<List<FriendShip>>();
        messageList = new UserMessageList();
        friendCircle = new FriendCircle();
    }
 
    public static User getInstance(String userId) {
        User result = UserStore.getById(userId);
        return result;
    }
    
    public static User setUserInfo(NotifyContentDetail contentDetail) {
        String rejectReasonMerge = "";
        User user = new User();
        user.setId(ID.newValue());
        user.setBizid(contentDetail.getDoctorId());
        user.setName(contentDetail.getName());
        user.setDisplayName(contentDetail.getName());
        user.setPortrait(contentDetail.getPortrait());
        user.setMobile(contentDetail.getMobile());
        user.setRoletype(contentDetail.getRoletype());
        user.setExtra(contentDetail.getDoctorId());
        if (contentDetail.getRejectreason() == null) {
            rejectReasonMerge = "";
        } else {
            for (String rejectReason : contentDetail.getRejectreason()) {
                 rejectReasonMerge = rejectReasonMerge + rejectReason + "#separate#";
            }            
        }
 
        user.setRejectreason(suitableStr(rejectReasonMerge, "#separate#"));
        return user;
    }
    
    public static String suitableStr(String body, String sep) {
        String result = "";
        if (body == null || body.equals("")) {
            return "";
        }
        int index = body.lastIndexOf(sep);
        result = body.substring(0, index);
        return result;
    }
    
    public static User getInstance(Client client) throws Exception {
        String userId = client.getUserId();
        
        if (userId == null) {
            return null;
        }
        
        NamedSQL namedSQL = NamedSQL.getInstance("getOneUserByClientId");
        namedSQL.setParam("clientId", client.getId());
        
        Entity entity = namedSQL.getEntity();
        
        User user = new User(userId);
        user.load(entity);
        
        return user;
    }
 
    public void createInitFrieldShip(User user) {
        // TODO Auto-generated method stub
        try {
             FriendShip friendShip = new FriendShip();
             User friend =  UserStore.getById("user004");
            
             friendShip = new FriendShip(user, "user004", "open");
             friendShip.addFriendShipToDataBase();
             user.addOneFrieldShip(user.getId(), friendShip);
            
             friendShip = friendShip.getReverseInstance();
             friend.addOneFrieldShip(friendShip.getUserid(), friendShip);
        } catch(Exception e) {
             e.printStackTrace();
        }
    }
    
    public void modifyFrieldShipStatus(FriendShip friendShip, String status) {
        try {
             friendShip.updateFriendShipToDataBase("open");
        } catch(Exception e) {
             e.printStackTrace();
        }
    }
    
    public Client getClient(String userId) {
        Client clientReturn = null;
        if (userId == null || ("").equals(userId)) {
            return clientReturn;
        }
        for (Client client:clientSet) {
             if (client.getUser().getId().equals(userId)) {
                 clientReturn = client;
                 break;
             }
        }
        return clientReturn;
    }
 
    public void load(DataPool dataPool) {
        try {
             mobile = dataPool.getString("mobile");
             if (mobile == null) {
                 mobile = dataPool.getPhone();
             }
        } catch (Exception e) {
             mobile = dataPool.getPhone();
        } finally {
            if (dataPool.getString("roletype") != null) {
                if (dataPool.getString("roletype").equals("doctor")) {
                    roletype = "1";
                }
                else if  (dataPool.getString("roletype").equals("")) {
                    roletype = "2";
                }
            }
        }
    }
    
    public void reLoad(User user) {
        
        name = user.getName();
        portrait = user.getPortrait();
        roletype = user.getRoletype();
        mobile = user.getMobile();
        displayName = user.getDisplayName();
        gender = user.getGender();
        rejectreason = user.getRejectreason();
            
    }
    
    public void load(Entity entity) {
        if (entity == null) {
            return;
        }
        
        id = entity.getString("id");
        mobile = entity.getString("mobile");
        name = entity.getString("name");
        displayName = entity.getString("displayName");
        portrait = entity.getString("portrait");
        password = entity.getString("password");
        stranger = entity.getBoolean("stranger", false);
        roletype = entity.getString("roletype");
        extra = entity.getString("extra");
        bizid = entity.getString("bizid");
        rejectreason = entity.getString("rejectreason");
        
        userResult = null;
    }
    
    //将没有接收到的消息放入消息队列中
    public void addOneUnreceivedMessage(MessageRelation messageRelation) {
        // TODO Auto-generated method stub
        if (messageRelation == null) {
            return;
        }
        
        if (MessageType.unreceived == MessageType.parse(messageRelation.getStatuscode())) {
            messageRelation.getMessageRecord().setMessage(createOneMessage(messageRelation.getMessageRecord(), messageRelation));
            messageList.getMessageList().add(messageRelation);
            
        } 
        else if (MessageType.received == MessageType.parse(messageRelation.getStatuscode())){
            messageList.setPos(messageList.getPos() + 1);
        }
    }
    
    public WFCMessage.Message createOneMessage(MessageRecord message, MessageRelation messageRelation) {
        WFCMessage.Message messageWFC = null;
        
        try {
             WFCMessage.Message.Builder builder = WFCMessage.Message.newBuilder();
             builder.setMessageId(message.getMessageid());
             builder.setServerTimestamp(message.getTimestamp());
             builder.setFromUser(message.getSenderId());
             
             WFCMessage.Conversation.Builder cb = WFCMessage.Conversation.newBuilder();
             cb.setType(messageRelation.getType());
             cb.setTarget(messageRelation.getTargetid());
             cb.setLine(messageRelation.getLine());
             builder.setConversation(cb.build());
             
             WFCMessage.MessageContent.Builder contentBuilder = WFCMessage.MessageContent.newBuilder();
             contentBuilder.setType(message.getType());
             contentBuilder.setSearchableContent(message.getContent());
             contentBuilder.setMediaType(0);
             contentBuilder.setPersistFlag(message.getPersistflag());
             contentBuilder.setExpireDuration(0);
             contentBuilder.setMentionedType(0);
             
             WFCMessage.MessageContent messageContent = contentBuilder.build();
             
             builder.setContent(messageContent);
             
             messageWFC = builder.build();
             
        } catch(Exception e) {
             e.printStackTrace();
        }
        return messageWFC;
    }    
 
    public void addOneFrieldShip(String friendId, FriendShip friendShip) {
        List<FriendShip> friendShipS = friendShipList.get(friendId);
        if (friendShipS == null) {
            friendShipS = new ArrayList<FriendShip>();
        }
        
        friendShipS.add(friendShip);
        friendShipList.addMapList(friendId, friendShipS);
    }
    
    public void addOnePushFriendShip(String friendId, FriendShip friendShip) {
        List<FriendShip> friendShipS = pushFriendList.get(friendId);
        if (friendShipS == null) {
            friendShipS = new ArrayList<FriendShip>();
        }
        
        friendShipS.add(friendShip);
        pushFriendList.addMapList(friendId, friendShipS);
    }
    
    //增加朋友请求消息
    public void addUserFriendShip(String userid, WFCMessage.AddFriendRequest request) {
        long[] head = new long[1];
        
        WFCMessage.FriendRequest.Builder friendRequestBuilder = WFCMessage.FriendRequest.newBuilder();
        friendRequestBuilder.setFromUid(userid);
        friendRequestBuilder.setToUid(request.getTargetUid());
        friendRequestBuilder.setReason(request.getReason());
        friendRequestBuilder.setStatus(ProtoConstants.FriendRequestStatus.RequestStatus_Sent);
        friendRequestBuilder.setToReadStatus(false);
        friendRequestBuilder.setUpdateDt(System.currentTimeMillis());
        WFCMessage.FriendRequest friendRequest = friendRequestBuilder.build();
        
        FriendShip friendShip = new FriendShip(UserStore.getById(userid), request.getTargetUid(), "apply");
        friendShip.setFriendRequest(friendRequest);
        
        friendShip.addFriendShipToDataBase();
        
        UserStore.getById(userid).addOnePushFriendShip(userid, friendShip);
        UserStore.getById(request.getTargetUid()).addOnePushFriendShip(request.getTargetUid(), friendShip);
        
        head[0] = System.currentTimeMillis();
        //发通知
        FriendRequest friendData = new FriendRequest(userid, request.getTargetUid());
        ModuleLoader.getImBusinessScheduler().execute(() -> friendData.notifyOneFriendRequest(IMTopic.NotifyFriendRequestTopic, request, head[0], userid));
    }
    
    //添加朋友的对方,接受请求
    public void handleFriendRequest(String userId, WFCMessage.HandleFriendRequest request, WFCMessage.Message.Builder msgBuilder, long[] heads) {
        // TODO Auto-generated method stub
        if (request.getStatus() != ProtoConstants.FriendRequestStatus.RequestStatus_Accepted) {
            return;
        }
        
        List<FriendShip> friendShipList = getApplyFriendShip(userId);
        FriendShip loadFriendShip = null;
        MessageContainer messageContainer;
        
        WFCMessage.FriendRequest existRequest = null;
        
        try {
             for (FriendShip friendShip : friendShipList) {
                   if (friendShip.getUserid().equals(request.getTargetUid()) && friendShip.getFriendid().equals(userId)) {
                        existRequest = friendShip.getFriendRequest();
                        loadFriendShip = friendShip;
                        break;
                   }
             }
             
             if (existRequest != null) {
                  existRequest = existRequest.toBuilder().setStatus(request.getStatus()).setUpdateDt(System.currentTimeMillis()).build();
                  
                  //1.创建chatspace 单聊
                  PrivateFriend privateGroup = new PrivateFriend(UserStore.getById(request.getTargetUid()).getName() + "--" + UserStore.getById(userId).getName(), UserStore.getById(request.getTargetUid()));
                  privateGroup.createPrivateFriend();
                  ModuleLoader.getPrivateFriendBucket().addOne(privateGroup.getId(), privateGroup);
                  
                  //2.创建member
                  List<String> userList = new ArrayList<String>();
                  userList.add(request.getTargetUid());
                  userList.add(userId);
                  messageContainer = ModuleLoader.getPrivateFriendBucket().getOne(privateGroup.getId());
                  messageContainer.addInitMembers(privateGroup.getId(), userList);
                  
                  //3.修改frienship中的状态,将申请(apply)状态修改成通过(open)状态
                  modifyFrieldShipStatus(loadFriendShip, "open");
                  
                  //4.将申请状态中的记录删除
                  delApplyFriendShip(request.getTargetUid());
                  getApplyFriendShip(userId);
                  
                  //5.将双方加入friendship关系中
                  addOneFrieldShip(request.getTargetUid(), loadFriendShip);
                 heads[0] = System.currentTimeMillis();
                  loadFriendShip = loadFriendShip.getReverseInstance();
                 addOneFrieldShip(userId, loadFriendShip);
                 heads[1] = System.currentTimeMillis();
                 
                 msgBuilder.setConversation(WFCMessage.Conversation.newBuilder().setTarget(userId).setLine(0).setType(ProtoConstants.ConversationType.ConversationType_Private).build());
                 msgBuilder.setContent(WFCMessage.MessageContent.newBuilder().setType(1).setSearchableContent(existRequest.getReason()).build());                 
             }
        } catch(Exception e) {
             e.printStackTrace();
        }
    }
 
    public void pushTo(Entity entity) throws Exception {
        String id = ID.newValue();
        entity.set("id", id);
        setId(id);
        entity.set("mobile", mobile);
        entity.set("name", name);
        entity.set("displayName", displayName);
        entity.set("portrait", portrait);
        entity.set("password", password);
        entity.set("roletype", roletype);
        entity.set("extra", extra);
        entity.set("bizid", bizid);
        entity.set("rejectreason", rejectreason);
    }
    
    public void pushToModify(Entity entity) throws Exception {
        entity.set("id", id);
        entity.set("mobile", mobile);
        entity.set("name", name);
        entity.set("displayName", displayName);
        entity.set("portrait", portrait);
        entity.set("password", password);
        entity.set("roletype", roletype);
        entity.set("extra", extra);
        entity.set("bizid", bizid);
        entity.set("rejectreason", rejectreason);
    }    
    
    public void updateDoctorId() throws Exception {
        
    }
    
    public WFCMessage.UserResult toWFCUserResult() {
        if (userResult != null) {
            return userResult;
        }
        
        WFCMessage.User wfcUser = toWFCUser();
        
        WFCMessage.UserResult.Builder resultBuilder = WFCMessage.UserResult.newBuilder();
        resultBuilder.setUser(wfcUser);
        resultBuilder.setCode(ProtoConstants.UserResultCode.Success);
        
        userResult = resultBuilder.build();
        
        return userResult;
    }
    
    public WFCMessage.User toWFCUser() {
        WFCMessage.User.Builder userBuilder = WFCMessage.User.newBuilder();
        userBuilder.setUid(id);
        userBuilder.setName(name);
        userBuilder.setDisplayName(displayName);
        
        userBuilder.setPortrait(portrait);
        userBuilder.setMobile(mobile);
        
        if (extra != null && !extra.equals("")) {
            userBuilder.setExtra(extra);
        } else {
            userBuilder.setExtra("");
        }
        
        return userBuilder.build();
    }
 
    /**
      * 将消息关系挂到接收客户下面
     * @param relation
     * private UserMessageList messageList;
     */
    public void pushOneMessageRelation(MessageRelation relation) {
        // TODO Auto-generated method stub
        this.messageList.getMessageList().add(relation);
    }
 
    public List<Message> getUnreceivedMessageList() throws Exception {
        List<Message> result = new ArrayList<WFCMessage.Message>();
        
        int pos = messageList.getPos() ; 
        int size = messageList.getMessageList().size();
        
        //add one message
        for (int i = pos; i < size; i++) {
            //1.
            MessageRelation relation = messageList.getMessageList().get(i);
            result.add(relation.getMessageRecord().getMessage());
            
            //2. update state
            relation.updateStatusToDataBase(relation, "received");
            
            //3.修改已读下标指针
            messageList.setPos(pos+1);
        }
        
        return result;
    }
 
    public void addClient(Client client) {
        for (Client clientP: clientSet) {
             if (clientP.getId().equals(client.getId())) {
                 clientSet.remove(clientP);
                 break;
             }
        }
        clientSet.add(client);
    }
 
    public void setDefaultValues() throws Exception {
        //1. name 
        NamedSQL namedSQL = NamedSQL.getInstance("nextval");
        namedSQL.setParam("name", "usr");
        int value = SQLRunner.getInteger(namedSQL);
        
        name = "User" + value;
        displayName = name;
        
        //2. 
        portrait = "http://cdn2.wildfirechat.cn/robot.png";
 
        //3.
        stranger = true;
        timestamp = System.currentTimeMillis();
//        if (!roletype.equals("")) {
//            this.extra = getRoleUserId(mobile, roletype);
//        }
    }
    
    public Map<String, String> getRoleUserId(String phone, String roleType) throws Exception {
        String strSQL = "";
        Map<String, String> returnMap = new HashMap<String, String>();
        if (roletype.equals("1")) {
            strSQL = " select id, doctor_name as name from medo_doctor where doctor_mobile = '"+phone+"' ";
        } else if (roletype.equals("2")) {
            strSQL = " select id, client_name from as name from medeasy_client.mecl_client where mobile = '"+phone+"' ";
        }
        
        PreparedStatement st = ModuleLoader.connDB.prepareStatement(strSQL);
        ResultSet rs = st.executeQuery();
        while(rs.next()){
             returnMap.put("id", rs.getString("id"));
             returnMap.put("name", rs.getString("name"));
        }
        return returnMap;
    }
    
    /**
     * 
     * @param 查询关键字
     * @param fuzzy  0  模糊查询
     * @param page  页数
     * @author hefeixia 20210216
     * @return
     */
    public List<cn.wildfirechat.proto.WFCMessage.User> searchUser(String keyword, int searchType, int page) {
        // TODO Auto-generated method stub
        ArrayList<WFCMessage.User> outUser = new ArrayList<WFCMessage.User>();
        
        Map<String, User> userAll = UserStore.getIdUserMap();
        
        for (User user : userAll.values()) {
             if (user.name.contains(keyword) || user.mobile.contains(keyword) || user.displayName.contains(keyword)) {
                 WFCMessage.User.Builder builder = WFCMessage.User.newBuilder();
                 builder.setUid(user.getId());
                 builder.setName(user.getName());
                 builder.setPortrait(user.getPortrait());
                 builder.setMobile(user.getMobile());
                 builder.setDisplayName(user.getDisplayName());
                 builder.setExtra(user.getExtra());
                 
                 WFCMessage.User usr = builder.build();
                 outUser.add(usr);
             }
        }
        
        return outUser;
    }    
    
    @Override
    public void writeJSONObject(IJSONWriter writer) {
        writer.beginObject();
        writeJSONData(writer);
        writer.endObject();
    }
 
    @Override
    public void writeJSONData(IJSONWriter writer) {
        writer.write("userId", id);
        writer.write("name", name);
        writer.write("displayName", displayName);
        writer.write("portrait", portrait);
        writer.write("gender", gender);
        writer.write("mobile", mobile);
        writer.write("roletype", roletype);
        writer.write("extra", extra);
        writer.write("email", "");
        writer.write("roletype", 1);
        writer.write("bizid", bizid);
        writer.write("rejectreason", rejectreason);
    }
    
    @Override
    public int hashCode() {
        if (id == null) {
            return 0;
        }
        
        return id.hashCode();
    }
 
    public String getDisplayName() {
        return displayName;
    }
 
    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }
 
    public int getGender() {
        return gender;
    }
 
    public void setGender(int gender) {
        this.gender = gender;
    }
 
    public void setId(String id) {
        this.id = id;
    }
 
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }
 
    public void setPassword(String password) {
        this.password = password;
    }
    
    public List<FriendShip> getFriendship(String userId) {
        List<FriendShip> result = friendShipList.get(userId);
        return result;
    }
    
    public List<FriendShip> getApplyFriendShip(String userId) {
        List<FriendShip> result = pushFriendList.get(userId);
        return result;        
    }
    
    public void delApplyFriendShip(String userId) {
        pushFriendList.delete(userId);
    }
 
    public String getExtra() {
        return extra;
    }
 
    public void setExtra(String extra) {
        this.extra = extra;
    }
    
    public String getId() {
        return id;
    }
 
    public String getName() {
        return name;
    }
 
    public String getPassword() {
        return password;
    }
 
    public String getPortrait() {
        return portrait;
    }
 
    public String getMobile() {
        return mobile;
    }
 
    public Set<Client> getClientSet() {
        return clientSet;
    }
 
    public void notify(PublishOperator operator) {
 
    }
 
    public boolean isStranger() {
        return stranger;
    }
 
    public void setStranger(boolean stranger) {
        this.stranger = stranger;
    }
 
    public long getUpdateDt() {
        return timestamp;
    }
 
    public String getRejectreason() {
        return rejectreason;
    }
 
    public void setRejectreason(String rejectreason) {
        this.rejectreason = rejectreason;
    }
 
    public String getBizid() {
        return bizid;
    }
 
    public void setBizid(String bizid) {
        this.bizid = bizid;
    }
 
    public String getRoletype() {
        return roletype;
    }
 
    public void setRoletype(String roletype) {
        this.roletype = roletype;
    }
    
    public FriendCircle getFriendCircle() {
        return friendCircle;
    }
 
}