Commit 5d3d0597 by xiongjiangtao

群聊统计

parent 88333fa3
......@@ -12,6 +12,7 @@ import com.gic.web.common.download.DownloadHandlerAbstract;
import com.gic.web.common.download.context.Context;
import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Component;
......@@ -26,7 +27,7 @@ import java.util.Map;
* @date 2024-06-21 11:34:49
*/
@Component
public class GroupJoinHandle extends DownloadHandlerAbstract<GroupChatJoinDetailVO> {
public class GroupJoinHandle extends DownloadHandlerAbstract<GroupChatJoinDetailVO> {
private static final Logger LOGGER = LogManager.getLogger(GroupJoinHandle.class);
......@@ -45,6 +46,14 @@ public class GroupJoinHandle extends DownloadHandlerAbstract<GroupChatJoinDetai
if (CollectionUtils.isNotEmpty(list)) {
List<GroupChatJoinDetailVO> result = JSONObject.parseArray(JSON.toJSONString(list), GroupChatJoinDetailVO.class);
result.forEach(groupChatJoinDetailVO -> {
if (StringUtils.isNotEmpty(groupChatJoinDetailVO.getUserType())) {
groupChatJoinDetailVO.setUserType(getUserTypeDesc(groupChatJoinDetailVO.getUserType()));
}
if (StringUtils.isNotEmpty(groupChatJoinDetailVO.getJoinScene())) {
groupChatJoinDetailVO.setJoinScene(getJoinSceneDesc(groupChatJoinDetailVO.getJoinScene()));
}
});
return result;
}
return Lists.newArrayList();
......@@ -82,4 +91,32 @@ public class GroupJoinHandle extends DownloadHandlerAbstract<GroupChatJoinDetai
List<String> list = (List<String>) jsonObject.get("fieldList");
return list;
}
private String getUserTypeDesc(String userType) {
switch (userType) {
case "1":
return "内部成员";
case "2":
return "外部成员";
case "3":
return "客户";
default:
return "";
}
}
private String getJoinSceneDesc(String userType) {
switch (userType) {
case "1":
return "群成员直接邀请入群";
case "2":
return "群成员邀请链接入群";
case "3":
return "通过扫描群二维码入群";
default:
return "";
}
}
}
......@@ -68,6 +68,7 @@ public class SingleChatStoreGroupReq extends StoreGroupCommonQO implements Seria
map.put("launchSessionsCustNum", 7);
map.put("launchSessionsSalesNum", 8);
map.put("sendNewsNum", 9);
map.put("entWechatFdNum", 10);
return map.get(orderByFields) == null ? 1 : map.get(orderByFields);
}
......
......@@ -8,6 +8,7 @@ import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* @Author guojx
......@@ -115,5 +116,8 @@ public class WechatWorkLostDetailQO implements Serializable {
if (StringUtils.isNotBlank(deleteType)) {
jsonObject.put("deleteType", deleteType);
}
if (Objects.nonNull(delType)) {
jsonObject.put("delType", delType);
}
}
}
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