修复tab页查询
This commit is contained in:
parent
3dea06e072
commit
8dead25f39
|
@ -296,7 +296,7 @@
|
||||||
/*用户管理-新增-选择部门树*/
|
/*用户管理-新增-选择部门树*/
|
||||||
function selectDeptTree() {
|
function selectDeptTree() {
|
||||||
var treeId = $("#treeId").val();
|
var treeId = $("#treeId").val();
|
||||||
var deptId = $.common.isEmpty(treeId) ? "100" : $("#treeId").val();
|
var deptId = $.common.isEmpty(treeId) ? "1" : $("#treeId").val();
|
||||||
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
var url = ctx + "system/dept/selectDeptTree/" + deptId;
|
||||||
var options = {
|
var options = {
|
||||||
title: '选择部门',
|
title: '选择部门',
|
||||||
|
|
|
@ -3,8 +3,7 @@ package com.snow.framework.web.message;
|
||||||
import com.snow.common.utils.StringUtils;
|
import com.snow.common.utils.StringUtils;
|
||||||
import com.snow.framework.web.domain.common.MessageEventDTO;
|
import com.snow.framework.web.domain.common.MessageEventDTO;
|
||||||
import com.snow.framework.web.message.consumer.SysMarkReadedStrategy;
|
import com.snow.framework.web.message.consumer.SysMarkReadedStrategy;
|
||||||
import com.snow.framework.web.message.producer.SysSendEmailStrategy;
|
import com.snow.framework.web.message.producer.SendMessageCenterStrategy;
|
||||||
import com.snow.framework.web.message.producer.SysSendVisitLogStrategy;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
@ -34,14 +33,12 @@ public class MessageEventHandler implements ApplicationListener<MessageEventDTO>
|
||||||
messageEventContext.setMessageEventTypeStrategy(new TaskTodoStrategy());
|
messageEventContext.setMessageEventTypeStrategy(new TaskTodoStrategy());
|
||||||
break;
|
break;
|
||||||
case "SEND_EMAIL":
|
case "SEND_EMAIL":
|
||||||
messageEventContext.setMessageEventTypeStrategy(new SysSendEmailStrategy());
|
case "SEND_VISIT_LOG":
|
||||||
|
messageEventContext.setMessageEventTypeStrategy(new SendMessageCenterStrategy());
|
||||||
break;
|
break;
|
||||||
case "MARK_READED":
|
case "MARK_READED":
|
||||||
messageEventContext.setMessageEventTypeStrategy(new SysMarkReadedStrategy());
|
messageEventContext.setMessageEventTypeStrategy(new SysMarkReadedStrategy());
|
||||||
break;
|
break;
|
||||||
case "SEND_VISIT_LOG":
|
|
||||||
messageEventContext.setMessageEventTypeStrategy(new SysSendVisitLogStrategy());
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,4 +47,5 @@ public class MessageEventHandler implements ApplicationListener<MessageEventDTO>
|
||||||
//执行
|
//执行
|
||||||
messageEventContext.messageHandle(messageEvent);
|
messageEventContext.messageHandle(messageEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +1,31 @@
|
||||||
package com.snow.framework.web.message.producer;
|
package com.snow.framework.web.message.producer;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import com.snow.common.enums.MessageEventType;
|
|
||||||
import com.snow.common.utils.spring.SpringUtils;
|
import com.snow.common.utils.spring.SpringUtils;
|
||||||
import com.snow.framework.web.domain.common.MessageEventDTO;
|
import com.snow.framework.web.domain.common.MessageEventDTO;
|
||||||
import com.snow.framework.web.message.MessageEventStrategy;
|
import com.snow.framework.web.message.MessageEventStrategy;
|
||||||
import com.snow.system.domain.SysMessageTransition;
|
import com.snow.system.domain.SysMessageTransition;
|
||||||
import com.snow.system.service.ISysMessageTransitionService;
|
import com.snow.system.service.ISysMessageTransitionService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @program: snow
|
* 发送消息到消息中心策略
|
||||||
* @description
|
*/
|
||||||
* @author: 没用的阿吉
|
|
||||||
* @create: 2021-04-17 12:46
|
|
||||||
**/
|
|
||||||
@Component
|
@Component
|
||||||
public class SysSendVisitLogStrategy implements MessageEventStrategy {
|
public class SendMessageCenterStrategy implements MessageEventStrategy {
|
||||||
|
@Resource
|
||||||
@Autowired
|
private ISysMessageTransitionService messageTransitionService= SpringUtils.getBean(ISysMessageTransitionService.class);
|
||||||
private ISysMessageTransitionService messageTransitionService=SpringUtils.getBean(ISysMessageTransitionService.class);
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void messageHandle(MessageEventDTO messageEvent) {
|
public void messageHandle(MessageEventDTO messageEventDTO) {
|
||||||
SysMessageTransition sysMessageTransition=new SysMessageTransition();
|
SysMessageTransition sysMessageTransition=new SysMessageTransition();
|
||||||
BeanUtil.copyProperties(messageEvent,sysMessageTransition);
|
BeanUtil.copyProperties(messageEventDTO,sysMessageTransition);
|
||||||
sysMessageTransition.setMessageType(MessageEventType.SEND_VISIT_LOG.getCode());
|
sysMessageTransition.setMessageType(messageEventDTO.getMessageEventType().getCode());
|
||||||
|
|
||||||
Set<String> consumerId = messageEvent.getConsumerIds();
|
Set<String> consumerId = messageEventDTO.getConsumerIds();
|
||||||
consumerId.forEach(t->{
|
consumerId.forEach(t->{
|
||||||
sysMessageTransition.setConsumerId(t);
|
sysMessageTransition.setConsumerId(t);
|
||||||
messageTransitionService.insertSysMessageTransition(sysMessageTransition);
|
messageTransitionService.insertSysMessageTransition(sysMessageTransition);
|
|
@ -1,41 +0,0 @@
|
||||||
package com.snow.framework.web.message.producer;
|
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
|
||||||
import com.snow.common.enums.MessageEventType;
|
|
||||||
import com.snow.common.utils.spring.SpringUtils;
|
|
||||||
import com.snow.framework.web.domain.common.MessageEventDTO;
|
|
||||||
import com.snow.framework.web.message.MessageEventStrategy;
|
|
||||||
import com.snow.system.domain.SysMessageTransition;
|
|
||||||
import com.snow.system.service.ISysMessageTransitionService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @program: snow
|
|
||||||
* @description 系统发送邮件
|
|
||||||
* @author: 没用的阿吉
|
|
||||||
* @create: 2021-03-30 14:11
|
|
||||||
**/
|
|
||||||
@Component
|
|
||||||
public class SysSendEmailStrategy implements MessageEventStrategy {
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ISysMessageTransitionService messageTransitionService=SpringUtils.getBean(ISysMessageTransitionService.class);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void messageHandle(MessageEventDTO messageEvent) {
|
|
||||||
SysMessageTransition sysMessageTransition=new SysMessageTransition();
|
|
||||||
BeanUtil.copyProperties(messageEvent,sysMessageTransition);
|
|
||||||
sysMessageTransition.setMessageType(MessageEventType.SEND_EMAIL.getCode());
|
|
||||||
|
|
||||||
Set<String> consumerId = messageEvent.getConsumerIds();
|
|
||||||
consumerId.forEach(t->{
|
|
||||||
sysMessageTransition.setConsumerId(t);
|
|
||||||
messageTransitionService.insertSysMessageTransition(sysMessageTransition);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue