Commit 5d3d0597 by xiongjiangtao

群聊统计

parent 88333fa3
...@@ -12,6 +12,7 @@ import com.gic.web.common.download.DownloadHandlerAbstract; ...@@ -12,6 +12,7 @@ import com.gic.web.common.download.DownloadHandlerAbstract;
import com.gic.web.common.download.context.Context; import com.gic.web.common.download.context.Context;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -45,6 +46,14 @@ public class GroupJoinHandle extends DownloadHandlerAbstract<GroupChatJoinDetai ...@@ -45,6 +46,14 @@ public class GroupJoinHandle extends DownloadHandlerAbstract<GroupChatJoinDetai
if (CollectionUtils.isNotEmpty(list)) { if (CollectionUtils.isNotEmpty(list)) {
List<GroupChatJoinDetailVO> result = JSONObject.parseArray(JSON.toJSONString(list), GroupChatJoinDetailVO.class); 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 result;
} }
return Lists.newArrayList(); return Lists.newArrayList();
...@@ -82,4 +91,32 @@ public class GroupJoinHandle extends DownloadHandlerAbstract<GroupChatJoinDetai ...@@ -82,4 +91,32 @@ public class GroupJoinHandle extends DownloadHandlerAbstract<GroupChatJoinDetai
List<String> list = (List<String>) jsonObject.get("fieldList"); List<String> list = (List<String>) jsonObject.get("fieldList");
return list; 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 ...@@ -68,6 +68,7 @@ public class SingleChatStoreGroupReq extends StoreGroupCommonQO implements Seria
map.put("launchSessionsCustNum", 7); map.put("launchSessionsCustNum", 7);
map.put("launchSessionsSalesNum", 8); map.put("launchSessionsSalesNum", 8);
map.put("sendNewsNum", 9); map.put("sendNewsNum", 9);
map.put("entWechatFdNum", 10);
return map.get(orderByFields) == null ? 1 : map.get(orderByFields); return map.get(orderByFields) == null ? 1 : map.get(orderByFields);
} }
......
...@@ -8,6 +8,7 @@ import org.apache.commons.lang3.StringUtils; ...@@ -8,6 +8,7 @@ import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Objects;
/** /**
* @Author guojx * @Author guojx
...@@ -115,5 +116,8 @@ public class WechatWorkLostDetailQO implements Serializable { ...@@ -115,5 +116,8 @@ public class WechatWorkLostDetailQO implements Serializable {
if (StringUtils.isNotBlank(deleteType)) { if (StringUtils.isNotBlank(deleteType)) {
jsonObject.put("deleteType", 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