Commit 8ef2c30a by 徐高华

社群群发-获取msgid

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