Commit d655da90 by 徐高华

社群群发

parent 61331f1b
...@@ -35,6 +35,10 @@ public enum NoticeMessageTypeEnum { ...@@ -35,6 +35,10 @@ public enum NoticeMessageTypeEnum {
CLERK_TASK_SEND_NOTICE(2014, "导购任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "clerk_task_send_notice", "/pages/route/index?pageType=", "hbapp_guide_task_detail", "clerk_task_send_notice", "haobanNotice"), CLERK_TASK_SEND_NOTICE(2014, "导购任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "clerk_task_send_notice", "/pages/route/index?pageType=", "hbapp_guide_task_detail", "clerk_task_send_notice", "haobanNotice"),
GROUP_CHAT_PLAN(2015, "社群群发任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "haobanGroupChatPlan", "/pages/route/index?pageType=", "hbapp_guide_task_detail", "haobanGroupChatPlan", "haobanNotice"),
STORE_ACCOUNT(3001, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index?pageType=", "store_relate_store_record_list", "accountApplication", "haobanNotice"), STORE_ACCOUNT(3001, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index?pageType=", "store_relate_store_record_list", "accountApplication", "haobanNotice"),
// //
MEMBER_FACE(3002, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "member_face", "/pages/route/index?pageType=", "hbapp_customer_edit_tag", "", "haobanNotice"), MEMBER_FACE(3002, "账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "member_face", "/pages/route/index?pageType=", "hbapp_customer_edit_tag", "", "haobanNotice"),
......
package com.gic.haoban.manage.api.util.notify; package com.gic.haoban.manage.api.util.notify;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
......
...@@ -14,7 +14,9 @@ import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; ...@@ -14,7 +14,9 @@ import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.chat.*; import com.gic.haoban.manage.api.dto.chat.*;
import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatSearchQDTO; import com.gic.haoban.manage.api.dto.qdto.chat.GroupChatSearchQDTO;
import com.gic.haoban.manage.api.dto.qdto.chat.OwnerSearchQDTO; import com.gic.haoban.manage.api.dto.qdto.chat.OwnerSearchQDTO;
import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
import com.gic.haoban.manage.api.qdto.StaffSendResultQDTO; import com.gic.haoban.manage.api.qdto.StaffSendResultQDTO;
import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper; import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
import com.gic.haoban.manage.service.dao.mapper.chat.*; import com.gic.haoban.manage.service.dao.mapper.chat.*;
import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl; import com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl;
...@@ -300,6 +302,17 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -300,6 +302,17 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
return Collections.emptyList() ; return Collections.emptyList() ;
} }
private void sendNotice(String enterpriseId, String staffId ,String clerkId , String taskName , Date endTime) {
logger.info("发送社群任务通知,clerkId={}",clerkId);
// 发送通知
Map<String, String> map = new HashMap<>();
map.put("taskName", taskName);
map.put("overTime", DateUtil.dateToStr(endTime,"yyyy-MM-dd HH:mm:ss"));
JSONObject jsonObject = new JSONObject();
int messageType = NoticeMessageTypeEnum.GROUP_CHAT_PLAN.getType();
NoticeMessageUtil.sendNoticeMessageByStaff(enterpriseId,staffId,clerkId,messageType,null,map,jsonObject);
}
@Override @Override
public void doPlan(Long planId) { public void doPlan(Long planId) {
logger.info("开始群群发发送{}", planId); logger.info("开始群群发发送{}", planId);
...@@ -404,7 +417,10 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -404,7 +417,10 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
boolean flag = this.groupChatPlanOwnerLogService.update(ownerLog); boolean flag = this.groupChatPlanOwnerLogService.update(ownerLog);
if(flag) { if(flag) {
// 发送消息 // 发送消息
String enterpriseId = ownerLog.getEnterpriseId() ;
String clerkId = ownerLog.getClerkId() ;
String staffId = ownerLog.getStaffId() ;
this.sendNotice(enterpriseId,staffId,clerkId,plan.getName(),plan.getEndTime());
} }
} }
} }
......
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