Commit 8ef2c30a by 徐高华

社群群发-获取msgid

parent 596b1318
......@@ -7,6 +7,7 @@ import com.gic.haoban.manage.api.dto.chat.GroupChatPlanLogDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatPlanSearchQDTO;
import com.gic.haoban.manage.api.qdto.StaffSendResultQDTO;
import com.gic.haoban.manage.service.pojo.bo.chat.GroupChatPlanBO;
import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl;
import java.util.Date;
......@@ -39,4 +40,6 @@ public interface GroupChatPlanService {
void staffSendResult(StaffSendResultQDTO qdto);
void stopByMsgid(Long planId);
String getQwMsgId(String staffId , Date sendTime, GroupMessageServiceImpl.GroupMsgChatType groupMsgChatType) ;
}
\ No newline at end of file
......@@ -837,9 +837,9 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
}
private String getQwMsgId(String staffId , Date sendTime, GroupMessageServiceImpl.GroupMsgChatType groupMsgChatType) {
Date startTime = DateUtil.addNumForMinute(sendTime,-1) ;
@Override
public String getQwMsgId(String staffId , Date sendTime, GroupMessageServiceImpl.GroupMsgChatType groupMsgChatType) {
Date startTime = DateUtil.addNumForSecond(sendTime,0) ;
Date endTime = DateUtil.addNumForMinute(sendTime,1) ;
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(staffId) ;
String wxEnterpriseId = staff.getWxEnterpriseId() ;
......@@ -851,7 +851,11 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
// 发送到群
List<QywxGroupMessageInfoDTO> msgList = this.queryGroupMsg(groupMsgChatType,startTime, endTime, qwDTO, wxUserId);
if(CollectionUtils.isNotEmpty(msgList)) {
return msgList.get(0).getMsgId() ;
if(msgList.size()==0) {
return msgList.get(0).getMsgId() ;
}else {
return msgList.get(msgList.size()-1).getMsgId() ;
}
}
return null ;
}
......
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