Commit e86186e6 by 徐高华

Merge branch 'feature-canvas' into 'developer'

Feature canvas

See merge request !2339
parents d581a799 9446d68a
......@@ -79,4 +79,10 @@ public interface GroupChatPlanApiService {
public ServiceResponse<Integer> getTotalCount(String enterpriseId,String clerkId,String storeId);
void staffSendResult(StaffSendResultQDTO qdto);
/**
* 获取msgid(非社群群发)
* @return
*/
String getQwMsgId(String staffId , Date sendTime) ;
}
......@@ -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 ;
}
......
package com.gic.haoban.manage.service.service.out.impl.chat;
import com.gic.haoban.manage.api.qdto.StaffSendResultQDTO;
import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -175,4 +176,9 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
public void staffSendResult(StaffSendResultQDTO qdto) {
this.groupChatPlanService.staffSendResult(qdto);
}
@Override
public String getQwMsgId(String staffId, Date sendTime) {
return this.groupChatPlanService.getQwMsgId(staffId,sendTime, GroupMessageServiceImpl.GroupMsgChatType.single);
}
}
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