Commit 5c165903 by 徐高华

社群群发

parent 5c8e6fe8
......@@ -6,7 +6,7 @@ public class ContentMaterialDTO implements Serializable {
private static final long serialVersionUID = -8114034921530488238L;
// 素材类型, 1文本, 2图片, 3网页, 4视频, 5文件,6小程序
// 素材类型, 1文本, 2图片, 3网页, 4视频, 5文件,6小程序 7 卡券
private int materialType;
private String imgUrl;
......@@ -19,6 +19,36 @@ public class ContentMaterialDTO implements Serializable {
*/
private String videoImgUrl;
private String appid ;
private int type ;
private String materialTitle ;
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getMaterialTitle() {
return materialTitle;
}
public void setMaterialTitle(String materialTitle) {
this.materialTitle = materialTitle;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public int getMediaType() {
return mediaType;
}
......
......@@ -62,6 +62,16 @@ public class GroupChatPlanDTO implements Serializable {
private int sendAllFlag ;
// 所有的群发条件
private String allSearchParams ;
// 执行方式 0企微1好办小程序
private int execType ;
public int getExecType() {
return execType;
}
public void setExecType(int execType) {
this.execType = execType;
}
public String getAllSearchParams() {
return allSearchParams;
......
......@@ -139,4 +139,10 @@ public interface HaobanTimerApiService {
* @param params
*/
void groupChatActivityTime(String params);
/**
* 群群发获取msgid
* @param params
*/
void groupChatMsgidTimer(String params) ;
}
......@@ -27,6 +27,7 @@ public class NoticeMessageUtil {
private static final Logger logger = getLogger(NoticeMessageUtil.class);
//com.gic.haoban.manage.api.service.notify.NoticeMessageApiService#run
private static final String NOTICE_MESSAGE = "haobanNoticeMessage";
private static final String NOTICE_MESSAGE_BATCH = "haobanNoticeMessageBatch";
......
......@@ -53,4 +53,10 @@ public interface GroupChatPlanOwnerLogMapper {
* @return
*/
Integer getTotalCount(@Param("enterpriseId")String enterpriseId,@Param("clerkId")String clerkId,@Param("storeId")String storeId);
void updateExecType(@Param("planId")Long planId , @Param("execType")int execType) ;
List<GroupChatPlanOwnerLogDTO> listForMsgid() ;
void updateMsgid(@Param("planId")Long id , @Param("msgid")String msgid) ;
}
\ No newline at end of file
......@@ -32,6 +32,7 @@ public class TabMaterialContent implements Serializable {
private java.util.Date createTime;
/**修改时间*/
private java.util.Date updateTime;
// 1群发 2朋友圈
private int mediaType ;
/**
......@@ -39,6 +40,26 @@ public class TabMaterialContent implements Serializable {
*/
private String videoImgUrl;
private String appid ;
private String materialTitle ;
public String getMaterialTitle() {
return materialTitle;
}
public void setMaterialTitle(String materialTitle) {
this.materialTitle = materialTitle;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public int getMediaType() {
return mediaType;
}
......
......@@ -58,6 +58,17 @@ public class TabGroupChatPlan implements Serializable {
// 所有的群发条件
private String allSearchParams ;
// 执行方式 0企微1好办小程序
private int execType ;
public int getExecType() {
return execType;
}
public void setExecType(int execType) {
this.execType = execType;
}
public String getAllSearchParams() {
return allSearchParams;
}
......
......@@ -34,6 +34,15 @@ public class TabGroupChatPlanOwnerLog implements Serializable {
private Integer doneFlag;
private Integer deleteFlag;
private Date sendTime;
private int execType ;
public int getExecType() {
return execType;
}
public void setExecType(int execType) {
this.execType = execType;
}
public Integer getFailCount() {
return failCount;
......
......@@ -57,6 +57,16 @@ public class GroupChatPlanBO implements Serializable{
private int sendAllFlag ;
// 所有的群发条件
private String allSearchParams ;
// 执行方式 0企微1好办小程序
private int execType ;
public int getExecType() {
return execType;
}
public void setExecType(int execType) {
this.execType = execType;
}
public String getAllSearchParams() {
return allSearchParams;
......
......@@ -57,6 +57,7 @@ public interface MaterialService {
public JSONResponse reUpdalodMetailJson(String materialId,int from) ;
//mediaType1群发 2朋友圈
public List<String> getImageMediaId(String wxEnterpriseId, List<ContentMaterialDTO> imageList, int mediaType) ;
List<MaterialDTO> listContentMaterialByIds(List<String> materialIds,Integer mediaType);
......
......@@ -29,4 +29,5 @@ public interface GroupChatPlanService {
public void updateRemark(GroupChatPlanDTO dto);
void groupChatMsgidTimer(String params);
}
\ No newline at end of file
......@@ -128,6 +128,7 @@ public class GroupChatPlanOwnerLogServiceImpl implements GroupChatPlanOwnerLogSe
log.setUpdateTime(new Date());
log.setSendCount(0);
log.setStaffId(staffId);
log.setExecType(entity.getExecType());
logList.add(log);
}
this.groupChatPlanOwnerLogMapper.batchInsert(logList);
......
......@@ -11,16 +11,19 @@ import com.gic.enterprise.api.dto.EnterpriseDTO;
import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.haoban.manage.api.dto.ContentMaterialDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.chat.ChatContentDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatOwnerDTO;
import com.gic.haoban.manage.api.dto.chat.*;
import com.gic.haoban.manage.api.dto.qdto.chat.OwnerSearchQDTO;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
import com.gic.haoban.manage.service.dao.mapper.chat.GroupChatOwnerMapper;
import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl;
import com.gic.haoban.manage.service.util.StreamUtils;
import com.gic.thirdparty.cloudfile.CloudFileUtil;
import com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum;
import com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum;
import com.gic.thirdparty.cloudfile.pojo.CloudFileInfo;
import com.gic.wechat.api.dto.qdto.group.QywxGroupMessageQDTO;
import com.gic.wechat.api.dto.qywx.group.QywxGroupMessageInfoDTO;
import com.gic.wechat.api.dto.qywx.group.QywxGroupMsgResp;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
......@@ -46,8 +49,6 @@ import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.common.utils.DingUtils;
import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO;
import com.gic.haoban.manage.api.dto.chat.GroupChatPlanDTO;
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.enums.PendingTaskTypeEnum;
import com.gic.haoban.manage.api.enums.chat.PlanSendStatusEnum;
......@@ -185,6 +186,9 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
this.groupChatPlanMapper.updateById(entity);
// 删除本次删除的
this.groupChatPlanOwnerLogService.deleteByStaffIds(planId, dto.getDelStaffIdList());
if(old.getExecType() != dto.getExecType()) {
this.groupChatPlanOwnerLogMapper.updateExecType(planId,dto.getExecType());
}
}
// 新增群主日志
this.groupChatPlanOwnerLogService.batchAdd(staffIdList, entity);
......@@ -347,7 +351,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
}
}
int pageNum = 0;
List<TabGroupChatPlanOwnerLog> ownerList = null;
int sendAlFlag = plan.getSendAllFlag() ;
String allSearchParams = plan.getAllSearchParams() ;
......@@ -387,6 +390,22 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
this.groupChatPlanMapper.updateStaffCount(planId,totalCount);
}
int pageNum = 0;
if(plan.getExecType() == 1) {
logger.info("好办小程序执行={}",planId);
// 发送消息
while (true) {
ownerList = this.groupChatPlanOwnerLogMapper.listForDoPlan(planId, pageNum * pageSize, pageSize);
if (CollectionUtils.isEmpty(ownerList)) {
break;
}
pageNum++;
for (TabGroupChatPlanOwnerLog ownerLog : ownerList) {
}
}
return;
}
while (true) {
ownerList = this.groupChatPlanOwnerLogMapper.listForDoPlan(planId, pageNum * pageSize, pageSize);
if (CollectionUtils.isEmpty(ownerList)) {
......@@ -670,4 +689,69 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
this.groupChatPlanMapper.updateRemark(dto);
}
@Override
public void groupChatMsgidTimer(String params) {
logger.info("社群群发获取msgid");
List<GroupChatPlanOwnerLogDTO> list = this.groupChatPlanOwnerLogMapper.listForMsgid();
if(CollectionUtils.isNotEmpty(list)) {
for(GroupChatPlanOwnerLogDTO dto : list) {
this.updateMsgid(dto);
}
}
}
private void updateMsgid(GroupChatPlanOwnerLogDTO dto) {
Long ownerLogId = dto.getOwnerLogId() ;
String staffId = dto.getStaffId() ;
Date sendTime = dto.getSendTime() ;
String msgid = this.getQwMsgId(staffId,sendTime,GroupMessageServiceImpl.GroupMsgChatType.group) ;
if(null != msgid) {
logger.info("获取msgid={},{}",ownerLogId,msgid);
this.groupChatPlanOwnerLogMapper.updateMsgid(ownerLogId,msgid);
}
}
private String getQwMsgId(String staffId , Date sendTime, GroupMessageServiceImpl.GroupMsgChatType groupMsgChatType) {
Date startTime = DateUtil.addNumForMinute(sendTime,-5) ;
Date endTime = DateUtil.addNumForMinute(sendTime,5) ;
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(staffId) ;
String wxEnterpriseId = staff.getWxEnterpriseId() ;
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
String wxUserId = staff.getWxUserId() ;
if(qwDTO.needOpenUserId3th()) {
wxUserId = staff.getWxOpenUseId() ;
}
// 发送到群
List<QywxGroupMessageInfoDTO> msgList = this.queryGroupMsg(GroupMessageServiceImpl.GroupMsgChatType.single,
startTime, endTime, qwDTO, wxUserId);
System.out.println("查询到={}"+JSONObject.toJSONString(msgList));
if(CollectionUtils.isNotEmpty(msgList)) {
return msgList.get(0).getMsgId() ;
}
return null ;
}
private List<QywxGroupMessageInfoDTO> queryGroupMsg(GroupMessageServiceImpl.GroupMsgChatType groupMsgChatType, Date startTime, Date endTime , WxEnterpriseQwDTO qwDTO , String qwUserId) {
List<QywxGroupMessageInfoDTO> groupMessageInfos = new ArrayList<>();
QywxGroupMessageQDTO qdto = new QywxGroupMessageQDTO();
qdto.setCorpid(qwDTO.getThirdCorpid());
qdto.setCreator(qwUserId);
qdto.setStartTime(startTime.getTime() / 1000);
qdto.setEndTime(endTime.getTime() / 1000);
qdto.setSuiteid(qwDTO.getSelf3thSecret());
qdto.setChatType(groupMsgChatType.getCode());
qdto.setPageSize(100);
ServiceResponse<QywxGroupMsgResp> serviceResponse =
qywxSuiteApiService.queryQywxGroupMessageList(qdto,qwDTO.isSelf(),qwDTO.getUrlHost());
logger.info("{},{}",JSONObject.toJSONString(qdto),JSONObject.toJSONString(serviceResponse));
if (!serviceResponse.isSuccess() || CollectionUtils.isEmpty(serviceResponse.getResult().getGroupMessageInfos())) {
logger.info("获取群发任务记录异常 {}", JSON.toJSONString(serviceResponse));
return Collections.emptyList();
}
QywxGroupMsgResp groupMsgResp = serviceResponse.getResult();
List<QywxGroupMessageInfoDTO> tempMessageInfos = groupMsgResp.getGroupMessageInfos();
groupMessageInfos.addAll(tempMessageInfos);
return groupMessageInfos;
}
}
\ No newline at end of file
......@@ -141,7 +141,7 @@ public class MaterialServiceImpl implements MaterialService {
Integer materialType = materialDTO.getMaterialType();
String madiaId = materialDTO.getMediaId();
//需要上传的类型
List<Integer> typeList = Arrays.asList(2, 4, 5, 6);
List<Integer> typeList = Arrays.asList(2, 4, 5, 6 , 7);
if (typeList.contains(materialType)) {
madiaId = this.reUpdalodMetail(materialId,from);
}
......@@ -201,7 +201,7 @@ public class MaterialServiceImpl implements MaterialService {
if (type == 5) {
fileType = QywxMediaTypeEnum.FILE;
url = old.getLink();
} else if (type == 6) {
} else if (type == 6 || type ==7) {
fileType = QywxMediaTypeEnum.IMAGE;
url = old.getImgUrl();
}
......@@ -299,7 +299,7 @@ public class MaterialServiceImpl implements MaterialService {
imageList.forEach(dto -> {
String imageUrl = dto.getImgUrl();
int type = dto.getMaterialType();
String md5 = Md5Util.MD5(imageUrl);
String md5 = Md5Util.MD5(imageUrl+type);
TabMaterialContent tab = this.materialContentMapper.selectByUrl(wxEnterpriseId, md5, mediaType);
if (null != tab) {
Integer materialType = tab.getMaterialType();
......@@ -318,6 +318,7 @@ public class MaterialServiceImpl implements MaterialService {
tab.setMediaType(mediaType);
tab.setWxEnterpriseId(wxEnterpriseId);
tab.setVideoImgUrl(dto.getVideoImgUrl());
tab.setAppid(dto.getAppid());
this.materialContentMapper.insert(tab);
materialIdList.add(id);
}
......
......@@ -4,6 +4,10 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.gic.commons.util.DateUtil;
import com.gic.enterprise.api.dto.EnterpriseWxaRelationDTO;
import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.enterprise.api.service.EnterpriseWxaLinkService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
......@@ -67,6 +71,10 @@ public class QywxSendServiceImpl implements QywxSendService {
private QywxExternalUserService qywxExternalUserService;
@Autowired
private TabHaobanStaffClerkRelationMapper tabHaobanStaffClerkRelationMapper;
@Autowired
private EnterpriseWxaLinkService enterpriseWxaLinkService ;
@Autowired
private EnterpriseService enterpriseService ;
private static final String single = "single" ;
private static final String group = "group" ;
......@@ -221,12 +229,23 @@ public class QywxSendServiceImpl implements QywxSendService {
videoMaterialDTO.setMediaId(maerialId);
dto.setMsgType(QywxMediaTypeEnum.VIDEO.getName());
dto.setVideo(videoMaterialDTO);
} else if (materialType == 6) {
} else if (materialType == 6 || materialType == 7) {
QywxMiniprogramMaterialDTO miniprogramMaterialDTO = new QywxMiniprogramMaterialDTO();
miniprogramMaterialDTO.setTitle(material.getMaterialTitle());
miniprogramMaterialDTO.setPicMediaId(maerialId);
miniprogramMaterialDTO.setAppid(material.getAppId());
miniprogramMaterialDTO.setPage(material.getLink());
// 卡券
if(materialType==7) {
String nodeId = "736591066084777985";
String canvasId = "1123" ;
String execLogId = "111" ;
Long sendTime = DateUtil.getStartTimeOfDay().getTime() ;
String str = "{\"id\":48,\"url\":\"/pages/member-center/coupon/coupon-group-get/coupon-group-get?execLogId="+execLogId+"&canvasId="+canvasId+"&time="+sendTime+"&nodeId="+nodeId+"\"}" ;
EnterpriseWxaRelationDTO en = this.enterpriseService.getByWxappkey(material.getAppId()) ;
Map<String, Object> map = this.enterpriseWxaLinkService.getWxaLinkAndQrCode(en.getEnterpriseId(),str) ;
miniprogramMaterialDTO.setPage(map.get("link").toString());
}
if(null != planType && StringUtils.isNotBlank(planId)) {
String url = "qtActivityType="+planType+"&qtActivityId="+planId ;
if(material.getLink().contains("?")) {
......
......@@ -8,9 +8,7 @@ import com.gic.haoban.manage.service.dao.mapper.hm.WxUserAddLogMapper;
import com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated;
import com.gic.haoban.manage.service.entity.hm.TabWxUserAddLog;
import com.gic.haoban.manage.service.service.*;
import com.gic.haoban.manage.service.service.chat.GroupChatActivityInviteLogService;
import com.gic.haoban.manage.service.service.chat.GroupChatActivityService;
import com.gic.haoban.manage.service.service.chat.GroupChatDataService;
import com.gic.haoban.manage.service.service.chat.*;
import com.gic.haoban.manage.service.util.DingUtils;
import com.gic.haoban.manage.service.util.HBQwMonitorUtils;
import com.gic.redis.data.util.RedisUtil;
......@@ -24,7 +22,6 @@ import org.springframework.stereotype.Service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.service.HaobanTimerApiService;
import com.gic.haoban.manage.service.service.chat.GroupChatService;
import com.gic.haoban.manage.service.service.hm.HmQrcodeTempService;
import java.util.*;
......@@ -58,6 +55,8 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
private OpenStaffService openStaffService ;
@Autowired
private GroupChatActivityService groupChatActivityService;
@Autowired
private GroupChatPlanService groupChatPlanService ;
@Override
......@@ -195,4 +194,9 @@ public class HaobanTimerApiServiceImpl implements HaobanTimerApiService {
public void groupChatActivityTime(String params) {
groupChatActivityService.activityQuartzUpdateStatus();
}
@Override
public void groupChatMsgidTimer(String params) {
this.groupChatPlanService.groupChatMsgidTimer(params) ;
}
}
......@@ -251,5 +251,6 @@
<dubbo:reference id="memberTagEsApiService" interface="com.gic.member.tag.api.service.MemberTagEsApiService" timeout="100000" retries="0" check="false"/>
<dubbo:reference id="memberCrowdApiService" interface="com.gic.member.ext.api.service.MemberCrowdApiService" timeout="10000" retries="0" check="false"/>
<dubbo:reference id="coupCardDistributionService" interface="com.gic.marketing.api.service.CoupCardDistributionService" timeout="30000" retries="0" check="false"/>
<dubbo:reference id="enterpriseWxaLinkService" interface="com.gic.enterprise.api.service.EnterpriseWxaLinkService" timeout="30000" retries="0" check="false"/>
</beans>
\ No newline at end of file
......@@ -14,6 +14,8 @@
<result column="update_time" property="updateTime"/>
<result column="media_type" property="mediaType" />
<result column="video_img_url" property="videoImgUrl" />
<result column="app_id" property="appid" />
<result column="material_title" property="materialTitle" />
</resultMap>
<sql id="Base_Column_List">
material_id,
......@@ -26,7 +28,7 @@
status_flag,
create_time,
update_time , media_type,
video_img_url
video_img_url , app_id , material_title
</sql>
<!-- ===================== 新增 ======================== -->
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabMaterialContent" useGeneratedKeys="true" keyProperty="id">
......@@ -43,7 +45,7 @@
create_time,
update_time ,
media_type,
video_img_url
video_img_url , app_id , material_title
)VALUES(
#{materialId,jdbcType=VARCHAR},
#{materialType,jdbcType=INTEGER},
......@@ -54,7 +56,7 @@
#{urlMd5,jdbcType=VARCHAR},
1,
now(),
now() , #{mediaType},#{videoImgUrl}
now() , #{mediaType},#{videoImgUrl} , #{appid} , #{materialTitle}
)
]]>
</insert>
......
......@@ -30,6 +30,7 @@
<result column="material_from" property="materialFrom" />
<result column="send_all_flag" property="sendAllFlag" />
<result column="all_search_params" property="allSearchParams" />
<result column="exec_type" property="execType" />
</resultMap>
<sql id="Base_Column_List">
plan_id,
......@@ -53,7 +54,7 @@
success_chat_count,
fail_chat_count ,
wx_enterprise_id , enterprise_id , send_flag ,
material_from , send_all_flag , all_search_params
material_from , send_all_flag , all_search_params , exec_type
</sql>
<!-- ===================== 新增 ======================== -->
<insert id="insert"
......@@ -80,7 +81,7 @@
send_count,
success_chat_count,
fail_chat_count , wx_enterprise_id , enterprise_id , delete_flag , send_flag,
material_from , send_all_flag , all_search_params
material_from , send_all_flag , all_search_params , exec_type
)VALUES(
#{planId},
#{name},
......@@ -102,7 +103,7 @@
#{sendCount},
#{successChatCount},
#{failChatCount} , #{wxEnterpriseId} , #{enterpriseId} , 0 , 1,
#{materialFrom} , #{sendAllFlag} , #{allSearchParams}
#{materialFrom} , #{sendAllFlag} , #{allSearchParams} , #{execType}
)
]]>
</insert>
......@@ -147,7 +148,8 @@
expire_days=#{expireDays},
material_from=#{materialFrom} ,
send_all_flag = #{sendAllFlag} ,
all_search_params = #{allSearchParams}
all_search_params = #{allSearchParams} ,
exec_type = #{execType}
where plan_id = #{planId}
]]>
</update>
......
......@@ -31,7 +31,7 @@
send_status,
send_count,
create_time,
update_time , remark , msgid , delete_flag , done_flag , send_time , fail_count
update_time , remark , msgid , delete_flag , done_flag , send_time , fail_count , exec_type
</sql>
<!-- ===================== 新增 ======================== -->
......@@ -48,7 +48,7 @@
send_count,
fail_count,
create_time,
update_time , remark , msgid , delete_flag , done_flag
update_time , remark , msgid , delete_flag , done_flag , exec_type
)VALUES
<foreach collection="list" item="item" separator="," >
( #{item.ownerLogId,jdbcType=BIGINT},
......@@ -62,7 +62,7 @@
0,
0,
#{item.createTime},
#{item.updateTime} , #{item.remark} , #{item.msgid} , 0 , 0
#{item.updateTime} , #{item.remark} , #{item.msgid} , 0 , 0 , #{execType}
)
</foreach>
</insert>
......@@ -96,6 +96,13 @@
update_time = now() where owner_log_id = #{id}
]]>
</update>
<update id="updateExecType">
update tab_haoban_group_chat_plan_owner_log set exec_type =#{execType} where plan_id=#{planId} and delete_flag = 0
</update>
<update id="updateMsgid">
update tab_haoban_group_chat_plan_owner_log set msg_id=#{msgid} where owner_log_id = #{id}
</update>
<!-- ============ 查询=============-->
<select id="selectById" parameterType="long" resultMap="result-map-tabHaobanGroupChatPlanOwnerLog">
......@@ -128,7 +135,7 @@
a.send_time sendTime ,
a.create_time createTime ,
a.done_flag doneFlag ,
a.msgid msgid
a.msgid msgid , a.exec_type execType
from tab_haoban_group_chat_plan_owner_log a left join tab_haoban_staff b on a.staff_id = b.staff_id
where
a.wx_enterprise_id = #{wxEnterpriseId} and a.plan_id = #{planId} and a.delete_flag = 0
......@@ -257,6 +264,15 @@
AND b.end_time >= now()
</select>
<select id="listForMsgid" resultType="com.gic.haoban.manage.api.dto.chat.GroupChatPlanOwnerLogDTO">
SELECT
a.owner_log_id ownerLogId ,
b.plan_id planId ,
a.staff_id staffId ,
a.send_time sendTime
FROM tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
WHERE b.exec_type = 1 AND a.send_status = 2 AND a.msgid IS NULL
</select>
</mapper>
\ No newline at end of file
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