Commit 98c2e579 by fudahua

Merge branch 'feature-daiban-12-14' into 'developer'

消息推送

See merge request !145
parents f6682aad 31470aa9
......@@ -5,13 +5,13 @@ package com.gic.haoban.manage.api.enums;
*/
public enum NoticeMessageTypeEnum {
ACTIVITY_START(1001, "活动开始通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_start", "/pages/route/index"),
ACTIVITY_NEW(1002, "活动上新通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_new", "/pages/route/index"),
ACTIVITY_START(1001, "活动开始通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_start", "/pages/route/index?pageType=hbapp_activity_detail"),
ACTIVITY_NEW(1002, "活动上新通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_new", "/pages/route/index?pageType=hbapp_activity_detail"),
ACTIVITY_DEL(1003, "活动删除通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_del", "/pages/route/index"),
ACTIVITY_OFFLINE(1004, "活动下线通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_offline", "/pages/route/index"),
ACTIVITY_END(1005, "活动结束通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_end", "/pages/route/index"),
ACTIVITY_RANK(1006, "活动排名通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_rank", "/pages/route/index"),
ACTIVITY_AWARD(1007, "活动奖励通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_award", "/pages/route/index"),
ACTIVITY_OFFLINE(1004, "活动下线通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_offline", "/pages/route/index?pageType=hbapp_activity_ranking"),
ACTIVITY_END(1005, "活动结束通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_end", "/pages/route/index?pageType=hbapp_activity_ranking"),
ACTIVITY_RANK(1006, "活动排名通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_rank", "/pages/route/index?pageType=hbapp_activity_ranking"),
ACTIVITY_AWARD(1007, "活动奖励通知", NoticeMessageCategoryTypeEnum.ACTIVITY.getType(), "activity_award", "/pages/route/index?pageType=hbapp_activity_ranking"),
TEL_TASK_CREATE(2001, "话务任务通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "task_create", "/pages/route/index?pageType=hbapp_task_list_new"),
TEL_TASK_OVERDUE(2002, "话务任务逾期推送", NoticeMessageCategoryTypeEnum.TASK.getType(), "task_overdue", "/pages/route/index?pageType=hbapp_marketing_task_list"),
......@@ -24,12 +24,12 @@ public enum NoticeMessageTypeEnum {
PERFORMANCE_TASK_CREATE(2007, "指标任务通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "performance_task_create", "/pages/route/index?pageType=hbapp_task_kpi_detail"),
EVALUATE_TASK_CREATE(2008, "不良评价通知", NoticeMessageCategoryTypeEnum.TASK.getType(), "evaluate_task_create", "/pages/route/index?pageType=hbapp_task_detail"),
STORE_ACCOUNT(3001, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index"),
STORE_ACCOUNT(3001, "门店账号申请", NoticeMessageCategoryTypeEnum.OTHER.getType(), "store_account", "/pages/route/index?pageType=store_relate_store_record_list"),
CUSTOMER_MOVE(3002, "客户变动通知", NoticeMessageCategoryTypeEnum.OTHER.getType(), "customer_move", "/pages/route/index"),
CUSTOMER_ORDER_CREATE(4001, "客户下单通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_create", "/pages/route/index"),
CUSTOMER_ORDER_REFUND(4002, "客户退单通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_refund", "/pages/route/index"),
CUSTOMER_ORDER_LOOK(4003, "客户浏览通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_look", "/pages/route/index"),
CUSTOMER_ORDER_CREATE(4001, "客户下单通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_create", "/pages/route/index?pageType=hbapp_customer_order_detail"),
CUSTOMER_ORDER_REFUND(4002, "客户退单通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_refund", "/pages/route/index?pageType=hbapp_customer_order_detail"),
CUSTOMER_ORDER_LOOK(4003, "客户浏览通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_order_look", "/pages/route/index?pageType=hbapp_customer_look_goods"),
CUSTOMER_GET_COUPON(4003, "客户领券通知", NoticeMessageCategoryTypeEnum.CUSTOMER.getType(), "customer_get_coupon", "/pages/route/index"),;
/**
* 消息类型
......
......@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO;
import com.gic.haoban.manage.api.enums.AppPageType;
import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService;
import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil;
import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
......@@ -170,6 +171,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
logger.info("staff不存在,发送消息失败{}",staffId);
return ;
}
String messageTitle = "门店账号申请";
String content = staffDTO.getStaffName()+"申请关联导购code("+clerkCode+")";
JSONObject jsonObject = new JSONObject();
......@@ -217,7 +219,8 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
logger.info("发送参数为corpId============:{},suitId============:{},messageDTO============:{},",corpId, config.getWxSuiteid(), JSONObject.toJSONString(messageDTO));
boolean b = qywxSuiteApiService.sendMessage(corpId,config.getWxSuiteid(), messageDTO);
logger.info("发送===============》{}",b);
logger.info("发送===============》{}",b);
}
//导购绑定,,审核记录,,消息发送
@Override
......
......@@ -27,6 +27,7 @@ import com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi;
import com.gic.haoban.manage.api.dto.*;
import com.gic.haoban.manage.api.enums.*;
import com.gic.haoban.manage.api.service.*;
import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.qo.CommonQO;
import com.gic.haoban.manage.web.vo.*;
......@@ -874,20 +875,33 @@ public class ClerkController extends WebBaseController {
audit.setCommitTime(new Date());
audit.setAuditType(2);
auditApiService.insert(audit);
//TODO huang 发送店长,门店关联记录列表
String messageTitle = "门店账号申请";
String messageContent = staff.getStaffName()+"申请关联导购code("+clerkCode+")";
JSONObject jsonObject = new JSONObject();
jsonObject.put("storeId", clerk.getStoreId());
String data = jsonObject.toJSONString();
ClerkDTO gicClerk = clerkService.getClerkLeaderByStoreId(clerk.getStoreId());
if(gicClerk == null){
//店长不存在,直接返回
return resultResponse(HaoBanErrCode.ERR_1);
}
String pageUrl = staffDepartmentRelatedApiService.getPageUrl(AppPageType.STORE_RELATED_RECORD.getCode(), data);
staffDepartmentRelatedApiService.sendSingleMessage(gicClerk.getClerkId(), messageTitle, messageContent, pageUrl);
//
// //TODO huang 发送店长,门店关联记录列表
// String messageTitle = "门店账号申请";
// String messageContent = staff.getStaffName()+"申请关联导购code("+clerkCode+")";
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("storeId", clerk.getStoreId());
// String data = jsonObject.toJSONString();
// ClerkDTO gicClerk = clerkService.getClerkLeaderByStoreId(clerk.getStoreId());
// if(gicClerk == null){
// //店长不存在,直接返回
// return resultResponse(HaoBanErrCode.ERR_1);
// }
// String pageUrl = staffDepartmentRelatedApiService.getPageUrl(AppPageType.STORE_RELATED_RECORD.getCode(), data);
// staffDepartmentRelatedApiService.sendSingleMessage(gicClerk.getClerkId(), messageTitle, messageContent, pageUrl);
Map<String, String> fieldMap = new HashMap<String, String>();
fieldMap.put("staffName", staff.getStaffName());
fieldMap.put("clerkName", clerk.getClerkName());
JSONObject jsonObject = new JSONObject();
jsonObject.put("storeId", clerk.getStoreId());
NoticeMessageUtil.sendNoticeMessage(clerk.getEnterpriseId()
, clerk.getClerkId()
, NoticeMessageTypeEnum.STORE_ACCOUNT.getType()
, null, fieldMap, jsonObject);
return resultResponse(HaoBanErrCode.ERR_1);
}
......
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