新增报表管理
This commit is contained in:
parent
5d08d9c8d9
commit
cd4a7be7f5
|
@ -27,7 +27,7 @@
|
|||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.10</version>
|
||||
</dependency>
|
||||
<!--jimureport-->
|
||||
<!--积木报表-->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.jimureport</groupId>
|
||||
<artifactId>spring-boot-starter-jimureport</artifactId>
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
package com.snow.web.controller.system;
|
||||
|
||||
import com.snow.common.core.controller.BaseController;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
*/
|
||||
/**
|
||||
* @program: snow
|
||||
* @description
|
||||
* @author: 没用的阿吉
|
||||
* @create: 2021-04-27 20:31
|
||||
**//*
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/report")
|
||||
@Slf4j
|
||||
public class ReportController extends BaseController
|
||||
{
|
||||
|
||||
private String prefix = "/jmreport";
|
||||
|
||||
|
||||
*/
|
||||
/**
|
||||
* 报表设计器
|
||||
* @return
|
||||
*//*
|
||||
|
||||
@RequiresPermissions("system:jmreport:design")
|
||||
@GetMapping("/list")
|
||||
public String reportDesign()
|
||||
{
|
||||
|
||||
return redirect(prefix+"/list");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequiresPermissions("system:jmreport:design")
|
||||
@GetMapping()
|
||||
public String flow()
|
||||
{
|
||||
return redirect(prefix+"/list");
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
|
@ -1,5 +1,6 @@
|
|||
package com.snow.web.controller.system;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.snow.common.config.Global;
|
||||
import com.snow.common.constant.ShiroConstants;
|
||||
|
@ -7,6 +8,7 @@ import com.snow.common.core.controller.BaseController;
|
|||
import com.snow.common.core.domain.AjaxResult;
|
||||
import com.snow.common.core.text.Convert;
|
||||
import com.snow.common.enums.DingFlowTaskType;
|
||||
import com.snow.common.enums.MessageEventType;
|
||||
import com.snow.common.utils.CookieUtils;
|
||||
import com.snow.common.utils.DateUtils;
|
||||
import com.snow.common.utils.ServletUtils;
|
||||
|
@ -25,6 +27,7 @@ import com.snow.system.service.impl.SysNoticeServiceImpl;
|
|||
import com.snow.system.service.impl.SysOaEmailServiceImpl;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -37,6 +40,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import javax.servlet.http.HttpSession;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 首页 业务处理
|
||||
|
@ -69,7 +73,7 @@ public class SysIndexController extends BaseController
|
|||
private ISysOperLogService operLogService;
|
||||
|
||||
@Autowired
|
||||
private ISysDingHiTaskService iSysDingHiTaskService;
|
||||
private ISysMessageTransitionService sysMessageTransitionService;
|
||||
|
||||
@Autowired
|
||||
private ISysDingRuTaskService sysDingRuTaskService;
|
||||
|
@ -81,6 +85,10 @@ public class SysIndexController extends BaseController
|
|||
@Autowired
|
||||
private SysNoticeServiceImpl sysNoticeService;
|
||||
|
||||
@Value("${is.notice}")
|
||||
private Boolean isNotice;
|
||||
|
||||
|
||||
// 系统首页
|
||||
@GetMapping("/index")
|
||||
public String index(ModelMap mmap)
|
||||
|
@ -101,13 +109,30 @@ public class SysIndexController extends BaseController
|
|||
mmap.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
|
||||
mmap.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
|
||||
|
||||
mmap.put("isNewNotice",isNotice);
|
||||
List<SysOaEmail> myNoReadOaEmailList = sysOaEmailService.getMyNoReadOaEmailList(String.valueOf(user.getUserId()));
|
||||
mmap.put("emailListSize",myNoReadOaEmailList.size());
|
||||
//如果大于三条只取前三条记录
|
||||
if(CollectionUtils.isNotEmpty(myNoReadOaEmailList)&&myNoReadOaEmailList.size()>3){
|
||||
myNoReadOaEmailList=myNoReadOaEmailList.subList(0,3);
|
||||
}
|
||||
|
||||
mmap.put("emailList",myNoReadOaEmailList);
|
||||
|
||||
|
||||
SysMessageTransition sysMessageTransition=new SysMessageTransition();
|
||||
sysMessageTransition.setConsumerId(String.valueOf(user.getUserId()));
|
||||
sysMessageTransition.setMessageStatus(0L);
|
||||
sysMessageTransition.setMessageReadStatus(0L);
|
||||
List<SysMessageTransition> sysMessageTransitions = sysMessageTransitionService.selectSysMessageTransitionList(sysMessageTransition);
|
||||
//如果大于三条只取前三条记录
|
||||
if(CollectionUtils.isNotEmpty(sysMessageTransitions)&&sysMessageTransitions.size()>5){
|
||||
sysMessageTransitions=sysMessageTransitions.subList(0,5);
|
||||
|
||||
}
|
||||
SysMessageTransition.init(sysMessageTransitions);
|
||||
mmap.put("sysMessageList",sysMessageTransitions);
|
||||
mmap.put("sysMessageSize",sysMessageTransitions.size());
|
||||
// 菜单导航显示风格
|
||||
String menuStyle = configService.selectConfigByKey("sys.index.menuStyle");
|
||||
// 移动端,默认使左侧导航菜单,否则取默认配置
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package com.snow.web.controller.system;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.snow.common.annotation.Log;
|
||||
import com.snow.common.annotation.RepeatSubmit;
|
||||
import com.snow.common.core.controller.BaseController;
|
||||
import com.snow.common.core.domain.AjaxResult;
|
||||
import com.snow.common.core.page.TableDataInfo;
|
||||
import com.snow.common.enums.BusinessType;
|
||||
import com.snow.common.enums.MessageEventType;
|
||||
import com.snow.common.utils.poi.ExcelUtil;
|
||||
import com.snow.flowable.config.FlowIdGenerator;
|
||||
import com.snow.framework.util.ShiroUtils;
|
||||
|
@ -21,7 +23,9 @@ import org.springframework.stereotype.Controller;
|
|||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 消息模板Controller
|
||||
|
@ -43,13 +47,26 @@ public class SysMessageCenterController extends BaseController
|
|||
|
||||
@RequiresPermissions("system:messageCenter:view")
|
||||
@GetMapping()
|
||||
public String messageCenter()
|
||||
public String messageCenter(ModelMap mmap)
|
||||
{
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
SysMessageTransition sysMessageTransition=new SysMessageTransition();
|
||||
sysMessageTransition.setConsumerId(String.valueOf(sysUser.getUserId()));
|
||||
sysMessageTransition.setMessageStatus(0L);
|
||||
List<SysMessageTransition> sysMessageTransitions = sysMessageTransitionService.selectSysMessageTransitionList(sysMessageTransition);
|
||||
|
||||
if(CollectionUtil.isNotEmpty(sysMessageTransitions)){
|
||||
List<SysMessageTransition> visitLogsList = sysMessageTransitions.stream().filter(t -> t.getMessageType().equals(MessageEventType.SEND_VISIT_LOG.getCode())).collect(Collectors.toList());
|
||||
SysMessageTransition.init(visitLogsList);
|
||||
mmap.put("visitLogs",visitLogsList);
|
||||
}
|
||||
|
||||
if(CollectionUtil.isNotEmpty(sysMessageTransitions)){
|
||||
List<SysMessageTransition> emailList = sysMessageTransitions.stream().filter(t -> t.getMessageType().equals(MessageEventType.SEND_EMAIL.getCode())).collect(Collectors.toList());
|
||||
SysMessageTransition.init(emailList);
|
||||
mmap.put("emailList",emailList);
|
||||
}
|
||||
|
||||
return prefix + "/messageCenter";
|
||||
}
|
||||
|
||||
|
|
|
@ -349,4 +349,19 @@ public class SysOaCustomerController extends BaseController
|
|||
{
|
||||
return toAjax(sysOaCustomerVisitLogService.deleteSysOaCustomerVisitLogByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 消息详情页
|
||||
*/
|
||||
@GetMapping("/messageDetail/{id}")
|
||||
public String messageDetail(@PathVariable("id") Long id)
|
||||
{
|
||||
|
||||
SysOaCustomerVisitLog sysOaCustomerVisitLog=sysOaCustomerVisitLogService.selectSysOaCustomerVisitLogById(id);
|
||||
SysOaCustomer sysOaCustomer = sysOaCustomerService.selectSysOaCustomerByCustomerNo(sysOaCustomerVisitLog.getCustomerNo());
|
||||
|
||||
return redirect("/system/customer/detail/"+ sysOaCustomer.getId()) ;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.snow.web.controller.system;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.snow.common.annotation.Log;
|
||||
|
@ -312,7 +313,13 @@ public class SysOaEmailController extends BaseController
|
|||
public String mailDetail(@PathVariable("id") Long id,ModelMap mmap)
|
||||
{
|
||||
SysUser sysUser = ShiroUtils.getSysUser();
|
||||
SysOaEmail sysOaEmail = sysOaEmailService.selectSysOaEmailById(id);
|
||||
SysOaEmail sysOaEmail;
|
||||
if(NumberUtil.isInteger(String.valueOf(id))){
|
||||
sysOaEmail = sysOaEmailService.selectSysOaEmailById(id);
|
||||
}else {
|
||||
sysOaEmail = sysOaEmailService.selectSysOaEmailByEmailNo(String.valueOf(id));
|
||||
}
|
||||
|
||||
SysMessageTransition sysMessageTransition=new SysMessageTransition();
|
||||
sysMessageTransition.setMessageOutsideId(sysOaEmail.getEmailNo());
|
||||
sysMessageTransition.setMessageType(MessageEventType.SEND_EMAIL.getCode());
|
||||
|
@ -332,6 +339,8 @@ public class SysOaEmailController extends BaseController
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取邮件读取情况
|
||||
* @return
|
||||
|
|
|
@ -146,6 +146,10 @@ swagger:
|
|||
# 是否开启swagger
|
||||
enabled: true
|
||||
|
||||
#登录后是否显示最新的公告
|
||||
is:
|
||||
notice: true
|
||||
|
||||
flowable:
|
||||
#关闭定时任务JOB
|
||||
async-executor-activate: false
|
||||
|
|
|
@ -119,44 +119,17 @@
|
|||
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-bell"></i> <span class="label label-primary">8</span>
|
||||
<i class="fa fa-bell"></i> <span class="label label-primary">[[${sysMessageSize}]]</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-alerts">
|
||||
<li>
|
||||
<a href="mailbox.html">
|
||||
<li th:each="sysMessages,iterStat:${sysMessageList}" class="mt5">
|
||||
<a th:href="${sysMessages.redirectUrl}" class="menuItem">
|
||||
<div>
|
||||
<i class="fa fa-envelope fa-fw"></i> You have 16 messages
|
||||
<span class="pull-right text-muted small">4 minutes ago</span>
|
||||
<i th:class="${sysMessages.iconClass}"></i>[[${sysMessages.producerUser.userName}]]发送来一条消息<span class="pull-right text-muted small">[[${sysMessages.spendTime}]]</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="profile.html">
|
||||
<div>
|
||||
<i class="fa fa-twitter fa-fw"></i> 3 New Followers
|
||||
<span class="pull-right text-muted small">12 minutes ago</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a href="grid_options.html">
|
||||
<div>
|
||||
<i class="fa fa-upload fa-fw"></i> Server Rebooted
|
||||
<span class="pull-right text-muted small">4 minutes ago</span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<div class="text-center link-block">
|
||||
<a href="notifications.html">
|
||||
<strong>See All Alerts</strong>
|
||||
<i class="fa fa-angle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
@ -346,16 +319,17 @@ $(function() {
|
|||
}
|
||||
$("[data-toggle='tooltip']").tooltip();
|
||||
|
||||
/*公告停留半分钟*/
|
||||
layer.open({
|
||||
type : 2,
|
||||
shadeClose : true,
|
||||
time:30000,
|
||||
title : "公告",
|
||||
area : ["70%", "80%"],
|
||||
content : ["/system/notice/newNotice/"+1, 'yes']
|
||||
})
|
||||
|
||||
if([[${isNewNotice}]]){
|
||||
/*公告停留半分钟*/
|
||||
layer.open({
|
||||
type : 2,
|
||||
shadeClose : true,
|
||||
time:30000,
|
||||
title : "公告",
|
||||
area : ["70%", "80%"],
|
||||
content : ["/system/notice/newNotice/"+1, 'yes']
|
||||
})
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a data-toggle="tab" href="#tab-1"> 拜访日志</a>
|
||||
</li>
|
||||
<li class=""><a data-toggle="tab" href="#tab-2"> 第二个选项卡</a>
|
||||
<li class=""><a data-toggle="tab" href="#tab-2"> 站内邮件</a>
|
||||
</li>
|
||||
<li class=""><a data-toggle="tab" href="#tab-3"> 第二个选项卡</a>
|
||||
</li>
|
||||
|
@ -23,53 +23,42 @@
|
|||
<div class="tab-content ">
|
||||
<div id="tab-1" class="tab-pane active">
|
||||
<div class="panel-body">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>拜访日志</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>数据</th>
|
||||
<th>用户</th>
|
||||
<th>值</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td><span class="line">5,3,2,-1,-3,-2,2,3,5,2</span>
|
||||
</td>
|
||||
<td>张三</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 40%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td><span class="line">5,3,9,6,5,9,7,3,5,2</span>
|
||||
</td>
|
||||
<td>李四</td>
|
||||
<td class="text-warning"> <i class="fa fa-level-down"></i> -20%</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td><span class="line">1,6,3,9,5,9,5,3,9,6,4</span>
|
||||
</td>
|
||||
<td>王麻子</td>
|
||||
<td class="text-navy"> <i class="fa fa-level-up"></i> 26%</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3>拜访日志</h3>
|
||||
<div id="vertical-timeline" class="vertical-container light-timeline" th:each="visitLog,iterStat : ${visitLogs}">
|
||||
<div class="vertical-timeline-block">
|
||||
<div class="vertical-timeline-icon blue-bg">
|
||||
<i class="fa fa-file-text"></i>
|
||||
</div>
|
||||
|
||||
<div class="vertical-timeline-content">
|
||||
<label class="badge badge-primary" > <i class="fa fa-user danger"></i> [[${visitLog.producerUser.userName}]] </label>
|
||||
<label > 添加一条拜访日志,请及时查看。</label>
|
||||
<label class="badge badge-warning"> <i class="fa fa-clock-o"></i>[[${visitLog.spendTime}]]</label>
|
||||
<a class="btn btn-sm btn-success"> 查看详情 </a>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-2" class="tab-pane">
|
||||
<div class="panel-body">
|
||||
<strong>栅格系统</strong>
|
||||
<h3>站内邮件</h3>
|
||||
<div id="vertical-timeline1" class="vertical-container light-timeline" th:each="email,iterStat : ${emailList}">
|
||||
<div class="vertical-timeline-block">
|
||||
<div class="vertical-timeline-icon blue-bg">
|
||||
<i class="fa fa-file-text"></i>
|
||||
</div>
|
||||
|
||||
<p>Bootstrap 提供了一套响应式、移动设备优先的流式栅格系统,随着屏幕或视口(viewport)尺寸的增加,系统会自动分为最多12列。它包含了易于使用的预定义类,还有强大的mixin 用于生成更具语义的布局。</p>
|
||||
<div class="vertical-timeline-content">
|
||||
<label class="badge badge-primary" > <i class="fa fa-user danger"></i> [[${email.producerUser.userName}]] </label>
|
||||
<label > 发来一条站内邮件,请及时查看。</label>
|
||||
<label class="badge badge-warning"> <i class="fa fa-clock-o"></i>[[${email.spendTime}]]</label>
|
||||
<a class="btn btn-sm btn-success"> 查看详情 </a>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab-3" class="tab-pane">
|
||||
|
|
|
@ -130,6 +130,12 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
<artifactId>jsqlparser</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,15 @@
|
|||
package com.snow.common.constant;
|
||||
|
||||
/**
|
||||
* @program: snow
|
||||
* @description 报表url
|
||||
* @author: 没用的阿吉
|
||||
* @create: 2021-04-27 20:46
|
||||
**/
|
||||
public class ReportConstants {
|
||||
|
||||
/**
|
||||
* 操作日志报表
|
||||
*/
|
||||
public static final String SYS_OPERATE_URL = "/view/546676819120545792";
|
||||
}
|
|
@ -285,9 +285,9 @@ public class ShiroConfig
|
|||
filterChainDefinitionMap.put("/third/oauth/**", "anon");
|
||||
|
||||
//积木报表排除
|
||||
filterChainDefinitionMap.put("/jmreport/**", "anon");
|
||||
filterChainDefinitionMap.put("/**/*.js.map", "anon");
|
||||
filterChainDefinitionMap.put("/**/*.css.map", "anon");
|
||||
// filterChainDefinitionMap.put("/jmreport/**", "anon");
|
||||
//filterChainDefinitionMap.put("/**/*.js.map", "anon");
|
||||
// filterChainDefinitionMap.put("/**/*.css.map", "anon");
|
||||
|
||||
filterChainDefinitionMap.put("/dingTalk/dingFlowRobot", "anon");
|
||||
// 退出 logout地址,shiro去清除session
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package com.snow.system.domain;
|
||||
|
||||
import com.snow.common.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.snow.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 消息流转中心对象 sys_message_transition
|
||||
|
@ -55,4 +54,39 @@ public class SysMessageTransition extends BaseEntity
|
|||
|
||||
|
||||
private String producerOrConsumerId;
|
||||
|
||||
/**
|
||||
* 跳转URL
|
||||
*/
|
||||
private String redirectUrl;
|
||||
|
||||
/**
|
||||
* 图标样式
|
||||
*/
|
||||
private String iconClass="fa fa-envelope fa-fw";
|
||||
|
||||
/**
|
||||
* 已用时
|
||||
*/
|
||||
private String spendTime;
|
||||
|
||||
|
||||
public static void init(List<SysMessageTransition> sysMessageTransitions){
|
||||
sysMessageTransitions.forEach((t)->{
|
||||
switch (t.getMessageType()){
|
||||
case "SEND_VISIT_LOG":
|
||||
t.setIconClass("fa fa-twitter fa-fw");
|
||||
t.setRedirectUrl("/system/customer/messageDetail/"+t.getMessageOutsideId());
|
||||
break;
|
||||
case "SEND_EMAIL":
|
||||
t.setIconClass("fa fa-envelope fa-fw");
|
||||
t.setRedirectUrl("/system/email/mailDetail/"+t.getMessageOutsideId());
|
||||
break;
|
||||
default:
|
||||
t.setIconClass("fa fa-twitter fa-fw");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,9 @@ public interface SysOaEmailMapper
|
|||
*/
|
||||
public SysOaEmail selectSysOaEmailById(Long id);
|
||||
|
||||
|
||||
public SysOaEmail selectSysOaEmailByEmailNo(String emailNo);
|
||||
|
||||
/**
|
||||
* 查询邮件列表
|
||||
*
|
||||
|
|
|
@ -21,6 +21,8 @@ public interface ISysOaEmailService
|
|||
*/
|
||||
public SysOaEmail selectSysOaEmailById(Long id);
|
||||
|
||||
public SysOaEmail selectSysOaEmailByEmailNo(String emailNo);
|
||||
|
||||
|
||||
/**
|
||||
* 获取我的收件未读消息
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package com.snow.system.service.impl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.date.BetweenFormater;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.snow.common.utils.DateUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -66,6 +70,7 @@ public class SysMessageTransitionServiceImpl implements ISysMessageTransitionSer
|
|||
sysMessageTransitionList.forEach(t->{
|
||||
t.setProducerUser(sysUserService.selectUserById(Long.parseLong(t.getProducerId())));
|
||||
t.setConsumerUser(sysUserService.selectUserById(Long.parseLong(t.getConsumerId())));
|
||||
t.setSpendTime(DateUtil.formatBetween(t.getCreateTime(), new Date(), BetweenFormater.Level.SECOND)+"前");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,13 @@ public class SysOaEmailServiceImpl implements ISysOaEmailService
|
|||
return sysOaEmail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysOaEmail selectSysOaEmailByEmailNo(String emailNo) {
|
||||
SysOaEmail sysOaEmail=sysOaEmailMapper.selectSysOaEmailByEmailNo(emailNo);
|
||||
sysOaEmail.setBelongUser(sysUserService.selectUserById(Long.parseLong(sysOaEmail.getBelongUserId())));
|
||||
return sysOaEmail;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<SysOaEmail> getMyNoReadOaEmailList(String userId){
|
||||
|
|
|
@ -90,6 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectSysOaEmailByEmailNo" parameterType="String" resultMap="SysOaEmailResult">
|
||||
<include refid="selectSysOaEmailVo"/>
|
||||
where email_no = #{EmailNo}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysOaEmail" parameterType="SysOaEmail" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_oa_email
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
Loading…
Reference in New Issue