Commit d14bd65d by 徐高华

管理员标识

parent 8aa2c181
...@@ -53,8 +53,26 @@ public class GroupChatUserDTO implements Serializable{ ...@@ -53,8 +53,26 @@ public class GroupChatUserDTO implements Serializable{
private String joinRemark; private String joinRemark;
private String joinState; private String joinState;
private Integer adminFlag ; private Integer adminFlag ;
private String chatName ;
private String staffName ;
public String getInvitorUserName() { public String getChatName() {
return chatName;
}
public String getStaffName() {
return staffName;
}
public void setChatName(String chatName) {
this.chatName = chatName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public String getInvitorUserName() {
return invitorUserName; return invitorUserName;
} }
......
...@@ -68,6 +68,7 @@ import com.gic.wechat.api.dto.qywx.chat.GroupChatDetailDTO; ...@@ -68,6 +68,7 @@ import com.gic.wechat.api.dto.qywx.chat.GroupChatDetailDTO;
import com.gic.wechat.api.dto.qywx.chat.GroupChatDetailMemberDTO; import com.gic.wechat.api.dto.qywx.chat.GroupChatDetailMemberDTO;
import com.gic.wechat.api.dto.qywx.chat.GroupChatListDTO; import com.gic.wechat.api.dto.qywx.chat.GroupChatListDTO;
import com.gic.wechat.api.dto.qywx.chat.GroupChatListItemDTO; import com.gic.wechat.api.dto.qywx.chat.GroupChatListItemDTO;
import com.gic.wechat.api.dto.qywx.chat.GroupChatUserIdDTO;
import com.gic.wechat.api.service.qywx.QywxChatApiService; import com.gic.wechat.api.service.qywx.QywxChatApiService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
...@@ -485,9 +486,17 @@ public class GroupChatServiceImpl implements GroupChatService { ...@@ -485,9 +486,17 @@ public class GroupChatServiceImpl implements GroupChatService {
.collect(Collectors.toMap(TabGroupChatUser::getUserId, o -> o, ((k1, k2) -> k1))); .collect(Collectors.toMap(TabGroupChatUser::getUserId, o -> o, ((k1, k2) -> k1)));
List<TabGroupChatUser> needAddUserList = new ArrayList<>(); List<TabGroupChatUser> needAddUserList = new ArrayList<>();
int totalMemberCount = 0; int totalMemberCount = 0;
List<GroupChatUserIdDTO> adminList = detail.getAdmin_list() ;
List<String> adminIdList = adminList.stream().map(dto->dto.getUserid()).collect(Collectors.toList()) ;
for (GroupChatDetailMemberDTO member : memberList) { for (GroupChatDetailMemberDTO member : memberList) {
String userId = member.getUserid(); String userId = member.getUserid();
TabGroupChatUser user = userMap.get(userId); TabGroupChatUser user = userMap.get(userId);
user.setAdminFlag(0);
if(member.getUserid().equals(owner)) {
user.setAdminFlag(1);
}else if(adminIdList.contains(member.getUserid())) {
user.setAdminFlag(2);
}
if (null != user) { if (null != user) {
logger.info("更新用户,id={}", userId); logger.info("更新用户,id={}", userId);
if (StringUtils.isEmpty(user.getMemberId())) { if (StringUtils.isEmpty(user.getMemberId())) {
......
...@@ -108,6 +108,9 @@ public class GroupChatApiServiceImpl implements GroupChatApiService { ...@@ -108,6 +108,9 @@ public class GroupChatApiServiceImpl implements GroupChatApiService {
@Override @Override
public ServiceResponse<Page<GroupChatUserDTO>> listUserPage(GroupChatUserSearchQDTO qdto, public ServiceResponse<Page<GroupChatUserDTO>> listUserPage(GroupChatUserSearchQDTO qdto,
BasePageInfo basePageInfo) { BasePageInfo basePageInfo) {
if(null != qdto.getEndDate()) {
qdto.setEndDate(DateUtil.getEndTimeOfDay(qdto.getEndDate()));
}
Page<GroupChatUserDTO> page = this.groupChatUserService.listPage(qdto, basePageInfo); Page<GroupChatUserDTO> page = this.groupChatUserService.listPage(qdto, basePageInfo);
return ServiceResponse.success(page); return ServiceResponse.success(page);
} }
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
a.chat_user_id chatUserId , a.chat_user_id chatUserId ,
a.user_type userType , a.user_type userType ,
a.join_time joinTime , a.join_time joinTime ,
a.user_name user_name , a.user_name userName ,
a.nick_name nickName , a.nick_name nickName ,
a.member_id memberId , a.member_id memberId ,
a.invitor_user_id invitorUserId, a.invitor_user_id invitorUserId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment