Commit 88d8f231 by 徐高华

统计

parent 77cc8338
......@@ -124,8 +124,8 @@
resultType="com.gic.haoban.manage.api.dto.chat.GroupChatDataDTO">
SELECT
staffId, staffName, `date`, chatTotal, memberTotal,
SUM(newChatCnt), SUM(chatHasMsg), SUM(newMemberCnt),
SUM(memberHasMsg), SUM(msgTotal)
SUM(newChatCnt) newChatCnt, SUM(chatHasMsg) chatHasMsg, SUM(newMemberCnt) newMemberCnt,
SUM(memberHasMsg) memberHasMsg, SUM(msgTotal) msgTotal
FROM
(SELECT
b.staff_name staffName, a.staff_id staffId, a.date `date`,
......
......@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.DateUtil;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
......@@ -39,6 +40,7 @@ public class GroupChatDataController {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
qdto.setWxEnterpriseId(wxEnterpriseId);
qdto.setStartDate(DateUtil.getStartTimeOfDay(qdto.getStartDate()));
ServiceResponse<GroupChatDataDTO> resp = this.groupChatDataApiService.listTotalData(qdto);
GroupChatDataVO vo = EntityUtil.changeEntityByJSON(GroupChatDataVO.class, resp.getResult());
return RestResponse.successResult(vo);
......@@ -49,6 +51,7 @@ public class GroupChatDataController {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
qdto.setWxEnterpriseId(wxEnterpriseId);
qdto.setStartDate(DateUtil.getStartTimeOfDay(qdto.getStartDate()));
ServiceResponse<List<GroupChatDataDTO>> resp = this.groupChatDataApiService.listForChat(qdto);
List<GroupChatDataVO> list = EntityUtil.changeEntityListByJSON(GroupChatDataVO.class, resp.getResult());
return RestResponse.successResult(list);
......@@ -59,6 +62,7 @@ public class GroupChatDataController {
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
String wxEnterpriseId = loginUser.getWxEnterpriseId();
qdto.setWxEnterpriseId(wxEnterpriseId);
qdto.setStartDate(DateUtil.getStartTimeOfDay(qdto.getStartDate()));
ServiceResponse<Page<GroupChatDataDTO>> resp = this.groupChatDataApiService.listStaffData(qdto, basePageInfo);
Page<GroupChatDataDTO> page = resp.getResult();
List<GroupChatDataVO> list = EntityUtil.changeEntityListByJSON(GroupChatDataVO.class, page.getResult());
......
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