Commit ef0566dc by songyinghui

feat: 数据统计

parent 8ba683a1
......@@ -473,12 +473,11 @@ public class GroupMessageServiceImpl implements GroupMessageService {
*/
public List<String> queryMomentResult(String corpid, String userId, Date createTime) {
Date currentTime = new Date();
QywxMomentInfoQDTO qywxMomentInfoQDTO = new QywxMomentInfoQDTO();
qywxMomentInfoQDTO.setCorpid(corpid);
qywxMomentInfoQDTO.setSuiteid(config.getWxSuiteid());
qywxMomentInfoQDTO.setStartTime(DateUtil.addNumForSecond(currentTime, -60).getTime() / 1000);
qywxMomentInfoQDTO.setEndTime(currentTime.getTime() / 1000);
qywxMomentInfoQDTO.setStartTime(DateUtil.addNumForSecond(createTime, -60).getTime() / 1000);
qywxMomentInfoQDTO.setEndTime((createTime.getTime() / 1000) + 10);
qywxMomentInfoQDTO.setCreatorId(userId);
qywxMomentInfoQDTO.setPageSize(20);
ServiceResponse<QywxMomentRespDTO> serviceResponse = qywxSuiteApiService.queryQywxMomentList(qywxMomentInfoQDTO);
......
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.DateUtil;
import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO;
import com.gic.haoban.manage.api.dto.content.log.TriggerCustomerDetailLogDTO;
import com.gic.haoban.manage.api.enums.content.ClerkShareMaterialType;
import com.gic.haoban.manage.api.enums.content.ShareBizType;
import com.gic.haoban.manage.api.enums.content.TriggerCustomerChannelType;
import com.gic.haoban.manage.api.service.content.task.QywxGroupMsgTaskApiService;
import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.pojo.bo.content.ClerkShareLogBO;
import com.gic.haoban.manage.service.pojo.bo.content.GroupMessageInfoBo;
import com.gic.haoban.manage.service.pojo.bo.content.context.PotentialCustomerNotifyContext;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.service.content.ClerkShareLogService;
import com.gic.haoban.manage.service.service.content.GroupMessageService;
import com.gic.haoban.manage.service.service.content.PotentialCustomerService;
import com.gic.wechat.api.dto.qdto.group.QywxMomentInfoQDTO;
import com.gic.wechat.api.dto.qywx.group.QywxMomentRespDTO;
import com.gic.wechat.api.service.qywx.QywxSuiteApiService;
import com.squareup.moshi.Json;
import org.junit.Test;
import org.junit.runner.RunWith;
......@@ -38,6 +44,10 @@ public class GroupMessageServiceTest {
private QywxGroupMsgTaskApiService qywxGroupMsgTaskApiService;
@Autowired
PotentialCustomerService potentialCustomerService;
@Autowired
private WxEnterpriseService wxEnterpriseService;
@Autowired
private QywxSuiteApiService qywxSuiteApiService;
String eid = "ff8080815dacd3a2015dacd3ef5c0000";
......@@ -91,4 +101,22 @@ public class GroupMessageServiceTest {
public void potentialCustomerMessageTest2222(){
qywxGroupMsgTaskApiService.potentialCustomerJob("");
}
@Autowired
private Config config;
@Test
public void queryMomentList(){
WxEnterpriseQwDTO qwInfo = wxEnterpriseService.getQwInfo("ca66a01b79474c40b3e7c7f93daf1a3b");
String corpId = qwInfo.getThirdCorpid();
Date currentTime = new Date();
QywxMomentInfoQDTO qywxMomentInfoQDTO = new QywxMomentInfoQDTO();
qywxMomentInfoQDTO.setCorpid(corpId);
qywxMomentInfoQDTO.setSuiteid(config.getWxSuiteid());
qywxMomentInfoQDTO.setStartTime(1681906454L);
qywxMomentInfoQDTO.setEndTime(1681906519L);
qywxMomentInfoQDTO.setCreatorId("wo59NLDQAAbjSBA575NouC1pUYQgCOtw");
qywxMomentInfoQDTO.setPageSize(20);
ServiceResponse<QywxMomentRespDTO> serviceResponse = qywxSuiteApiService.queryQywxMomentList(qywxMomentInfoQDTO);
System.out.println(JSON.toJSONString(serviceResponse));
}
}
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